2.29.47 Problem 107

2.29.47.1 Maple
2.29.47.2 Mathematica
2.29.47.3 Sympy

Internal problem ID [13768]
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-3
Problem number : 107
Date solved : Friday, December 19, 2025 at 12:10:02 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

\begin{align*} \left (x a +b \right ) y^{\prime \prime }+s \left (c x +d \right ) y^{\prime }-s^{2} \left (\left (a +c \right ) x +b +d \right ) y&=0 \\ \end{align*}
2.29.47.1 Maple. Time used: 0.008 (sec). Leaf size: 166
ode:=(a*x+b)*diff(diff(y(x),x),x)+s*(c*x+d)*diff(y(x),x)-s^2*((a+c)*x+b+d)*y(x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {\left (\frac {s \left (2 a +c \right ) \left (a x +b \right )}{a^{2}}\right )^{\frac {d s a -c s b -a^{2}}{a^{2}}} \left (\left (\left (-c_1 +c_2 \right ) a^{2}+a d s c_1 -b c s c_1 \right ) \Gamma \left (\frac {-d s a +c s b +a^{2}}{a^{2}}, \frac {s \left (2 a +c \right ) \left (a x +b \right )}{a^{2}}\right )+\Gamma \left (\frac {-d s a +c s b +2 a^{2}}{a^{2}}\right ) c_1 \,a^{2}\right ) \left (a x +b \right )^{\frac {-d s a +c s b +a^{2}}{a^{2}}} {\mathrm e}^{\frac {s \left (a^{2} x +2 a b +b c \right )}{a^{2}}}}{a^{2}} \]

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 
   Solution has integrals. Trying a special function solution free of integrals\ 
... 
   -> 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 
      -> Trying to convert hypergeometric functions to elementary form... 
      <- elementary form could result into a too large expression - returning s\ 
pecial function form of solution, free of uncomputed integrals 
   <- Kovacics algorithm successful
 

Maple step by step

\[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & \left (a x +b \right ) \left (\frac {d^{2}}{d x^{2}}y \left (x \right )\right )+s \left (c x +d \right ) \left (\frac {d}{d x}y \left (x \right )\right )-s^{2} \left (\left (a +c \right ) x +b +d \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 )=\frac {s^{2} \left (a x +c x +b +d \right ) y \left (x \right )}{a x +b}-\frac {s \left (c x +d \right ) \left (\frac {d}{d x}y \left (x \right )\right )}{a x +b} \\ \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 {s \left (c x +d \right ) \left (\frac {d}{d x}y \left (x \right )\right )}{a x +b}-\frac {s^{2} \left (a x +c x +b +d \right ) y \left (x \right )}{a x +b}=0 \\ \square & {} & \textrm {Check to see if}\hspace {3pt} x_{0}=-\frac {b}{a}\hspace {3pt}\textrm {is a regular singular point}\hspace {3pt} \\ {} & \circ & \textrm {Define functions}\hspace {3pt} \\ {} & {} & \left [P_{2}\left (x \right )=\frac {\left (c x +d \right ) s}{a x +b}, P_{3}\left (x \right )=-\frac {s^{2} \left (a x +c x +b +d \right )}{a x +b}\right ] \\ {} & \circ & \left (x +\frac {b}{a}\right )\cdot P_{2}\left (x \right )\textrm {is analytic at}\hspace {3pt} x =-\frac {b}{a} \\ {} & {} & \left (\left (x +\frac {b}{a}\right )\cdot P_{2}\left (x \right )\right )\bigg | {\mstack {}{_{x \hiderel {=}-\frac {b}{a}}}}=\frac {\left (-\frac {c b}{a}+d \right ) s}{a} \\ {} & \circ & \left (x +\frac {b}{a}\right )^{2}\cdot P_{3}\left (x \right )\textrm {is analytic at}\hspace {3pt} x =-\frac {b}{a} \\ {} & {} & \left (\left (x +\frac {b}{a}\right )^{2}\cdot P_{3}\left (x \right )\right )\bigg | {\mstack {}{_{x \hiderel {=}-\frac {b}{a}}}}=0 \\ {} & \circ & x =-\frac {b}{a}\textrm {is a regular singular point}\hspace {3pt} \\ & {} & \textrm {Check to see if}\hspace {3pt} x_{0}=-\frac {b}{a}\hspace {3pt}\textrm {is a regular singular point}\hspace {3pt} \\ {} & {} & x_{0}=-\frac {b}{a} \\ \bullet & {} & \textrm {Multiply by denominators}\hspace {3pt} \\ {} & {} & \left (a x +b \right ) \left (\frac {d^{2}}{d x^{2}}y \left (x \right )\right )+s \left (c x +d \right ) \left (\frac {d}{d x}y \left (x \right )\right )-s^{2} \left (a x +c x +b +d \right ) y \left (x \right )=0 \\ \bullet & {} & \textrm {Change variables using}\hspace {3pt} x =u -\frac {b}{a}\hspace {3pt}\textrm {so that the regular singular point is at}\hspace {3pt} u =0 \\ {} & {} & a u \left (\frac {d^{2}}{d u^{2}}y \left (u \right )\right )+\left (s c u -\frac {c s b}{a}+s d \right ) \left (\frac {d}{d u}y \left (u \right )\right )+\left (-s^{2} a u -s^{2} c u +\frac {s^{2} b c}{a}-d \,s^{2}\right ) 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} u^{m}\cdot y \left (u \right )\hspace {3pt}\textrm {to series expansion for}\hspace {3pt} m =0..1 \\ {} & {} & u^{m}\cdot y \left (u \right )=\moverset {\infty }{\munderset {k =0}{\sum }}a_{k} u^{k +r +m} \\ {} & \circ & \textrm {Shift index using}\hspace {3pt} k \mathrm {->}k -m \\ {} & {} & u^{m}\cdot y \left (u \right )=\moverset {\infty }{\munderset {k =m}{\sum }}a_{k -m} u^{k +r} \\ {} & \circ & \textrm {Convert}\hspace {3pt} u^{m}\cdot \left (\frac {d}{d u}y \left (u \right )\right )\hspace {3pt}\textrm {to series expansion for}\hspace {3pt} m =0..1 \\ {} & {} & u^{m}\cdot \left (\frac {d}{d u}y \left (u \right )\right )=\moverset {\infty }{\munderset {k =0}{\sum }}a_{k} \left (k +r \right ) u^{k +r -1+m} \\ {} & \circ & \textrm {Shift index using}\hspace {3pt} k \mathrm {->}k +1-m \\ {} & {} & u^{m}\cdot \left (\frac {d}{d u}y \left (u \right )\right )=\moverset {\infty }{\munderset {k =-1+m}{\sum }}a_{k +1-m} \left (k +1-m +r \right ) u^{k +r} \\ {} & \circ & \textrm {Convert}\hspace {3pt} u \cdot \left (\frac {d^{2}}{d u^{2}}y \left (u \right )\right )\hspace {3pt}\textrm {to series expansion}\hspace {3pt} \\ {} & {} & u \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 -1} \\ {} & \circ & \textrm {Shift index using}\hspace {3pt} k \mathrm {->}k +1 \\ {} & {} & u \cdot \left (\frac {d^{2}}{d u^{2}}y \left (u \right )\right )=\moverset {\infty }{\munderset {k =-1}{\sum }}a_{k +1} \left (k +1+r \right ) \left (k +r \right ) u^{k +r} \\ & {} & \textrm {Rewrite ODE with series expansions}\hspace {3pt} \\ {} & {} & \frac {a_{0} r \left (a^{2} r +s d a -c s b -a^{2}\right ) u^{-1+r}}{a}+\left (\frac {a_{1} \left (1+r \right ) \left (a^{2} r +s d a -c s b \right )}{a}+\frac {a_{0} s \left (a c r -s d a +c s b \right )}{a}\right ) u^{r}+\left (\moverset {\infty }{\munderset {k =1}{\sum }}\left (\frac {a_{k +1} \left (k +1+r \right ) \left (a^{2} \left (k +1\right )+a^{2} r +s d a -c s b -a^{2}\right )}{a}+\frac {a_{k} s \left (a c k +a c r -s d a +c s b \right )}{a}-s^{2} a_{k -1} \left (a +c \right )\right ) u^{k +r}\right )=0 \\ \bullet & {} & a_{0}\textrm {cannot be 0 by assumption, giving the indicial equation}\hspace {3pt} \\ {} & {} & \frac {r \left (a^{2} r +s d a -c s b -a^{2}\right )}{a}=0 \\ \bullet & {} & \textrm {Values of r that satisfy the indicial equation}\hspace {3pt} \\ {} & {} & r \in \left \{0, \frac {-s d a +c s b +a^{2}}{a^{2}}\right \} \\ \bullet & {} & \textrm {Each term must be 0}\hspace {3pt} \\ {} & {} & \frac {a_{1} \left (1+r \right ) \left (a^{2} r +s d a -c s b \right )}{a}+\frac {a_{0} s \left (a c r -s d a +c s b \right )}{a}=0 \\ \bullet & {} & \textrm {Each term in the series must be 0, giving the recursion relation}\hspace {3pt} \\ {} & {} & \frac {\left (-a_{k -1} s^{2}+a_{k +1} \left (k +1+r \right ) \left (k +r \right )\right ) a^{2}+s \left (\left (-c a_{k -1}-d a_{k}\right ) s +d \left (k +1+r \right ) a_{k +1}+c a_{k} \left (k +r \right )\right ) a -c b s \left (-a_{k} s +a_{k +1} \left (k +1+r \right )\right )}{a}=0 \\ \bullet & {} & \textrm {Shift index using}\hspace {3pt} k \mathrm {->}k +1 \\ {} & {} & \frac {\left (-s^{2} a_{k}+a_{k +2} \left (k +2+r \right ) \left (k +1+r \right )\right ) a^{2}+s \left (\left (-c a_{k}-d a_{k +1}\right ) s +d \left (k +2+r \right ) a_{k +2}+c a_{k +1} \left (k +1+r \right )\right ) a -c b s \left (-a_{k +1} s +a_{k +2} \left (k +2+r \right )\right )}{a}=0 \\ \bullet & {} & \textrm {Recursion relation that defines series solution to ODE}\hspace {3pt} \\ {} & {} & a_{k +2}=\frac {s \left (a^{2} s a_{k}-a c k a_{k +1}-a c r a_{k +1}+a c s a_{k}+a d s a_{k +1}-b c s a_{k +1}-a c a_{k +1}\right )}{\left (k +2+r \right ) \left (a^{2} k +a^{2} r +s d a -c s b +a^{2}\right )} \\ \bullet & {} & \textrm {Recursion relation for}\hspace {3pt} r =0 \\ {} & {} & a_{k +2}=\frac {s \left (a^{2} s a_{k}-a c k a_{k +1}+a c s a_{k}+a d s a_{k +1}-b c s a_{k +1}-a c a_{k +1}\right )}{\left (k +2\right ) \left (a^{2} k +s d a -c s b +a^{2}\right )} \\ \bullet & {} & \textrm {Solution for}\hspace {3pt} r =0 \\ {} & {} & \left [y \left (u \right )=\moverset {\infty }{\munderset {k =0}{\sum }}a_{k} u^{k}, a_{k +2}=\frac {s \left (a^{2} s a_{k}-a c k a_{k +1}+a c s a_{k}+a d s a_{k +1}-b c s a_{k +1}-a c a_{k +1}\right )}{\left (k +2\right ) \left (a^{2} k +s d a -c s b +a^{2}\right )}, \frac {a_{1} \left (s d a -c s b \right )}{a}+\frac {a_{0} s \left (-s d a +c s b \right )}{a}=0\right ] \\ \bullet & {} & \textrm {Revert the change of variables}\hspace {3pt} u =x +\frac {b}{a} \\ {} & {} & \left [y \left (x \right )=\moverset {\infty }{\munderset {k =0}{\sum }}a_{k} \left (x +\frac {b}{a}\right )^{k}, a_{k +2}=\frac {s \left (a^{2} s a_{k}-a c k a_{k +1}+a c s a_{k}+a d s a_{k +1}-b c s a_{k +1}-a c a_{k +1}\right )}{\left (k +2\right ) \left (a^{2} k +s d a -c s b +a^{2}\right )}, \frac {a_{1} \left (s d a -c s b \right )}{a}+\frac {a_{0} s \left (-s d a +c s b \right )}{a}=0\right ] \\ \bullet & {} & \textrm {Recursion relation for}\hspace {3pt} r =\frac {-s d a +c s b +a^{2}}{a^{2}} \\ {} & {} & a_{k +2}=\frac {s \left (a^{2} s a_{k}-a c k a_{k +1}-\frac {c \left (-s d a +c s b +a^{2}\right ) a_{k +1}}{a}+a c s a_{k}+a d s a_{k +1}-b c s a_{k +1}-a c a_{k +1}\right )}{\left (k +2+\frac {-s d a +c s b +a^{2}}{a^{2}}\right ) \left (a^{2} k +2 a^{2}\right )} \\ \bullet & {} & \textrm {Solution for}\hspace {3pt} r =\frac {-s d a +c s b +a^{2}}{a^{2}} \\ {} & {} & \left [y \left (u \right )=\moverset {\infty }{\munderset {k =0}{\sum }}a_{k} u^{k +\frac {-s d a +c s b +a^{2}}{a^{2}}}, a_{k +2}=\frac {s \left (a^{2} s a_{k}-a c k a_{k +1}-\frac {c \left (-s d a +c s b +a^{2}\right ) a_{k +1}}{a}+a c s a_{k}+a d s a_{k +1}-b c s a_{k +1}-a c a_{k +1}\right )}{\left (k +2+\frac {-s d a +c s b +a^{2}}{a^{2}}\right ) \left (a^{2} k +2 a^{2}\right )}, a_{1} \left (1+\frac {-s d a +c s b +a^{2}}{a^{2}}\right ) a +\frac {a_{0} s \left (\frac {c \left (-s d a +c s b +a^{2}\right )}{a}-s d a +c s b \right )}{a}=0\right ] \\ \bullet & {} & \textrm {Revert the change of variables}\hspace {3pt} u =x +\frac {b}{a} \\ {} & {} & \left [y \left (x \right )=\moverset {\infty }{\munderset {k =0}{\sum }}a_{k} \left (x +\frac {b}{a}\right )^{k +\frac {-s d a +c s b +a^{2}}{a^{2}}}, a_{k +2}=\frac {s \left (a^{2} s a_{k}-a c k a_{k +1}-\frac {c \left (-s d a +c s b +a^{2}\right ) a_{k +1}}{a}+a c s a_{k}+a d s a_{k +1}-b c s a_{k +1}-a c a_{k +1}\right )}{\left (k +2+\frac {-s d a +c s b +a^{2}}{a^{2}}\right ) \left (a^{2} k +2 a^{2}\right )}, a_{1} \left (1+\frac {-s d a +c s b +a^{2}}{a^{2}}\right ) a +\frac {a_{0} s \left (\frac {c \left (-s d a +c s b +a^{2}\right )}{a}-s d a +c s b \right )}{a}=0\right ] \\ \bullet & {} & \textrm {Combine solutions and rename parameters}\hspace {3pt} \\ {} & {} & \left [y \left (x \right )=\left (\moverset {\infty }{\munderset {k =0}{\sum }}e_{k} \left (x +\frac {b}{a}\right )^{k}\right )+\left (\moverset {\infty }{\munderset {k =0}{\sum }}f_{k} \left (x +\frac {b}{a}\right )^{k +\frac {-s d a +c s b +a^{2}}{a^{2}}}\right ), e_{k +2}=\frac {s \left (a^{2} s e_{k}-a c k e_{k +1}+a c s e_{k}+a d s e_{k +1}-b c s e_{k +1}-a c e_{k +1}\right )}{\left (k +2\right ) \left (a^{2} k +s d a -c s b +a^{2}\right )}, \frac {e_{1} \left (s d a -c s b \right )}{a}+\frac {e_{0} s \left (-s d a +c s b \right )}{a}=0, f_{k +2}=\frac {s \left (a^{2} s f_{k}-a c k f_{k +1}-\frac {c \left (-s d a +c s b +a^{2}\right ) f_{k +1}}{a}+a c s f_{k}+a d s f_{k +1}-b c s f_{k +1}-a c f_{k +1}\right )}{\left (k +2+\frac {-s d a +c s b +a^{2}}{a^{2}}\right ) \left (a^{2} k +2 a^{2}\right )}, f_{1} \left (1+\frac {-s d a +c s b +a^{2}}{a^{2}}\right ) a +\frac {f_{0} s \left (\frac {c \left (-s d a +c s b +a^{2}\right )}{a}-s d a +c s b \right )}{a}=0\right ] \end {array} \]
2.29.47.2 Mathematica. Time used: 0.985 (sec). Leaf size: 122
ode=(a*x+b)*D[y[x],{x,2}]+s*(c*x+d)*D[y[x],x]-s^2*((a+c)*x+b+d)*y[x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to c_1 e^{s x}-\frac {c_2 e^{s \left (\frac {b (2 a+c)}{a^2}+x\right )} (a x+b)^{\frac {s (b c-a d)}{a^2}+1} \left (\frac {s (2 a+c) (a x+b)}{a^2}\right )^{\frac {s (a d-b c)}{a^2}-1} \Gamma \left (\frac {a^2-d s a+b c s}{a^2},\frac {(2 a+c) s (b+a x)}{a^2}\right )}{a} \end{align*}
2.29.47.3 Sympy
from sympy import * 
x = symbols("x") 
a = symbols("a") 
b = symbols("b") 
c = symbols("c") 
d = symbols("d") 
s = symbols("s") 
y = Function("y") 
ode = Eq(-s**2*(b + d + x*(a + c))*y(x) + s*(c*x + d)*Derivative(y(x), x) + (a*x + b)*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')