61.29.22 problem 131

Internal problem ID [12552]
Book : Handbook of exact solutions for ordinary differential equations. By Polyanin and Zaitsev. Second edition
Section : Chapter 2, Second-Order Differential Equations. section 2.1.2-4
Problem number : 131
Date solved : Thursday, March 13, 2025 at 11:43:31 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

\begin{align*} x^{2} y^{\prime \prime }+\lambda x y^{\prime }+\left (a \,x^{2}+b x +c \right ) y&=0 \end{align*}

Maple. Time used: 0.208 (sec). Leaf size: 71
ode:=x^2*diff(diff(y(x),x),x)+lambda*x*diff(y(x),x)+(a*x^2+b*x+c)*y(x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = x^{-\frac {\lambda }{2}} \left (\operatorname {WhittakerM}\left (-\frac {i b}{2 \sqrt {a}}, \frac {\sqrt {\lambda ^{2}-4 c -2 \lambda +1}}{2}, 2 i \sqrt {a}\, x \right ) c_{1} +\operatorname {WhittakerW}\left (-\frac {i b}{2 \sqrt {a}}, \frac {\sqrt {\lambda ^{2}-4 c -2 \lambda +1}}{2}, 2 i \sqrt {a}\, x \right ) c_{2} \right ) \]
Mathematica. Time used: 0.461 (sec). Leaf size: 169
ode=x^2*D[y[x],{x,2}]+\[Lambda]*x*D[y[x],x]+(a*x^2+b*x+c)*y[x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \left (c_1 \operatorname {HypergeometricU}\left (\frac {1}{2} \left (\frac {i b}{\sqrt {a}}+\sqrt {(\lambda -1)^2-4 c}+1\right ),\sqrt {(\lambda -1)^2-4 c}+1,2 i \sqrt {a} x\right )+c_2 L_{\frac {1}{2} \left (-\frac {i b}{\sqrt {a}}-\sqrt {(\lambda -1)^2-4 c}-1\right )}^{\sqrt {(\lambda -1)^2-4 c}}\left (2 i \sqrt {a} x\right )\right ) \exp \left (\int _1^x\frac {-\lambda -2 i \sqrt {a} K[1]+\sqrt {(\lambda -1)^2-4 c}+1}{2 K[1]}dK[1]\right ) \]
Sympy
from sympy import * 
x = symbols("x") 
a = symbols("a") 
b = symbols("b") 
c = symbols("c") 
cg = symbols("cg") 
y = Function("y") 
ode = Eq(cg*x*Derivative(y(x), x) + x**2*Derivative(y(x), (x, 2)) + (a*x**2 + b*x + c)*y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
ValueError : Expected Expr or iterable but got None