61.27.8 problem 18

Internal problem ID [12439]
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-2
Problem number : 18
Date solved : Thursday, March 13, 2025 at 11:42:26 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

\begin{align*} y^{\prime \prime }+x y^{\prime }+\left (n -1\right ) y&=0 \end{align*}

Maple. Time used: 0.233 (sec). Leaf size: 104
ode:=diff(diff(y(x),x),x)+x*diff(y(x),x)+(n-1)*y(x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = -\frac {\left (-2 c_{1} n \left (-\frac {x^{2}}{2}+n +\frac {1}{2}\right ) \operatorname {KummerM}\left (-\frac {n}{2}+\frac {1}{2}, \frac {3}{2}, \frac {x^{2}}{2}\right )+2 \left (-x^{2}+2 n +1\right ) c_{2} \operatorname {KummerU}\left (-\frac {n}{2}+\frac {1}{2}, \frac {3}{2}, \frac {x^{2}}{2}\right )+n c_{1} \left (n +2\right ) \operatorname {KummerM}\left (-\frac {n}{2}-\frac {1}{2}, \frac {3}{2}, \frac {x^{2}}{2}\right )+4 \operatorname {KummerU}\left (-\frac {n}{2}-\frac {1}{2}, \frac {3}{2}, \frac {x^{2}}{2}\right ) c_{2} \right ) {\mathrm e}^{-\frac {x^{2}}{2}} x}{n \left (n -1\right )} \]
Mathematica. Time used: 0.033 (sec). Leaf size: 51
ode=D[y[x],{x,2}]+x*D[y[x],x]+(n-1)*y[x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to e^{-\frac {x^2}{2}} \left (c_1 \operatorname {HermiteH}\left (n-2,\frac {x}{\sqrt {2}}\right )+c_2 \operatorname {Hypergeometric1F1}\left (1-\frac {n}{2},\frac {1}{2},\frac {x^2}{2}\right )\right ) \]
Sympy
from sympy import * 
x = symbols("x") 
n = symbols("n") 
y = Function("y") 
ode = Eq(x*Derivative(y(x), x) + (n - 1)*y(x) + Derivative(y(x), (x, 2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
False