54.3.157 problem 1171

Internal problem ID [12452]
Book : Differential Gleichungen, E. Kamke, 3rd ed. Chelsea Pub. NY, 1948
Section : Chapter 2, linear second order
Problem number : 1171
Date solved : Friday, October 03, 2025 at 03:19:16 AM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

\begin{align*} x^{2} y^{\prime \prime }+2 x y^{\prime }+\left (l \,x^{2}+a x -n \left (n +1\right )\right ) y&=0 \end{align*}
Maple. Time used: 0.045 (sec). Leaf size: 45
ode:=x^2*diff(diff(y(x),x),x)+2*x*diff(y(x),x)+(l*x^2+a*x-n*(n+1))*y(x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {c_2 \operatorname {WhittakerW}\left (-\frac {i a}{2 \sqrt {l}}, n +\frac {1}{2}, 2 i \sqrt {l}\, x \right )+c_1 \operatorname {WhittakerM}\left (-\frac {i a}{2 \sqrt {l}}, n +\frac {1}{2}, 2 i \sqrt {l}\, x \right )}{x} \]
Mathematica. Time used: 0.043 (sec). Leaf size: 92
ode=(-(n*(1 + n)) + a*x + l*x^2)*y[x] + 2*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 e^{-i \sqrt {l} x} x^n \left (c_1 \operatorname {HypergeometricU}\left (\frac {i a}{2 \sqrt {l}}+n+1,2 n+2,2 i \sqrt {l} x\right )+c_2 L_{-\frac {i a}{2 \sqrt {l}}-n-1}^{2 n+1}\left (2 i \sqrt {l} x\right )\right ) \end{align*}
Sympy
from sympy import * 
x = symbols("x") 
a = symbols("a") 
l = symbols("l") 
n = symbols("n") 
y = Function("y") 
ode = Eq(x**2*Derivative(y(x), (x, 2)) + 2*x*Derivative(y(x), x) + (a*x + l*x**2 - n*(n + 1))*y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
ValueError : Expected Expr or iterable but got None