61.28.4 problem 64

Internal problem ID [12485]
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-3
Problem number : 64
Date solved : Monday, March 31, 2025 at 05:36:14 AM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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

Maple. Time used: 0.056 (sec). Leaf size: 61
ode:=x*diff(diff(y(x),x),x)+a*diff(y(x),x)+(b*x+c)*y(x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = {\mathrm e}^{-i \sqrt {b}\, x} \left (\operatorname {KummerM}\left (\frac {a \sqrt {b}+i c}{2 \sqrt {b}}, a , 2 i \sqrt {b}\, x \right ) c_1 +\operatorname {KummerU}\left (\frac {a \sqrt {b}+i c}{2 \sqrt {b}}, a , 2 i \sqrt {b}\, x \right ) c_2 \right ) \]
Mathematica. Time used: 0.058 (sec). Leaf size: 85
ode=x*D[y[x],{x,2}]+a*D[y[x],x]+(b*x+c)*y[x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to e^{-i \sqrt {b} x} \left (c_1 \operatorname {HypergeometricU}\left (\frac {1}{2} \left (a+\frac {i c}{\sqrt {b}}\right ),a,2 i \sqrt {b} x\right )+c_2 L_{-\frac {a}{2}-\frac {i c}{2 \sqrt {b}}}^{a-1}\left (2 i \sqrt {b} x\right )\right ) \]
Sympy
from sympy import * 
x = symbols("x") 
a = symbols("a") 
b = symbols("b") 
c = symbols("c") 
y = Function("y") 
ode = Eq(a*Derivative(y(x), x) + x*Derivative(y(x), (x, 2)) + (b*x + c)*y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
ValueError : Expected Expr or iterable but got None