2.31.2 Problem 150

2.31.2.1 Maple
2.31.2.2 Mathematica
2.31.2.3 Sympy

Internal problem ID [13811]
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-5
Problem number : 150
Date solved : Friday, December 19, 2025 at 01:05:18 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

\begin{align*} \left (-a^{2}+x^{2}\right ) y^{\prime \prime }+b y^{\prime }-6 y&=0 \\ \end{align*}
2.31.2.1 Maple. Time used: 0.005 (sec). Leaf size: 76
ode:=(-a^2+x^2)*diff(diff(y(x),x),x)+b*diff(y(x),x)-6*y(x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = -\frac {c_1 \left (10 a^{2} b +24 a^{2} x -b^{3}-6 b^{2} x -18 b \,x^{2}-24 x^{3}\right )}{24}+c_2 \left (a -x \right ) \left (a +x \right ) \left (b -4 x \right ) \left (\frac {a +x}{a -x}\right )^{\frac {b}{2 a}} \]

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) 
   Reducible group (found another exponential solution) 
<- Kovacics algorithm successful
 

Maple step by step

\[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & \left (-a^{2}+x^{2}\right ) \left (\frac {d^{2}}{d x^{2}}y \left (x \right )\right )+b \left (\frac {d}{d x}y \left (x \right )\right )-6 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 )=-\frac {6 y \left (x \right )}{a^{2}-x^{2}}+\frac {b \left (\frac {d}{d x}y \left (x \right )\right )}{a^{2}-x^{2}} \\ \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 )-\frac {b \left (\frac {d}{d x}y \left (x \right )\right )}{a^{2}-x^{2}}+\frac {6 y \left (x \right )}{a^{2}-x^{2}}=0 \\ \square & {} & \textrm {Check to see if}\hspace {3pt} x_{0}\hspace {3pt}\textrm {is a regular singular point}\hspace {3pt} \\ {} & \circ & \textrm {Define functions}\hspace {3pt} \\ {} & {} & \left [P_{2}\left (x \right )=-\frac {b}{a^{2}-x^{2}}, P_{3}\left (x \right )=\frac {6}{a^{2}-x^{2}}\right ] \\ {} & \circ & \left (-a +x \right )\cdot P_{2}\left (x \right )\textrm {is analytic at}\hspace {3pt} x =a \\ {} & {} & \left (\left (-a +x \right )\cdot P_{2}\left (x \right )\right )\bigg | {\mstack {}{_{x \hiderel {=}a}}}=\frac {b}{2 a} \\ {} & \circ & \left (-a +x \right )^{2}\cdot P_{3}\left (x \right )\textrm {is analytic at}\hspace {3pt} x =a \\ {} & {} & \left (\left (-a +x \right )^{2}\cdot P_{3}\left (x \right )\right )\bigg | {\mstack {}{_{x \hiderel {=}a}}}=0 \\ {} & \circ & x =a \textrm {is a regular singular point}\hspace {3pt} \\ & {} & \textrm {Check to see if}\hspace {3pt} x_{0}\hspace {3pt}\textrm {is a regular singular point}\hspace {3pt} \\ {} & {} & x_{0}=a \\ \bullet & {} & \textrm {Multiply by denominators}\hspace {3pt} \\ {} & {} & \left (a^{2}-x^{2}\right ) \left (\frac {d^{2}}{d x^{2}}y \left (x \right )\right )-b \left (\frac {d}{d x}y \left (x \right )\right )+6 y \left (x \right )=0 \\ \bullet & {} & \textrm {Change variables using}\hspace {3pt} x =u +a \hspace {3pt}\textrm {so that the regular singular point is at}\hspace {3pt} u =0 \\ {} & {} & \left (-2 a u -u^{2}\right ) \left (\frac {d^{2}}{d u^{2}}y \left (u \right )\right )-b \left (\frac {d}{d u}y \left (u \right )\right )+6 y \left (u \right )=0 \\ \bullet & {} & \textrm {Assume series solution for}\hspace {3pt} y \left (u \right ) \\ {} & {} & y \left (u \right )=\moverset {\infty }{\munderset {k =0}{\sum }}a_{k} u^{k +r} \\ \square & {} & \textrm {Rewrite ODE with series expansions}\hspace {3pt} \\ {} & \circ & \textrm {Convert}\hspace {3pt} \frac {d}{d u}y \left (u \right )\hspace {3pt}\textrm {to series expansion}\hspace {3pt} \\ {} & {} & \frac {d}{d u}y \left (u \right )=\moverset {\infty }{\munderset {k =0}{\sum }}a_{k} \left (k +r \right ) u^{k +r -1} \\ {} & \circ & \textrm {Shift index using}\hspace {3pt} k \mathrm {->}k +1 \\ {} & {} & \frac {d}{d u}y \left (u \right )=\moverset {\infty }{\munderset {k =-1}{\sum }}a_{k +1} \left (k +1+r \right ) u^{k +r} \\ {} & \circ & \textrm {Convert}\hspace {3pt} u^{m}\cdot \left (\frac {d^{2}}{d u^{2}}y \left (u \right )\right )\hspace {3pt}\textrm {to series expansion for}\hspace {3pt} m =1..2 \\ {} & {} & u^{m}\cdot \left (\frac {d^{2}}{d u^{2}}y \left (u \right )\right )=\moverset {\infty }{\munderset {k =0}{\sum }}a_{k} \left (k +r \right ) \left (k +r -1\right ) u^{k +r -2+m} \\ {} & \circ & \textrm {Shift index using}\hspace {3pt} k \mathrm {->}k +2-m \\ {} & {} & u^{m}\cdot \left (\frac {d^{2}}{d u^{2}}y \left (u \right )\right )=\moverset {\infty }{\munderset {k =-2+m}{\sum }}a_{k +2-m} \left (k +2-m +r \right ) \left (k +1-m +r \right ) u^{k +r} \\ & {} & \textrm {Rewrite ODE with series expansions}\hspace {3pt} \\ {} & {} & -a_{0} r \left (2 a r -2 a +b \right ) u^{r -1}+\left (\moverset {\infty }{\munderset {k =0}{\sum }}\left (-a_{k +1} \left (k +1+r \right ) \left (2 a \left (k +1\right )+2 a r -2 a +b \right )-a_{k} \left (k +r +2\right ) \left (k +r -3\right )\right ) u^{k +r}\right )=0 \\ \bullet & {} & a_{0}\textrm {cannot be 0 by assumption, giving the indicial equation}\hspace {3pt} \\ {} & {} & -r \left (2 a r -2 a +b \right )=0 \\ \bullet & {} & \textrm {Values of r that satisfy the indicial equation}\hspace {3pt} \\ {} & {} & r \in \left \{0, \frac {2 a -b}{2 a}\right \} \\ \bullet & {} & \textrm {Each term in the series must be 0, giving the recursion relation}\hspace {3pt} \\ {} & {} & -2 \left (k +1+r \right ) \left (a k +a r +\frac {1}{2} b \right ) a_{k +1}-a_{k} \left (k +r +2\right ) \left (k +r -3\right )=0 \\ \bullet & {} & \textrm {Recursion relation that defines series solution to ODE}\hspace {3pt} \\ {} & {} & a_{k +1}=-\frac {a_{k} \left (k +r +2\right ) \left (k +r -3\right )}{\left (k +1+r \right ) \left (2 a k +2 a r +b \right )} \\ \bullet & {} & \textrm {Recursion relation for}\hspace {3pt} r =0\hspace {3pt}\textrm {; series terminates at}\hspace {3pt} k =3 \\ {} & {} & a_{k +1}=-\frac {a_{k} \left (k +2\right ) \left (k -3\right )}{\left (k +1\right ) \left (2 a k +b \right )} \\ \bullet & {} & \textrm {Apply recursion relation for}\hspace {3pt} k =0 \\ {} & {} & a_{1}=\frac {6 a_{0}}{b} \\ \bullet & {} & \textrm {Apply recursion relation for}\hspace {3pt} k =1 \\ {} & {} & a_{2}=\frac {3 a_{1}}{2 a +b} \\ \bullet & {} & \textrm {Express in terms of}\hspace {3pt} a_{0} \\ {} & {} & a_{2}=\frac {18 a_{0}}{b \left (2 a +b \right )} \\ \bullet & {} & \textrm {Apply recursion relation for}\hspace {3pt} k =2 \\ {} & {} & a_{3}=\frac {4 a_{2}}{3 \left (4 a +b \right )} \\ \bullet & {} & \textrm {Express in terms of}\hspace {3pt} a_{0} \\ {} & {} & a_{3}=\frac {24 a_{0}}{b \left (2 a +b \right ) \left (4 a +b \right )} \\ \bullet & {} & \textrm {Terminating series solution of the ODE for}\hspace {3pt} r =0\hspace {3pt}\textrm {. Use reduction of order to find the second linearly independent solution}\hspace {3pt} \\ {} & {} & y \left (u \right )=a_{0}\cdot \left (1+\frac {6 u}{b}+\frac {18 u^{2}}{b \left (2 a +b \right )}+\frac {24 u^{3}}{b \left (2 a +b \right ) \left (4 a +b \right )}\right ) \\ \bullet & {} & \textrm {Revert the change of variables}\hspace {3pt} u =-a +x \\ {} & {} & \left [y \left (x \right )=\frac {a_{0} \left (-10 a^{2} b -24 a^{2} x +b^{3}+6 b^{2} x +18 b \,x^{2}+24 x^{3}\right )}{b \left (2 a +b \right ) \left (4 a +b \right )}\right ] \\ \bullet & {} & \textrm {Recursion relation for}\hspace {3pt} r =\frac {2 a -b}{2 a} \\ {} & {} & a_{k +1}=-\frac {a_{k} \left (k +\frac {2 a -b}{2 a}+2\right ) \left (k +\frac {2 a -b}{2 a}-3\right )}{\left (k +1+\frac {2 a -b}{2 a}\right ) \left (2 a k +2 a \right )} \\ \bullet & {} & \textrm {Solution for}\hspace {3pt} r =\frac {2 a -b}{2 a} \\ {} & {} & \left [y \left (u \right )=\moverset {\infty }{\munderset {k =0}{\sum }}a_{k} u^{k +\frac {2 a -b}{2 a}}, a_{k +1}=-\frac {a_{k} \left (k +\frac {2 a -b}{2 a}+2\right ) \left (k +\frac {2 a -b}{2 a}-3\right )}{\left (k +1+\frac {2 a -b}{2 a}\right ) \left (2 a k +2 a \right )}\right ] \\ \bullet & {} & \textrm {Revert the change of variables}\hspace {3pt} u =-a +x \\ {} & {} & \left [y \left (x \right )=\moverset {\infty }{\munderset {k =0}{\sum }}a_{k} \left (-a +x \right )^{k +\frac {2 a -b}{2 a}}, a_{k +1}=-\frac {a_{k} \left (k +\frac {2 a -b}{2 a}+2\right ) \left (k +\frac {2 a -b}{2 a}-3\right )}{\left (k +1+\frac {2 a -b}{2 a}\right ) \left (2 a k +2 a \right )}\right ] \\ \bullet & {} & \textrm {Combine solutions and rename parameters}\hspace {3pt} \\ {} & {} & \left [y \left (x \right )=\frac {c_{0} \left (-10 a^{2} b -24 a^{2} x +b^{3}+6 b^{2} x +18 b \,x^{2}+24 x^{3}\right )}{b \left (2 a +b \right ) \left (4 a +b \right )}+\left (\moverset {\infty }{\munderset {k =0}{\sum }}d_{k} \left (-a +x \right )^{k +\frac {2 a -b}{2 a}}\right ), d_{k +1}=-\frac {d_{k} \left (k +\frac {2 a -b}{2 a}+2\right ) \left (k +\frac {2 a -b}{2 a}-3\right )}{\left (k +1+\frac {2 a -b}{2 a}\right ) \left (2 a k +2 a \right )}\right ] \end {array} \]
2.31.2.2 Mathematica. Time used: 49.523 (sec). Leaf size: 1171
ode=(x^2-a^2)*D[y[x],{x,2}]+b*D[y[x],x]-6*y[x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} \text {Solution too large to show}\end{align*}
2.31.2.3 Sympy
from sympy import * 
x = symbols("x") 
a = symbols("a") 
b = symbols("b") 
y = Function("y") 
ode = Eq(b*Derivative(y(x), x) + (-a**2 + x**2)*Derivative(y(x), (x, 2)) - 6*y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
False