23.3.259 problem 261

Internal problem ID [5973]
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 : 261
Date solved : Tuesday, September 30, 2025 at 02:07:07 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

\begin{align*} -b \left (b \,x^{2}+a \right ) y+a y^{\prime }+x^{2} y^{\prime \prime }&=0 \end{align*}
Maple. Time used: 0.136 (sec). Leaf size: 178
ode:=-b*(b*x^2+a)*y(x)+a*diff(y(x),x)+x^2*diff(diff(y(x),x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \sqrt {x}\, \left ({\mathrm e}^{b x} \operatorname {HeunD}\left (-4 \sqrt {2}\, \sqrt {a b}, -1-4 \sqrt {2}\, \sqrt {a b}, 8 \sqrt {2}\, \sqrt {a b}, -4 \sqrt {2}\, \sqrt {a b}+1, \frac {\sqrt {2}\, \sqrt {a b}\, x -a}{\sqrt {2}\, \sqrt {a b}\, x +a}\right ) c_2 +{\mathrm e}^{\frac {-b \,x^{2}+a}{x}} \operatorname {HeunD}\left (4 \sqrt {2}\, \sqrt {a b}, -1-4 \sqrt {2}\, \sqrt {a b}, 8 \sqrt {2}\, \sqrt {a b}, -4 \sqrt {2}\, \sqrt {a b}+1, \frac {\sqrt {2}\, \sqrt {a b}\, x -a}{\sqrt {2}\, \sqrt {a b}\, x +a}\right ) c_1 \right ) \]
Mathematica. Time used: 0.312 (sec). Leaf size: 38
ode=-(b*(a + b*x^2)*y[x]) + a*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 e^{b x} \left (c_2 \int _1^xe^{\frac {a}{K[1]}-2 b K[1]}dK[1]+c_1\right ) \end{align*}
Sympy
from sympy import * 
x = symbols("x") 
a = symbols("a") 
b = symbols("b") 
y = Function("y") 
ode = Eq(a*Derivative(y(x), x) - b*(a + b*x**2)*y(x) + x**2*Derivative(y(x), (x, 2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : The given ODE Derivative(y(x), x) - (a*b*y(x) + b**2*x**2*y(x) - x**2*Derivati