30.32 problem 180

30.32.1 Maple step by step solution

Internal problem ID [11003]
Internal file name [OUTPUT/10260_Sunday_December_31_2023_11_33_20_AM_7107991/index.tex]

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 Equation of form \((a x^2+b x+c) y''+f(x)y'+g(x)y=0\)
Problem number: 180.
ODE order: 2.
ODE degree: 1.

The type(s) of ODE detected by this program : "unknown"

Maple gives the following as the ode type

[[_2nd_order, _with_linear_symmetries]]

Unable to solve or complete the solution.

\[ \boxed {\left (a \,x^{2}+b x +c \right ) y^{\prime \prime }-\left (-k^{2}+x^{2}\right ) y^{\prime }+\left (x +k \right ) y=0} \]

30.32.1 Maple step by step solution

\[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & \left (a \,x^{2}+b x +c \right ) \left (\frac {d}{d x}y^{\prime }\right )+\left (k^{2}-x^{2}\right ) y^{\prime }+\left (x +k \right ) y=0 \\ \bullet & {} & \textrm {Highest derivative means the order of the ODE is}\hspace {3pt} 2 \\ {} & {} & \frac {d}{d x}y^{\prime } \\ \bullet & {} & \textrm {Isolate 2nd derivative}\hspace {3pt} \\ {} & {} & \frac {d}{d x}y^{\prime }=-\frac {\left (x +k \right ) y}{a \,x^{2}+b x +c}-\frac {\left (k^{2}-x^{2}\right ) y^{\prime }}{a \,x^{2}+b x +c} \\ \bullet & {} & \textrm {Group terms with}\hspace {3pt} y\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}{d x}y^{\prime }+\frac {\left (k^{2}-x^{2}\right ) y^{\prime }}{a \,x^{2}+b x +c}+\frac {\left (x +k \right ) y}{a \,x^{2}+b x +c}=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 {k^{2}-x^{2}}{a \,x^{2}+b x +c}, P_{3}\left (x \right )=\frac {x +k}{a \,x^{2}+b x +c}\right ] \\ {} & \circ & \left (x -\frac {-b +\sqrt {-4 a c +b^{2}}}{2 a}\right )\cdot P_{2}\left (x \right )\textrm {is analytic at}\hspace {3pt} x =\frac {-b +\sqrt {-4 a c +b^{2}}}{2 a} \\ {} & {} & \left (\left (x -\frac {-b +\sqrt {-4 a c +b^{2}}}{2 a}\right )\cdot P_{2}\left (x \right )\right )\bigg | {\mstack {}{_{x \hiderel {=}\frac {-b +\sqrt {-4 a c +b^{2}}}{2 a}}}}=0 \\ {} & \circ & {\left (x -\frac {-b +\sqrt {-4 a c +b^{2}}}{2 a}\right )}^{2}\cdot P_{3}\left (x \right )\textrm {is analytic at}\hspace {3pt} x =\frac {-b +\sqrt {-4 a c +b^{2}}}{2 a} \\ {} & {} & \left ({\left (x -\frac {-b +\sqrt {-4 a c +b^{2}}}{2 a}\right )}^{2}\cdot P_{3}\left (x \right )\right )\bigg | {\mstack {}{_{x \hiderel {=}\frac {-b +\sqrt {-4 a c +b^{2}}}{2 a}}}}=0 \\ {} & \circ & x =\frac {-b +\sqrt {-4 a c +b^{2}}}{2 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}=\frac {-b +\sqrt {-4 a c +b^{2}}}{2 a} \\ \bullet & {} & \textrm {Multiply by denominators}\hspace {3pt} \\ {} & {} & \left (a \,x^{2}+b x +c \right ) \left (\frac {d}{d x}y^{\prime }\right )+\left (k^{2}-x^{2}\right ) y^{\prime }+\left (x +k \right ) y=0 \\ \bullet & {} & \textrm {Change variables using}\hspace {3pt} x =u +\frac {-b +\sqrt {-4 a c +b^{2}}}{2 a}\hspace {3pt}\textrm {so that the regular singular point is at}\hspace {3pt} u =0 \\ {} & {} & \left (a \,u^{2}+u \sqrt {-4 a c +b^{2}}\right ) \left (\frac {d}{d u}\frac {d}{d u}y \left (u \right )\right )+\left (k^{2}-u^{2}+\frac {u b}{a}-\frac {u \sqrt {-4 a c +b^{2}}}{a}-\frac {b^{2}}{2 a^{2}}+\frac {b \sqrt {-4 a c +b^{2}}}{2 a^{2}}+\frac {c}{a}\right ) \left (\frac {d}{d u}y \left (u \right )\right )+\left (u -\frac {b}{2 a}+\frac {\sqrt {-4 a c +b^{2}}}{2 a}+k \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..2 \\ {} & {} & 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^{m}\cdot \left (\frac {d}{d u}\frac {d}{d u}y \left (u \right )\right )\hspace {3pt}\textrm {to series expansion for}\hspace {3pt} m =1..2 \\ {} & {} & u^{m}\cdot \left (\frac {d}{d u}\frac {d}{d u}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}{d u}\frac {d}{d u}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} \\ {} & {} & \frac {a_{0} r \left (2 \sqrt {-4 a c +b^{2}}\, a^{2} r +2 a^{2} k^{2}-2 \sqrt {-4 a c +b^{2}}\, a^{2}+b \sqrt {-4 a c +b^{2}}+2 a c -b^{2}\right ) u^{-1+r}}{2 a^{2}}+\left (\frac {a_{1} \left (1+r \right ) \left (2 \sqrt {-4 a c +b^{2}}\, a^{2} r +2 a^{2} k^{2}+b \sqrt {-4 a c +b^{2}}+2 a c -b^{2}\right )}{2 a^{2}}-\frac {a_{0} \left (-2 a^{2} r^{2}+2 a^{2} r +2 \sqrt {-4 a c +b^{2}}\, r -2 a k -2 b r -\sqrt {-4 a c +b^{2}}+b \right )}{2 a}\right ) u^{r}+\left (\moverset {\infty }{\munderset {k =1}{\sum }}\left (\frac {a_{k +1} \left (k +1+r \right ) \left (2 \sqrt {-4 a c +b^{2}}\, a^{2} \left (k +1\right )+2 \sqrt {-4 a c +b^{2}}\, a^{2} r +2 a^{2} k^{2}-2 \sqrt {-4 a c +b^{2}}\, a^{2}+b \sqrt {-4 a c +b^{2}}+2 a c -b^{2}\right )}{2 a^{2}}-\frac {a_{k} \left (-2 a^{2} k^{2}-4 a^{2} k r -2 a^{2} r^{2}+2 a^{2} k +2 a^{2} r +2 \sqrt {-4 a c +b^{2}}\, k +2 \sqrt {-4 a c +b^{2}}\, r -2 a k -2 b k -2 b r -\sqrt {-4 a c +b^{2}}+b \right )}{2 a}-a_{k -1} \left (k -2+r \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 (2 \sqrt {-4 a c +b^{2}}\, a^{2} r +2 a^{2} k^{2}-2 \sqrt {-4 a c +b^{2}}\, a^{2}+b \sqrt {-4 a c +b^{2}}+2 a c -b^{2}\right )}{2 a^{2}}=0 \\ \bullet & {} & \textrm {Values of r that satisfy the indicial equation}\hspace {3pt} \\ {} & {} & r \in \left \{0, \frac {-2 a^{2} k^{2}+2 \sqrt {-4 a c +b^{2}}\, a^{2}-b \sqrt {-4 a c +b^{2}}-2 a c +b^{2}}{2 \sqrt {-4 a c +b^{2}}\, a^{2}}\right \} \\ \bullet & {} & \textrm {Each term must be 0}\hspace {3pt} \\ {} & {} & \frac {a_{1} \left (1+r \right ) \left (2 \sqrt {-4 a c +b^{2}}\, a^{2} r +2 a^{2} k^{2}+b \sqrt {-4 a c +b^{2}}+2 a c -b^{2}\right )}{2 a^{2}}-\frac {a_{0} \left (-2 a^{2} r^{2}+2 a^{2} r +2 \sqrt {-4 a c +b^{2}}\, r -2 a k -2 b r -\sqrt {-4 a c +b^{2}}+b \right )}{2 a}=0 \\ \bullet & {} & \textrm {Each term in the series must be 0, giving the recursion relation}\hspace {3pt} \\ {} & {} & \frac {\left (2 a_{k +1} \left (k +1+r \right ) \left (k +r \right ) a^{2}-2 a_{k} \left (k +r -\frac {1}{2}\right ) a +b a_{k +1} \left (k +1+r \right )\right ) \sqrt {-4 a c +b^{2}}+2 a_{k} \left (k +r \right ) \left (k +r -1\right ) a^{3}+\left (2 k^{2} \left (k +1+r \right ) a_{k +1}+2 a_{k} k -2 k a_{k -1}-2 r a_{k -1}+4 a_{k -1}\right ) a^{2}+\left (2 c \left (k +1+r \right ) a_{k +1}+2 b a_{k} \left (k +r -\frac {1}{2}\right )\right ) a -a_{k +1} b^{2} \left (k +1+r \right )}{2 a^{2}}=0 \\ \bullet & {} & \textrm {Shift index using}\hspace {3pt} k \mathrm {->}k +1 \\ {} & {} & \frac {\left (2 a_{k +2} \left (k +2+r \right ) \left (k +1+r \right ) a^{2}-2 a_{k +1} \left (k +\frac {1}{2}+r \right ) a +b a_{k +2} \left (k +2+r \right )\right ) \sqrt {-4 a c +b^{2}}+2 a_{k +1} \left (k +1+r \right ) \left (k +r \right ) a^{3}+\left (2 k^{2} \left (k +2+r \right ) a_{k +2}+2 a_{k +1} k -2 \left (k +1\right ) a_{k}-2 r a_{k}+4 a_{k}\right ) a^{2}+\left (2 c \left (k +2+r \right ) a_{k +2}+2 b a_{k +1} \left (k +\frac {1}{2}+r \right )\right ) a -a_{k +2} b^{2} \left (k +2+r \right )}{2 a^{2}}=0 \\ \bullet & {} & \textrm {Recursion relation that defines series solution to ODE}\hspace {3pt} \\ {} & {} & a_{k +2}=\frac {a \left (-2 a^{2} k^{2} a_{k +1}-4 a^{2} k r a_{k +1}-2 a^{2} r^{2} a_{k +1}-2 a^{2} k a_{k +1}-2 a^{2} r a_{k +1}+2 \sqrt {-4 a c +b^{2}}\, k a_{k +1}+2 \sqrt {-4 a c +b^{2}}\, r a_{k +1}-2 a k a_{k +1}+2 a k a_{k}+2 a r a_{k}-2 b k a_{k +1}-2 b r a_{k +1}+\sqrt {-4 a c +b^{2}}\, a_{k +1}-2 a_{k} a -b a_{k +1}\right )}{4 \sqrt {-4 a c +b^{2}}\, a^{2}+2 b \sqrt {-4 a c +b^{2}}+2 a^{2} k^{2} k +2 a^{2} k^{2} r +2 a c k +2 a c r +2 \sqrt {-4 a c +b^{2}}\, a^{2} k^{2}+2 \sqrt {-4 a c +b^{2}}\, a^{2} r^{2}+6 \sqrt {-4 a c +b^{2}}\, a^{2} k +6 \sqrt {-4 a c +b^{2}}\, a^{2} r +\sqrt {-4 a c +b^{2}}\, b k +\sqrt {-4 a c +b^{2}}\, b r -2 b^{2}-b^{2} k -b^{2} r +4 a^{2} k^{2}+4 a c +4 \sqrt {-4 a c +b^{2}}\, a^{2} k r} \\ \bullet & {} & \textrm {Recursion relation for}\hspace {3pt} r =0 \\ {} & {} & a_{k +2}=\frac {a \left (-2 a^{2} k^{2} a_{k +1}-2 a^{2} k a_{k +1}+2 \sqrt {-4 a c +b^{2}}\, k a_{k +1}-2 a k a_{k +1}+2 a k a_{k}-2 b k a_{k +1}+\sqrt {-4 a c +b^{2}}\, a_{k +1}-2 a_{k} a -b a_{k +1}\right )}{4 \sqrt {-4 a c +b^{2}}\, a^{2}+2 b \sqrt {-4 a c +b^{2}}+2 a^{2} k^{2} k +2 a c k +2 \sqrt {-4 a c +b^{2}}\, a^{2} k^{2}+6 \sqrt {-4 a c +b^{2}}\, a^{2} k +\sqrt {-4 a c +b^{2}}\, b k -2 b^{2}-b^{2} k +4 a^{2} k^{2}+4 a c} \\ \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 {a \left (-2 a^{2} k^{2} a_{k +1}-2 a^{2} k a_{k +1}+2 \sqrt {-4 a c +b^{2}}\, k a_{k +1}-2 a k a_{k +1}+2 a k a_{k}-2 b k a_{k +1}+\sqrt {-4 a c +b^{2}}\, a_{k +1}-2 a_{k} a -b a_{k +1}\right )}{4 \sqrt {-4 a c +b^{2}}\, a^{2}+2 b \sqrt {-4 a c +b^{2}}+2 a^{2} k^{2} k +2 a c k +2 \sqrt {-4 a c +b^{2}}\, a^{2} k^{2}+6 \sqrt {-4 a c +b^{2}}\, a^{2} k +\sqrt {-4 a c +b^{2}}\, b k -2 b^{2}-b^{2} k +4 a^{2} k^{2}+4 a c}, \frac {a_{1} \left (2 a^{2} k^{2}+b \sqrt {-4 a c +b^{2}}+2 a c -b^{2}\right )}{2 a^{2}}-\frac {a_{0} \left (-2 a k -\sqrt {-4 a c +b^{2}}+b \right )}{2 a}=0\right ] \\ \bullet & {} & \textrm {Revert the change of variables}\hspace {3pt} u =x -\frac {-b +\sqrt {-4 a c +b^{2}}}{2 a} \\ {} & {} & \left [y=\moverset {\infty }{\munderset {k =0}{\sum }}a_{k} {\left (x -\frac {-b +\sqrt {-4 a c +b^{2}}}{2 a}\right )}^{k}, a_{k +2}=\frac {a \left (-2 a^{2} k^{2} a_{k +1}-2 a^{2} k a_{k +1}+2 \sqrt {-4 a c +b^{2}}\, k a_{k +1}-2 a k a_{k +1}+2 a k a_{k}-2 b k a_{k +1}+\sqrt {-4 a c +b^{2}}\, a_{k +1}-2 a_{k} a -b a_{k +1}\right )}{4 \sqrt {-4 a c +b^{2}}\, a^{2}+2 b \sqrt {-4 a c +b^{2}}+2 a^{2} k^{2} k +2 a c k +2 \sqrt {-4 a c +b^{2}}\, a^{2} k^{2}+6 \sqrt {-4 a c +b^{2}}\, a^{2} k +\sqrt {-4 a c +b^{2}}\, b k -2 b^{2}-b^{2} k +4 a^{2} k^{2}+4 a c}, \frac {a_{1} \left (2 a^{2} k^{2}+b \sqrt {-4 a c +b^{2}}+2 a c -b^{2}\right )}{2 a^{2}}-\frac {a_{0} \left (-2 a k -\sqrt {-4 a c +b^{2}}+b \right )}{2 a}=0\right ] \\ \bullet & {} & \textrm {Recursion relation for}\hspace {3pt} r =\frac {-2 a^{2} k^{2}+2 \sqrt {-4 a c +b^{2}}\, a^{2}-b \sqrt {-4 a c +b^{2}}-2 a c +b^{2}}{2 \sqrt {-4 a c +b^{2}}\, a^{2}} \\ {} & {} & a_{k +2}=\frac {a \left (-2 a^{2} k^{2} a_{k +1}-\frac {2 k \left (-2 a^{2} k^{2}+2 \sqrt {-4 a c +b^{2}}\, a^{2}-b \sqrt {-4 a c +b^{2}}-2 a c +b^{2}\right ) a_{k +1}}{\sqrt {-4 a c +b^{2}}}-\frac {\left (-2 a^{2} k^{2}+2 \sqrt {-4 a c +b^{2}}\, a^{2}-b \sqrt {-4 a c +b^{2}}-2 a c +b^{2}\right )^{2} a_{k +1}}{2 a^{2} \left (-4 a c +b^{2}\right )}-2 a^{2} k a_{k +1}-\frac {\left (-2 a^{2} k^{2}+2 \sqrt {-4 a c +b^{2}}\, a^{2}-b \sqrt {-4 a c +b^{2}}-2 a c +b^{2}\right ) a_{k +1}}{\sqrt {-4 a c +b^{2}}}+2 \sqrt {-4 a c +b^{2}}\, k a_{k +1}+\frac {\left (-2 a^{2} k^{2}+2 \sqrt {-4 a c +b^{2}}\, a^{2}-b \sqrt {-4 a c +b^{2}}-2 a c +b^{2}\right ) a_{k +1}}{a^{2}}-2 a k a_{k +1}+2 a k a_{k}+\frac {\left (-2 a^{2} k^{2}+2 \sqrt {-4 a c +b^{2}}\, a^{2}-b \sqrt {-4 a c +b^{2}}-2 a c +b^{2}\right ) a_{k}}{a \sqrt {-4 a c +b^{2}}}-2 b k a_{k +1}-\frac {b \left (-2 a^{2} k^{2}+2 \sqrt {-4 a c +b^{2}}\, a^{2}-b \sqrt {-4 a c +b^{2}}-2 a c +b^{2}\right ) a_{k +1}}{\sqrt {-4 a c +b^{2}}\, a^{2}}+\sqrt {-4 a c +b^{2}}\, a_{k +1}-2 a_{k} a -b a_{k +1}\right )}{10 \sqrt {-4 a c +b^{2}}\, a^{2}-b \sqrt {-4 a c +b^{2}}+2 a^{2} k^{2} k +\frac {k^{2} \left (-2 a^{2} k^{2}+2 \sqrt {-4 a c +b^{2}}\, a^{2}-b \sqrt {-4 a c +b^{2}}-2 a c +b^{2}\right )}{\sqrt {-4 a c +b^{2}}}+2 a c k +\frac {c \left (-2 a^{2} k^{2}+2 \sqrt {-4 a c +b^{2}}\, a^{2}-b \sqrt {-4 a c +b^{2}}-2 a c +b^{2}\right )}{a \sqrt {-4 a c +b^{2}}}+2 \sqrt {-4 a c +b^{2}}\, a^{2} k^{2}+\frac {\left (-2 a^{2} k^{2}+2 \sqrt {-4 a c +b^{2}}\, a^{2}-b \sqrt {-4 a c +b^{2}}-2 a c +b^{2}\right )^{2}}{2 \sqrt {-4 a c +b^{2}}\, a^{2}}+6 \sqrt {-4 a c +b^{2}}\, a^{2} k -2 a^{2} k^{2}-2 a c +b^{2}+\sqrt {-4 a c +b^{2}}\, b k +\frac {b \left (-2 a^{2} k^{2}+2 \sqrt {-4 a c +b^{2}}\, a^{2}-b \sqrt {-4 a c +b^{2}}-2 a c +b^{2}\right )}{2 a^{2}}-b^{2} k -\frac {b^{2} \left (-2 a^{2} k^{2}+2 \sqrt {-4 a c +b^{2}}\, a^{2}-b \sqrt {-4 a c +b^{2}}-2 a c +b^{2}\right )}{2 \sqrt {-4 a c +b^{2}}\, a^{2}}+2 k \left (-2 a^{2} k^{2}+2 \sqrt {-4 a c +b^{2}}\, a^{2}-b \sqrt {-4 a c +b^{2}}-2 a c +b^{2}\right )} \\ \bullet & {} & \textrm {Solution for}\hspace {3pt} r =\frac {-2 a^{2} k^{2}+2 \sqrt {-4 a c +b^{2}}\, a^{2}-b \sqrt {-4 a c +b^{2}}-2 a c +b^{2}}{2 \sqrt {-4 a c +b^{2}}\, a^{2}} \\ {} & {} & \left [y \left (u \right )=\moverset {\infty }{\munderset {k =0}{\sum }}a_{k} u^{k +\frac {-2 a^{2} k^{2}+2 \sqrt {-4 a c +b^{2}}\, a^{2}-b \sqrt {-4 a c +b^{2}}-2 a c +b^{2}}{2 \sqrt {-4 a c +b^{2}}\, a^{2}}}, a_{k +2}=\frac {a \left (-2 a^{2} k^{2} a_{k +1}-\frac {2 k \left (-2 a^{2} k^{2}+2 \sqrt {-4 a c +b^{2}}\, a^{2}-b \sqrt {-4 a c +b^{2}}-2 a c +b^{2}\right ) a_{k +1}}{\sqrt {-4 a c +b^{2}}}-\frac {\left (-2 a^{2} k^{2}+2 \sqrt {-4 a c +b^{2}}\, a^{2}-b \sqrt {-4 a c +b^{2}}-2 a c +b^{2}\right )^{2} a_{k +1}}{2 a^{2} \left (-4 a c +b^{2}\right )}-2 a^{2} k a_{k +1}-\frac {\left (-2 a^{2} k^{2}+2 \sqrt {-4 a c +b^{2}}\, a^{2}-b \sqrt {-4 a c +b^{2}}-2 a c +b^{2}\right ) a_{k +1}}{\sqrt {-4 a c +b^{2}}}+2 \sqrt {-4 a c +b^{2}}\, k a_{k +1}+\frac {\left (-2 a^{2} k^{2}+2 \sqrt {-4 a c +b^{2}}\, a^{2}-b \sqrt {-4 a c +b^{2}}-2 a c +b^{2}\right ) a_{k +1}}{a^{2}}-2 a k a_{k +1}+2 a k a_{k}+\frac {\left (-2 a^{2} k^{2}+2 \sqrt {-4 a c +b^{2}}\, a^{2}-b \sqrt {-4 a c +b^{2}}-2 a c +b^{2}\right ) a_{k}}{a \sqrt {-4 a c +b^{2}}}-2 b k a_{k +1}-\frac {b \left (-2 a^{2} k^{2}+2 \sqrt {-4 a c +b^{2}}\, a^{2}-b \sqrt {-4 a c +b^{2}}-2 a c +b^{2}\right ) a_{k +1}}{\sqrt {-4 a c +b^{2}}\, a^{2}}+\sqrt {-4 a c +b^{2}}\, a_{k +1}-2 a_{k} a -b a_{k +1}\right )}{10 \sqrt {-4 a c +b^{2}}\, a^{2}-b \sqrt {-4 a c +b^{2}}+2 a^{2} k^{2} k +\frac {k^{2} \left (-2 a^{2} k^{2}+2 \sqrt {-4 a c +b^{2}}\, a^{2}-b \sqrt {-4 a c +b^{2}}-2 a c +b^{2}\right )}{\sqrt {-4 a c +b^{2}}}+2 a c k +\frac {c \left (-2 a^{2} k^{2}+2 \sqrt {-4 a c +b^{2}}\, a^{2}-b \sqrt {-4 a c +b^{2}}-2 a c +b^{2}\right )}{a \sqrt {-4 a c +b^{2}}}+2 \sqrt {-4 a c +b^{2}}\, a^{2} k^{2}+\frac {\left (-2 a^{2} k^{2}+2 \sqrt {-4 a c +b^{2}}\, a^{2}-b \sqrt {-4 a c +b^{2}}-2 a c +b^{2}\right )^{2}}{2 \sqrt {-4 a c +b^{2}}\, a^{2}}+6 \sqrt {-4 a c +b^{2}}\, a^{2} k -2 a^{2} k^{2}-2 a c +b^{2}+\sqrt {-4 a c +b^{2}}\, b k +\frac {b \left (-2 a^{2} k^{2}+2 \sqrt {-4 a c +b^{2}}\, a^{2}-b \sqrt {-4 a c +b^{2}}-2 a c +b^{2}\right )}{2 a^{2}}-b^{2} k -\frac {b^{2} \left (-2 a^{2} k^{2}+2 \sqrt {-4 a c +b^{2}}\, a^{2}-b \sqrt {-4 a c +b^{2}}-2 a c +b^{2}\right )}{2 \sqrt {-4 a c +b^{2}}\, a^{2}}+2 k \left (-2 a^{2} k^{2}+2 \sqrt {-4 a c +b^{2}}\, a^{2}-b \sqrt {-4 a c +b^{2}}-2 a c +b^{2}\right )}, a_{1} \left (1+\frac {-2 a^{2} k^{2}+2 \sqrt {-4 a c +b^{2}}\, a^{2}-b \sqrt {-4 a c +b^{2}}-2 a c +b^{2}}{2 \sqrt {-4 a c +b^{2}}\, a^{2}}\right ) \sqrt {-4 a c +b^{2}}-\frac {a_{0} \left (-\frac {\left (-2 a^{2} k^{2}+2 \sqrt {-4 a c +b^{2}}\, a^{2}-b \sqrt {-4 a c +b^{2}}-2 a c +b^{2}\right )^{2}}{2 a^{2} \left (-4 a c +b^{2}\right )}+\frac {-2 a^{2} k^{2}+2 \sqrt {-4 a c +b^{2}}\, a^{2}-b \sqrt {-4 a c +b^{2}}-2 a c +b^{2}}{\sqrt {-4 a c +b^{2}}}+\frac {-2 a^{2} k^{2}+2 \sqrt {-4 a c +b^{2}}\, a^{2}-b \sqrt {-4 a c +b^{2}}-2 a c +b^{2}}{a^{2}}-2 a k -\frac {b \left (-2 a^{2} k^{2}+2 \sqrt {-4 a c +b^{2}}\, a^{2}-b \sqrt {-4 a c +b^{2}}-2 a c +b^{2}\right )}{\sqrt {-4 a c +b^{2}}\, a^{2}}-\sqrt {-4 a c +b^{2}}+b \right )}{2 a}=0\right ] \\ \bullet & {} & \textrm {Revert the change of variables}\hspace {3pt} u =x -\frac {-b +\sqrt {-4 a c +b^{2}}}{2 a} \\ {} & {} & \left [y=\moverset {\infty }{\munderset {k =0}{\sum }}a_{k} {\left (x -\frac {-b +\sqrt {-4 a c +b^{2}}}{2 a}\right )}^{k +\frac {-2 a^{2} k^{2}+2 \sqrt {-4 a c +b^{2}}\, a^{2}-b \sqrt {-4 a c +b^{2}}-2 a c +b^{2}}{2 \sqrt {-4 a c +b^{2}}\, a^{2}}}, a_{k +2}=\frac {a \left (-2 a^{2} k^{2} a_{k +1}-\frac {2 k \left (-2 a^{2} k^{2}+2 \sqrt {-4 a c +b^{2}}\, a^{2}-b \sqrt {-4 a c +b^{2}}-2 a c +b^{2}\right ) a_{k +1}}{\sqrt {-4 a c +b^{2}}}-\frac {\left (-2 a^{2} k^{2}+2 \sqrt {-4 a c +b^{2}}\, a^{2}-b \sqrt {-4 a c +b^{2}}-2 a c +b^{2}\right )^{2} a_{k +1}}{2 a^{2} \left (-4 a c +b^{2}\right )}-2 a^{2} k a_{k +1}-\frac {\left (-2 a^{2} k^{2}+2 \sqrt {-4 a c +b^{2}}\, a^{2}-b \sqrt {-4 a c +b^{2}}-2 a c +b^{2}\right ) a_{k +1}}{\sqrt {-4 a c +b^{2}}}+2 \sqrt {-4 a c +b^{2}}\, k a_{k +1}+\frac {\left (-2 a^{2} k^{2}+2 \sqrt {-4 a c +b^{2}}\, a^{2}-b \sqrt {-4 a c +b^{2}}-2 a c +b^{2}\right ) a_{k +1}}{a^{2}}-2 a k a_{k +1}+2 a k a_{k}+\frac {\left (-2 a^{2} k^{2}+2 \sqrt {-4 a c +b^{2}}\, a^{2}-b \sqrt {-4 a c +b^{2}}-2 a c +b^{2}\right ) a_{k}}{a \sqrt {-4 a c +b^{2}}}-2 b k a_{k +1}-\frac {b \left (-2 a^{2} k^{2}+2 \sqrt {-4 a c +b^{2}}\, a^{2}-b \sqrt {-4 a c +b^{2}}-2 a c +b^{2}\right ) a_{k +1}}{\sqrt {-4 a c +b^{2}}\, a^{2}}+\sqrt {-4 a c +b^{2}}\, a_{k +1}-2 a_{k} a -b a_{k +1}\right )}{10 \sqrt {-4 a c +b^{2}}\, a^{2}-b \sqrt {-4 a c +b^{2}}+2 a^{2} k^{2} k +\frac {k^{2} \left (-2 a^{2} k^{2}+2 \sqrt {-4 a c +b^{2}}\, a^{2}-b \sqrt {-4 a c +b^{2}}-2 a c +b^{2}\right )}{\sqrt {-4 a c +b^{2}}}+2 a c k +\frac {c \left (-2 a^{2} k^{2}+2 \sqrt {-4 a c +b^{2}}\, a^{2}-b \sqrt {-4 a c +b^{2}}-2 a c +b^{2}\right )}{a \sqrt {-4 a c +b^{2}}}+2 \sqrt {-4 a c +b^{2}}\, a^{2} k^{2}+\frac {\left (-2 a^{2} k^{2}+2 \sqrt {-4 a c +b^{2}}\, a^{2}-b \sqrt {-4 a c +b^{2}}-2 a c +b^{2}\right )^{2}}{2 \sqrt {-4 a c +b^{2}}\, a^{2}}+6 \sqrt {-4 a c +b^{2}}\, a^{2} k -2 a^{2} k^{2}-2 a c +b^{2}+\sqrt {-4 a c +b^{2}}\, b k +\frac {b \left (-2 a^{2} k^{2}+2 \sqrt {-4 a c +b^{2}}\, a^{2}-b \sqrt {-4 a c +b^{2}}-2 a c +b^{2}\right )}{2 a^{2}}-b^{2} k -\frac {b^{2} \left (-2 a^{2} k^{2}+2 \sqrt {-4 a c +b^{2}}\, a^{2}-b \sqrt {-4 a c +b^{2}}-2 a c +b^{2}\right )}{2 \sqrt {-4 a c +b^{2}}\, a^{2}}+2 k \left (-2 a^{2} k^{2}+2 \sqrt {-4 a c +b^{2}}\, a^{2}-b \sqrt {-4 a c +b^{2}}-2 a c +b^{2}\right )}, a_{1} \left (1+\frac {-2 a^{2} k^{2}+2 \sqrt {-4 a c +b^{2}}\, a^{2}-b \sqrt {-4 a c +b^{2}}-2 a c +b^{2}}{2 \sqrt {-4 a c +b^{2}}\, a^{2}}\right ) \sqrt {-4 a c +b^{2}}-\frac {a_{0} \left (-\frac {\left (-2 a^{2} k^{2}+2 \sqrt {-4 a c +b^{2}}\, a^{2}-b \sqrt {-4 a c +b^{2}}-2 a c +b^{2}\right )^{2}}{2 a^{2} \left (-4 a c +b^{2}\right )}+\frac {-2 a^{2} k^{2}+2 \sqrt {-4 a c +b^{2}}\, a^{2}-b \sqrt {-4 a c +b^{2}}-2 a c +b^{2}}{\sqrt {-4 a c +b^{2}}}+\frac {-2 a^{2} k^{2}+2 \sqrt {-4 a c +b^{2}}\, a^{2}-b \sqrt {-4 a c +b^{2}}-2 a c +b^{2}}{a^{2}}-2 a k -\frac {b \left (-2 a^{2} k^{2}+2 \sqrt {-4 a c +b^{2}}\, a^{2}-b \sqrt {-4 a c +b^{2}}-2 a c +b^{2}\right )}{\sqrt {-4 a c +b^{2}}\, a^{2}}-\sqrt {-4 a c +b^{2}}+b \right )}{2 a}=0\right ] \\ \bullet & {} & \textrm {Combine solutions and rename parameters}\hspace {3pt} \\ {} & {} & \left [y=\left (\moverset {\infty }{\munderset {m =0}{\sum }}d_{m} {\left (x -\frac {-b +\sqrt {-4 a c +b^{2}}}{2 a}\right )}^{m}\right )+\left (\moverset {\infty }{\munderset {m =0}{\sum }}e_{m} {\left (x -\frac {-b +\sqrt {-4 a c +b^{2}}}{2 a}\right )}^{m +\frac {-2 a^{2} k^{2}+2 \sqrt {-4 a c +b^{2}}\, a^{2}-b \sqrt {-4 a c +b^{2}}-2 a c +b^{2}}{2 \sqrt {-4 a c +b^{2}}\, a^{2}}}\right ), d_{m +2}=\frac {a \left (-2 a^{2} m^{2} d_{m +1}-2 a^{2} m d_{m +1}+2 \sqrt {-4 a c +b^{2}}\, m d_{m +1}-2 a k d_{m +1}+2 a m d_{m}-2 b m d_{m +1}+\sqrt {-4 a c +b^{2}}\, d_{m +1}-2 d_{m} a -b d_{m +1}\right )}{4 \sqrt {-4 a c +b^{2}}\, a^{2}+2 b \sqrt {-4 a c +b^{2}}+2 a^{2} k^{2} m +2 a c m +2 \sqrt {-4 a c +b^{2}}\, a^{2} m^{2}+6 \sqrt {-4 a c +b^{2}}\, a^{2} m +\sqrt {-4 a c +b^{2}}\, b m -2 b^{2}-b^{2} m +4 a^{2} k^{2}+4 a c}, \frac {d_{1} \left (2 a^{2} k^{2}+b \sqrt {-4 a c +b^{2}}+2 a c -b^{2}\right )}{2 a^{2}}-\frac {d_{0} \left (-2 a k -\sqrt {-4 a c +b^{2}}+b \right )}{2 a}=0, e_{m +2}=\frac {a \left (-2 a^{2} m^{2} e_{m +1}-\frac {2 m \left (-2 a^{2} k^{2}+2 \sqrt {-4 a c +b^{2}}\, a^{2}-b \sqrt {-4 a c +b^{2}}-2 a c +b^{2}\right ) e_{m +1}}{\sqrt {-4 a c +b^{2}}}-\frac {\left (-2 a^{2} k^{2}+2 \sqrt {-4 a c +b^{2}}\, a^{2}-b \sqrt {-4 a c +b^{2}}-2 a c +b^{2}\right )^{2} e_{m +1}}{2 a^{2} \left (-4 a c +b^{2}\right )}-2 a^{2} m e_{m +1}-\frac {\left (-2 a^{2} k^{2}+2 \sqrt {-4 a c +b^{2}}\, a^{2}-b \sqrt {-4 a c +b^{2}}-2 a c +b^{2}\right ) e_{m +1}}{\sqrt {-4 a c +b^{2}}}+2 \sqrt {-4 a c +b^{2}}\, m e_{m +1}+\frac {\left (-2 a^{2} k^{2}+2 \sqrt {-4 a c +b^{2}}\, a^{2}-b \sqrt {-4 a c +b^{2}}-2 a c +b^{2}\right ) e_{m +1}}{a^{2}}-2 a k e_{m +1}+2 a m e_{m}+\frac {\left (-2 a^{2} k^{2}+2 \sqrt {-4 a c +b^{2}}\, a^{2}-b \sqrt {-4 a c +b^{2}}-2 a c +b^{2}\right ) e_{m}}{a \sqrt {-4 a c +b^{2}}}-2 b m e_{m +1}-\frac {b \left (-2 a^{2} k^{2}+2 \sqrt {-4 a c +b^{2}}\, a^{2}-b \sqrt {-4 a c +b^{2}}-2 a c +b^{2}\right ) e_{m +1}}{\sqrt {-4 a c +b^{2}}\, a^{2}}+\sqrt {-4 a c +b^{2}}\, e_{m +1}-2 e_{m} a -b e_{m +1}\right )}{10 \sqrt {-4 a c +b^{2}}\, a^{2}-b \sqrt {-4 a c +b^{2}}+2 a^{2} k^{2} m +\frac {k^{2} \left (-2 a^{2} k^{2}+2 \sqrt {-4 a c +b^{2}}\, a^{2}-b \sqrt {-4 a c +b^{2}}-2 a c +b^{2}\right )}{\sqrt {-4 a c +b^{2}}}+2 a c m +\frac {c \left (-2 a^{2} k^{2}+2 \sqrt {-4 a c +b^{2}}\, a^{2}-b \sqrt {-4 a c +b^{2}}-2 a c +b^{2}\right )}{a \sqrt {-4 a c +b^{2}}}+2 \sqrt {-4 a c +b^{2}}\, a^{2} m^{2}+\frac {\left (-2 a^{2} k^{2}+2 \sqrt {-4 a c +b^{2}}\, a^{2}-b \sqrt {-4 a c +b^{2}}-2 a c +b^{2}\right )^{2}}{2 \sqrt {-4 a c +b^{2}}\, a^{2}}+6 \sqrt {-4 a c +b^{2}}\, a^{2} m -2 a^{2} k^{2}-2 a c +b^{2}+\sqrt {-4 a c +b^{2}}\, b m +\frac {b \left (-2 a^{2} k^{2}+2 \sqrt {-4 a c +b^{2}}\, a^{2}-b \sqrt {-4 a c +b^{2}}-2 a c +b^{2}\right )}{2 a^{2}}-b^{2} m -\frac {b^{2} \left (-2 a^{2} k^{2}+2 \sqrt {-4 a c +b^{2}}\, a^{2}-b \sqrt {-4 a c +b^{2}}-2 a c +b^{2}\right )}{2 \sqrt {-4 a c +b^{2}}\, a^{2}}+2 m \left (-2 a^{2} k^{2}+2 \sqrt {-4 a c +b^{2}}\, a^{2}-b \sqrt {-4 a c +b^{2}}-2 a c +b^{2}\right )}, e_{1} \left (1+\frac {-2 a^{2} k^{2}+2 \sqrt {-4 a c +b^{2}}\, a^{2}-b \sqrt {-4 a c +b^{2}}-2 a c +b^{2}}{2 \sqrt {-4 a c +b^{2}}\, a^{2}}\right ) \sqrt {-4 a c +b^{2}}-\frac {e_{0} \left (-\frac {\left (-2 a^{2} k^{2}+2 \sqrt {-4 a c +b^{2}}\, a^{2}-b \sqrt {-4 a c +b^{2}}-2 a c +b^{2}\right )^{2}}{2 a^{2} \left (-4 a c +b^{2}\right )}+\frac {-2 a^{2} k^{2}+2 \sqrt {-4 a c +b^{2}}\, a^{2}-b \sqrt {-4 a c +b^{2}}-2 a c +b^{2}}{\sqrt {-4 a c +b^{2}}}+\frac {-2 a^{2} k^{2}+2 \sqrt {-4 a c +b^{2}}\, a^{2}-b \sqrt {-4 a c +b^{2}}-2 a c +b^{2}}{a^{2}}-2 a k -\frac {b \left (-2 a^{2} k^{2}+2 \sqrt {-4 a c +b^{2}}\, a^{2}-b \sqrt {-4 a c +b^{2}}-2 a c +b^{2}\right )}{\sqrt {-4 a c +b^{2}}\, a^{2}}-\sqrt {-4 a c +b^{2}}+b \right )}{2 a}=0\right ] \end {array} \]

Maple trace Kovacic algorithm successful

`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 
      -> hypergeometric 
         -> heuristic approach 
         -> hyper3: Equivalence to 2F1, 1F1 or 0F1 under a power @ Moebius 
      -> Mathieu 
         -> Equivalence to the rational form of Mathieu ODE under a power @ Moebius 
      -> Heun: Equivalence to the GHE or one of its 4 confluent cases under a power @ Moebius 
      <- Heun successful: received ODE is equivalent to the  HeunC  ODE, case  a <> 0, e <> 0, c = 0 
   <- Kovacics algorithm successful`
 

Solution by Maple

Time used: 0.328 (sec). Leaf size: 1535

dsolve((a*x^2+b*x+c)*diff(y(x),x$2)-(x^2-k^2)*diff(y(x),x)+(x+k)*y(x)=0,y(x), singsol=all)
 

\[ \text {Expression too large to display} \]

Solution by Mathematica

Time used: 2.442 (sec). Leaf size: 119

DSolve[(a*x^2+b*x+c)*y''[x]-(x^2-k^2)*y'[x]+(x+k)*y[x]==0,y[x],x,IncludeSingularSolutions -> True]
 

\[ y(x)\to \frac {(k-x) \left (c_2 \int _1^x\frac {\exp \left (\frac {\frac {\left (b^2-2 a \left (a k^2+c\right )\right ) \arctan \left (\frac {b+2 a K[1]}{\sqrt {4 a c-b^2}}\right )}{\sqrt {4 a c-b^2}}+a K[1]}{a^2}\right ) (c+K[1] (b+a K[1]))^{-\frac {b}{2 a^2}}}{(k-K[1])^2}dK[1]+c_1\right )}{k} \]