2.28.19 Problem 29
Internal
problem
ID
[13690]
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
:
29
Date
solved
:
Friday, December 19, 2025 at 10:38:33 AM
CAS
classification
:
[[_2nd_order, _with_linear_symmetries]]
\begin{align*}
y^{\prime \prime }+\left (x a +b \right ) y^{\prime }+c \left (\left (a -c \right ) x^{2}+b x +1\right ) y&=0 \\
\end{align*}
2.28.19.1 ✓ Maple. Time used: 0.004 (sec). Leaf size: 36
ode:=diff(diff(y(x),x),x)+(a*x+b)*diff(y(x),x)+c*((a-c)*x^2+b*x+1)*y(x) = 0;
dsolve(ode,y(x), singsol=all);
\[
y = {\mathrm e}^{-\frac {x^{2} c}{2}} \left (c_2 \,\operatorname {erf}\left (\frac {\left (-2 c +a \right ) x +b}{\sqrt {2 a -4 c}}\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
A Liouvillian solution exists
Reducible group (found an exponential solution)
Group is reducible, not completely reducible
<- Kovacics algorithm successful
Maple step by step
\[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & \frac {d^{2}}{d x^{2}}y \left (x \right )+\left (a x +b \right ) \left (\frac {d}{d x}y \left (x \right )\right )+c \left (\left (a -c \right ) x^{2}+b x +1\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 {Isolate 2nd derivative}\hspace {3pt} \\ {} & {} & \frac {d^{2}}{d x^{2}}y \left (x \right )=-c \left (x^{2} a -x^{2} c +b x +1\right ) y \left (x \right )-\left (a x +b \right ) \left (\frac {d}{d x}y \left (x \right )\right ) \\ \bullet & {} & \textrm {Group terms with}\hspace {3pt} y \left (x \right )\hspace {3pt}\textrm {on the lhs of the ODE and the rest on the rhs of the ODE; ODE is linear}\hspace {3pt} \\ {} & {} & \frac {d^{2}}{d x^{2}}y \left (x \right )+\left (a x +b \right ) \left (\frac {d}{d x}y \left (x \right )\right )+c \left (x^{2} a -x^{2} c +b x +1\right ) y \left (x \right )=0 \\ \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..2 \\ {} & {} & 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^{m}\cdot \left (\frac {d}{d x}y \left (x \right )\right )\hspace {3pt}\textrm {to series expansion for}\hspace {3pt} m =0..1 \\ {} & {} & x^{m}\cdot \left (\frac {d}{d x}y \left (x \right )\right )=\moverset {\infty }{\munderset {k =\max \left (0, 1-m \right )}{\sum }}a_{k} k \,x^{k -1+m} \\ {} & \circ & \textrm {Shift index using}\hspace {3pt} k \mathrm {->}k +1-m \\ {} & {} & x^{m}\cdot \left (\frac {d}{d x}y \left (x \right )\right )=\moverset {\infty }{\munderset {k =\max \left (0, 1-m \right )+m -1}{\sum }}a_{k +1-m} \left (k +1-m \right ) 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_{1} b +a_{0} c +2 a_{2}+\left (6 a_{3}+2 a_{2} b +a_{1} \left (a +c \right )+a_{0} b c \right ) x +\left (\moverset {\infty }{\munderset {k =2}{\sum }}\left (a_{k +2} \left (k +2\right ) \left (k +1\right )+a_{k +1} \left (k +1\right ) b +a_{k} \left (a k +c \right )+a_{k -1} b c +c a_{k -2} \left (a -c \right )\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_{1} b +a_{0} c =0, 6 a_{3}+2 a_{2} b +a_{1} \left (a +c \right )+a_{0} b c =0\right ] \\ \bullet & {} & \textrm {Solve for the dependent coefficient(s)}\hspace {3pt} \\ {} & {} & \left \{a_{2}=-\frac {a_{1} b}{2}-\frac {a_{0} c}{2}, a_{3}=\frac {1}{6} a_{1} b^{2}-\frac {1}{6} a_{1} a -\frac {1}{6} a_{1} c \right \} \\ \bullet & {} & \textrm {Each term in the series must be 0, giving the recursion relation}\hspace {3pt} \\ {} & {} & -c^{2} a_{k -2}+\left (a a_{k -2}+b a_{k -1}+a_{k}\right ) c +k^{2} a_{k +2}+\left (a a_{k}+a_{k +1} b +3 a_{k +2}\right ) k +a_{k +1} b +2 a_{k +2}=0 \\ \bullet & {} & \textrm {Shift index using}\hspace {3pt} k \mathrm {->}k +2 \\ {} & {} & -a_{k} c^{2}+\left (a a_{k}+a_{k +1} b +a_{k +2}\right ) c +\left (k +2\right )^{2} a_{k +4}+\left (a a_{k +2}+a_{k +3} b +3 a_{k +4}\right ) \left (k +2\right )+a_{k +3} b +2 a_{k +4}=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 +4}=-\frac {a c a_{k}+a k a_{k +2}+b c a_{k +1}+b k a_{k +3}-a_{k} c^{2}+2 a a_{k +2}+3 a_{k +3} b +c a_{k +2}}{k^{2}+7 k +12}, a_{2}=-\frac {a_{1} b}{2}-\frac {a_{0} c}{2}, a_{3}=\frac {1}{6} a_{1} b^{2}-\frac {1}{6} a_{1} a -\frac {1}{6} a_{1} c \right ] \end {array} \]
2.28.19.2 ✓ Mathematica. Time used: 0.048 (sec). Leaf size: 81
ode=D[y[x],{x,2}]+(a*x+b)*D[y[x],x]+c*((a-c)*x^2+b*x+1)*y[x]==0;
ic={};
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
\begin{align*} y(x)&\to e^{-\frac {1}{2} x (x (a-c)+2 b)} \left (c_1 \operatorname {HermiteH}\left (-1,\frac {b+(a-2 c) x}{\sqrt {2} \sqrt {a-2 c}}\right )+c_2 e^{\frac {(x (a-2 c)+b)^2}{2 (a-2 c)}}\right ) \end{align*}
2.28.19.3 ✗ Sympy
from sympy import *
x = symbols("x")
a = symbols("a")
b = symbols("b")
c = symbols("c")
y = Function("y")
ode = Eq(c*(b*x + x**2*(a - c) + 1)*y(x) + (a*x + b)*Derivative(y(x), x) + Derivative(y(x), (x, 2)),0)
ics = {}
dsolve(ode,func=y(x),ics=ics)
False
Python version: 3.12.3 (main, Aug 14 2025, 17:47:21) [GCC 13.3.0]
Sympy version 1.14.0
classify_ode(ode,func=y(x))
('factorable', '2nd_power_series_ordinary')