61.30.32 problem 180

Internal problem ID [12601]
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 : 180
Date solved : Monday, March 31, 2025 at 05:53:25 AM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

\begin{align*} \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 \end{align*}

Maple. Time used: 0.443 (sec). Leaf size: 1482
ode:=(a*x^2+b*x+c)*diff(diff(y(x),x),x)-(-k^2+x^2)*diff(y(x),x)+(x+k)*y(x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ \text {Expression too large to display} \]
Mathematica. Time used: 0.806 (sec). Leaf size: 98
ode=(a*x^2+b*x+c)*D[y[x],{x,2}]-(x^2-k^2)*D[y[x],x]+(x+k)*y[x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \frac {(k-x) \left (c_2 \int _1^x\exp \left (\int _1^{K[2]}\frac {-k^3+K[1] k^2+K[1]^2 k-K[1]^3+2 a K[1]^2+2 c+2 b K[1]}{(k-K[1]) (c+K[1] (b+a K[1]))}dK[1]\right )dK[2]+c_1\right )}{k} \]
Sympy
from sympy import * 
x = symbols("x") 
a = symbols("a") 
b = symbols("b") 
c = symbols("c") 
k = symbols("k") 
y = Function("y") 
ode = Eq((k + x)*y(x) - (-k**2 + x**2)*Derivative(y(x), x) + (a*x**2 + b*x + c)*Derivative(y(x), (x, 2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
False