23.3.330 problem 332

Internal problem ID [6044]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Part II. Chapter 3. THE DIFFERENTIAL EQUATION IS LINEAR AND OF SECOND ORDER, page 311
Problem number : 332
Date solved : Tuesday, September 30, 2025 at 02:20:24 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

\begin{align*} -2 y+a \,x^{2} y^{\prime }+x^{2} y^{\prime \prime }&=0 \end{align*}
Maple. Time used: 0.004 (sec). Leaf size: 28
ode:=-2*y(x)+a*x^2*diff(y(x),x)+x^2*diff(diff(y(x),x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {c_1 \left (a x -2\right )+c_2 \,{\mathrm e}^{-a x} \left (a x +2\right )}{x} \]
Mathematica. Time used: 0.034 (sec). Leaf size: 80
ode=-2*y[x] + a*x^2*D[y[x],x] + x^2*D[y[x],{x,2}] == 0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to -\frac {a x^{3/2} e^{-\frac {a x}{2}} \left (2 (i a c_2 x+2 c_1) \sinh \left (\frac {a x}{2}\right )-2 (a c_1 x+2 i c_2) \cosh \left (\frac {a x}{2}\right )\right )}{\sqrt {\pi } (-i a x)^{5/2}} \end{align*}
Sympy
from sympy import * 
x = symbols("x") 
a = symbols("a") 
y = Function("y") 
ode = Eq(a*x**2*Derivative(y(x), x) + x**2*Derivative(y(x), (x, 2)) - 2*y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
False