23.3.308 problem 310

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

\begin{align*} \left (a \left (1+a \right )+b^{2} x^{2}\right ) y-2 a x y^{\prime }+x^{2} y^{\prime \prime }&=0 \end{align*}
Maple. Time used: 0.004 (sec). Leaf size: 21
ode:=(a*(a+1)+b^2*x^2)*y(x)-2*a*x*diff(y(x),x)+x^2*diff(diff(y(x),x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = x^{a} \left (c_1 \sin \left (b x \right )+c_2 \cos \left (b x \right )\right ) \]
Mathematica. Time used: 0.027 (sec). Leaf size: 42
ode=(a*(1 + a) + b^2*x^2)*y[x] - 2*a*x*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 c_1 x^a e^{-i b x}-\frac {i c_2 x^a e^{i b x}}{2 b} \end{align*}
Sympy
from sympy import * 
x = symbols("x") 
a = symbols("a") 
b = symbols("b") 
y = Function("y") 
ode = Eq(-2*a*x*Derivative(y(x), x) + x**2*Derivative(y(x), (x, 2)) + (a*(a + 1) + b**2*x**2)*y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
TypeError : invalid input: 2*a + 1