15.18.14 problem 14

Internal problem ID [3257]
Book : Differential Equations by Alfred L. Nelson, Karl W. Folley, Max Coral. 3rd ed. DC heath. Boston. 1964
Section : Exercise 35, page 157
Problem number : 14
Date solved : Sunday, March 30, 2025 at 01:25:20 AM
CAS classification : [[_2nd_order, _missing_y]]

\begin{align*} \left (-x^{2}+1\right ) y^{\prime \prime }+x y^{\prime }&=1 \end{align*}

Maple. Time used: 0.002 (sec). Leaf size: 63
ode:=(-x^2+1)*diff(diff(y(x),x),x)+x*diff(y(x),x) = 1; 
dsolve(ode,y(x), singsol=all);
 
\[ y = -\frac {-\sqrt {x +1}\, \left (x^{2}+2 c_2 \right ) \sqrt {x -1}+\left (-x^{3}+\ln \left (x +\sqrt {x^{2}-1}\right ) \sqrt {x^{2}-1}+x \right ) c_1}{2 \sqrt {x +1}\, \sqrt {x -1}} \]
Mathematica. Time used: 0.063 (sec). Leaf size: 46
ode=(1-x^2)*D[y[x],{x,2}]+x*D[y[x],x]==1; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \frac {1}{2} \left (-c_1 \text {arctanh}\left (\frac {x}{\sqrt {x^2-1}}\right )+x^2+c_1 \sqrt {x^2-1} x+2 c_2\right ) \]
Sympy. Time used: 4.587 (sec). Leaf size: 119
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x*Derivative(y(x), x) + (1 - x**2)*Derivative(y(x), (x, 2)) - 1,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} + \begin {cases} C_{1} \left (\frac {x \sqrt {x^{2} - 1}}{2} - \frac {\log {\left (x + \sqrt {x^{2} - 1} \right )}}{2}\right ) + \frac {x^{2}}{2} & \text {for}\: x < -1 \\C_{1} \left (\frac {x \sqrt {x^{2} - 1}}{2} - \frac {\log {\left (x + \sqrt {x^{2} - 1} \right )}}{2}\right ) + \frac {i \sqrt {1 - x^{2}} \sqrt {x^{2} - 1}}{2} + \frac {1}{2} & \text {for}\: x \leq 1 \\C_{1} \left (\frac {x \sqrt {x^{2} - 1}}{2} - \frac {\log {\left (x + \sqrt {x^{2} - 1} \right )}}{2}\right ) + \frac {x^{2}}{2} & \text {otherwise} \end {cases} \]