2.28.8 Problem 18

2.28.8.1 Maple
2.28.8.2 Mathematica
2.28.8.3 Sympy

Internal problem ID [13679]
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 : Friday, December 19, 2025 at 10:28:25 AM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

\begin{align*} y^{\prime \prime }+y^{\prime } x +\left (n -1\right ) y&=0 \\ \end{align*}
2.28.8.1 Maple. Time used: 0.018 (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 \left (-\frac {x^{2}}{2}+n +\frac {1}{2}\right ) c_1 n \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 )+c_1 n \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 )} \]

Maple trace

Methods for second order ODEs: 
--- Trying classification methods --- 
trying a quadrature 
checking if the LODE has constant coefficients 
checking if the LODE is of Euler type 
trying a symmetry of the form [xi=0, eta=F(x)] 
checking if the LODE is missing y 
-> Trying a Liouvillian solution using Kovacics algorithm 
<- No Liouvillian solutions exists 
-> Trying a solution in terms of special functions: 
   -> Bessel 
   -> elliptic 
   -> Legendre 
   -> Kummer 
      -> hyper3: Equivalence to 1F1 under a power @ Moebius 
      <- hyper3 successful: received ODE is equivalent to the 1F1 ODE 
   <- Kummer successful 
<- special function solution successful
 
2.28.8.2 Mathematica. Time used: 0.02 (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]
 
\begin{align*} 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 ) \end{align*}
2.28.8.3 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