83.30.8 problem 8

Internal problem ID [19308]
Book : A Text book for differentional equations for postgraduate students by Ray and Chaturvedi. First edition, 1958. BHASKAR press. INDIA
Section : Chapter VII. Exact differential equations and certain particular forms of equations. Exercise VII (D) at page 109
Problem number : 8
Date solved : Thursday, March 13, 2025 at 02:12:54 PM
CAS classification : [[_2nd_order, _missing_y]]

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

Maple. Time used: 0.001 (sec). Leaf size: 61
ode:=(-x^2+1)*diff(diff(y(x),x),x)+x*diff(y(x),x) = a*x; 
dsolve(ode,y(x), singsol=all);
 
\[ y \left (x \right ) = -\frac {-2 \sqrt {x +1}\, \left (a x +c_{2} \right ) \sqrt {x -1}+\left (-x^{3}+\sqrt {x^{2}-1}\, \ln \left (x +\sqrt {x^{2}-1}\right )+x \right ) c_{1}}{2 \sqrt {x -1}\, \sqrt {x +1}} \]
Mathematica. Time used: 0.099 (sec). Leaf size: 45
ode=(1-x^2)*D[y[x],{x,2}]+x*D[y[x],x]==a*x; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to a x-\frac {1}{2} c_1 \text {arctanh}\left (\frac {x}{\sqrt {x^2-1}}\right )+\frac {1}{2} c_1 \sqrt {x^2-1} x+c_2 \]
Sympy. Time used: 0.583 (sec). Leaf size: 31
from sympy import * 
x = symbols("x") 
a = symbols("a") 
y = Function("y") 
ode = Eq(-a*x + x*Derivative(y(x), x) + (1 - x**2)*Derivative(y(x), (x, 2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} + C_{2} \left (x \sqrt {x^{2} - 1} - \log {\left (x + \sqrt {x^{2} - 1} \right )}\right ) + a x \]