2.28.13 Problem 23

2.28.13.1 Maple
2.28.13.2 Mathematica
2.28.13.3 Sympy

Internal problem ID [13684]
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 : 23
Date solved : Friday, December 19, 2025 at 10:33:01 AM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

\begin{align*} y^{\prime \prime }+2 a y^{\prime } x +\left (b \,x^{4}+a^{2} x^{2}+c x +a \right ) y&=0 \\ \end{align*}
2.28.13.1 Maple. Time used: 0.039 (sec). Leaf size: 80
ode:=diff(diff(y(x),x),x)+2*a*x*diff(y(x),x)+(b*x^4+a^2*x^2+c*x+a)*y(x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = {\mathrm e}^{-\frac {x^{2} \left (i \sqrt {b}\, x +\frac {3 a}{2}\right )}{3}} x \left (\operatorname {KummerU}\left (\frac {i c +4 \sqrt {b}}{6 \sqrt {b}}, \frac {4}{3}, \frac {2 i \sqrt {b}\, x^{3}}{3}\right ) c_2 +\operatorname {KummerM}\left (\frac {i c +4 \sqrt {b}}{6 \sqrt {b}}, \frac {4}{3}, \frac {2 i \sqrt {b}\, x^{3}}{3}\right ) c_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
 

Maple step by step

\[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & \frac {d^{2}}{d x^{2}}y \left (x \right )+2 a x \left (\frac {d}{d x}y \left (x \right )\right )+\left (b \,x^{4}+a^{2} x^{2}+c x +a \right ) y \left (x \right )=0 \\ \bullet & {} & \textrm {Highest derivative means the order of the ODE is}\hspace {3pt} 2 \\ {} & {} & \frac {d^{2}}{d x^{2}}y \left (x \right ) \\ \bullet & {} & \textrm {Assume series solution for}\hspace {3pt} y \left (x \right ) \\ {} & {} & y \left (x \right )=\moverset {\infty }{\munderset {k =0}{\sum }}a_{k} x^{k} \\ \square & {} & \textrm {Rewrite ODE with series expansions}\hspace {3pt} \\ {} & \circ & \textrm {Convert}\hspace {3pt} x^{m}\cdot y \left (x \right )\hspace {3pt}\textrm {to series expansion for}\hspace {3pt} m =0..4 \\ {} & {} & x^{m}\cdot y \left (x \right )=\moverset {\infty }{\munderset {k =\max \left (0, -m \right )}{\sum }}a_{k} x^{k +m} \\ {} & \circ & \textrm {Shift index using}\hspace {3pt} k \mathrm {->}k -m \\ {} & {} & x^{m}\cdot y \left (x \right )=\moverset {\infty }{\munderset {k =\max \left (0, -m \right )+m}{\sum }}a_{k -m} x^{k} \\ {} & \circ & \textrm {Convert}\hspace {3pt} x \cdot \left (\frac {d}{d x}y \left (x \right )\right )\hspace {3pt}\textrm {to series expansion}\hspace {3pt} \\ {} & {} & x \cdot \left (\frac {d}{d x}y \left (x \right )\right )=\moverset {\infty }{\munderset {k =0}{\sum }}a_{k} k \,x^{k} \\ {} & \circ & \textrm {Convert}\hspace {3pt} \frac {d^{2}}{d x^{2}}y \left (x \right )\hspace {3pt}\textrm {to series expansion}\hspace {3pt} \\ {} & {} & \frac {d^{2}}{d x^{2}}y \left (x \right )=\moverset {\infty }{\munderset {k =2}{\sum }}a_{k} k \left (k -1\right ) x^{k -2} \\ {} & \circ & \textrm {Shift index using}\hspace {3pt} k \mathrm {->}k +2 \\ {} & {} & \frac {d^{2}}{d x^{2}}y \left (x \right )=\moverset {\infty }{\munderset {k =0}{\sum }}a_{k +2} \left (k +2\right ) \left (k +1\right ) x^{k} \\ & {} & \textrm {Rewrite ODE with series expansions}\hspace {3pt} \\ {} & {} & a_{0} a +2 a_{2}+\left (6 a_{3}+3 a_{1} a +a_{0} c \right ) x +\left (a_{0} a^{2}+5 a a_{2}+a_{1} c +12 a_{4}\right ) x^{2}+\left (a_{1} a^{2}+7 a a_{3}+c a_{2}+20 a_{5}\right ) x^{3}+\left (\moverset {\infty }{\munderset {k =4}{\sum }}\left (a_{k +2} \left (k +2\right ) \left (k +1\right )+a_{k} a \left (2 k +1\right )+a_{k -1} c +a_{k -2} a^{2}+a_{k -4} b \right ) x^{k}\right )=0 \\ \bullet & {} & \textrm {The coefficients of each power of}\hspace {3pt} x \hspace {3pt}\textrm {must be 0}\hspace {3pt} \\ {} & {} & \left [2 a_{2}+a_{0} a =0, 6 a_{3}+3 a_{1} a +a_{0} c =0, a_{0} a^{2}+5 a a_{2}+a_{1} c +12 a_{4}=0, a_{1} a^{2}+7 a a_{3}+c a_{2}+20 a_{5}=0\right ] \\ \bullet & {} & \textrm {Solve for the dependent coefficient(s)}\hspace {3pt} \\ {} & {} & \left \{a_{2}=-\frac {a_{0} a}{2}, a_{3}=-\frac {a_{1} a}{2}-\frac {a_{0} c}{6}, a_{4}=\frac {a_{0} a^{2}}{8}-\frac {a_{1} c}{12}, a_{5}=\frac {1}{8} a_{1} a^{2}+\frac {1}{12} a_{0} a c \right \} \\ \bullet & {} & \textrm {Each term in the series must be 0, giving the recursion relation}\hspace {3pt} \\ {} & {} & \left (k^{2}+3 k +2\right ) a_{k +2}+a_{k -2} a^{2}+a_{k} a \left (2 k +1\right )+a_{k -4} b +a_{k -1} c =0 \\ \bullet & {} & \textrm {Shift index using}\hspace {3pt} k \mathrm {->}k +4 \\ {} & {} & \left (\left (k +4\right )^{2}+3 k +14\right ) a_{k +6}+a_{k +2} a^{2}+a_{k +4} a \left (2 k +9\right )+a_{k} b +a_{k +3} c =0 \\ \bullet & {} & \textrm {Recursion relation that defines the series solution to the ODE}\hspace {3pt} \\ {} & {} & \left [y \left (x \right )=\moverset {\infty }{\munderset {k =0}{\sum }}a_{k} x^{k}, a_{k +6}=-\frac {a_{k +2} a^{2}+2 a k a_{k +4}+9 a a_{k +4}+a_{k} b +a_{k +3} c}{k^{2}+11 k +30}, a_{2}=-\frac {a_{0} a}{2}, a_{3}=-\frac {a_{1} a}{2}-\frac {a_{0} c}{6}, a_{4}=\frac {a_{0} a^{2}}{8}-\frac {a_{1} c}{12}, a_{5}=\frac {1}{8} a_{1} a^{2}+\frac {1}{12} a_{0} a c \right ] \end {array} \]
2.28.13.2 Mathematica. Time used: 0.119 (sec). Leaf size: 121
ode=D[y[x],{x,2}]+2*a*x*D[y[x],x]+(b*x^4+a^2*x^2+c*x+a)*y[x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {\sqrt [3]{2} \sqrt [3]{x^3} e^{\frac {1}{6} i x^2 \left (2 \sqrt {b} x+3 i a\right )} \left (c_1 \operatorname {HypergeometricU}\left (\frac {1}{3}-\frac {i c}{6 \sqrt {b}},\frac {2}{3},-\frac {2}{3} i \sqrt {b} x^3\right )+c_2 L_{\frac {i c}{6 \sqrt {b}}-\frac {1}{3}}^{-\frac {1}{3}}\left (-\frac {2}{3} i \sqrt {b} x^3\right )\right )}{x} \end{align*}
2.28.13.3 Sympy
from sympy import * 
x = symbols("x") 
a = symbols("a") 
b = symbols("b") 
c = symbols("c") 
y = Function("y") 
ode = Eq(2*a*x*Derivative(y(x), x) + (a**2*x**2 + a + b*x**4 + c*x)*y(x) + Derivative(y(x), (x, 2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
False