23.3.138 problem 140

Internal problem ID [5852]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Part II. Chapter 3. THE DIFFERENTIAL EQUATION IS LINEAR AND OF SECOND ORDER, page 311
Problem number : 140
Date solved : Friday, October 03, 2025 at 01:44:11 AM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

\begin{align*} \left (\operatorname {a0} -\operatorname {a2} \csc \left (x \right )^{2}+4 \operatorname {a1} \sin \left (x \right )^{2}\right ) y+\cot \left (x \right ) y^{\prime }+y^{\prime \prime }&=0 \end{align*}
Maple. Time used: 0.119 (sec). Leaf size: 67
ode:=(a0-a2*csc(x)^2+4*a1*sin(x)^2)*y(x)+cot(x)*diff(y(x),x)+diff(diff(y(x),x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = c_1 \sin \left (x \right )^{\sqrt {\operatorname {a2}}} \operatorname {HeunC}\left (0, \sqrt {\operatorname {a2}}, -\frac {1}{2}, -\operatorname {a1} , \frac {\operatorname {a2}}{4}+\frac {1}{4}-\frac {\operatorname {a0}}{4}, \sin \left (x \right )^{2}\right )+c_2 \sin \left (x \right )^{-\sqrt {\operatorname {a2}}} \operatorname {HeunC}\left (0, -\sqrt {\operatorname {a2}}, -\frac {1}{2}, -\operatorname {a1} , \frac {\operatorname {a2}}{4}+\frac {1}{4}-\frac {\operatorname {a0}}{4}, \sin \left (x \right )^{2}\right ) \]
Mathematica. Time used: 0.577 (sec). Leaf size: 191
ode=(a0 - a2*Csc[x]^2 + 4*a1*Sin[x]^2)*y[x] + Cot[x]*D[y[x],x] + D[y[x],{x,2}] == 0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to e^{2 i \sqrt {\text {a1}} \cos (x)} \left (-\cot ^2\left (\frac {x}{2}\right )\right )^{\frac {\sqrt {\text {a2}}}{2}} \left (c_1 \text {HeunC}\left [\text {a0}+4 i \sqrt {\text {a1}} \left (\sqrt {\text {a2}}-1\right ),-8 i \sqrt {\text {a1}},1-\sqrt {\text {a2}},\sqrt {\text {a2}}+1,-8 i \sqrt {\text {a1}},\sin ^2\left (\frac {x}{2}\right )\right ]+c_2 (\cos (x)-1)^{\sqrt {\text {a2}}} \text {HeunC}\left [\text {a0}-\left (\sqrt {\text {a2}}+1\right ) \left (\sqrt {\text {a2}}+4 i \sqrt {\text {a1}}\right ),-8 i \sqrt {\text {a1}} \left (\sqrt {\text {a2}}+1\right ),\sqrt {\text {a2}}+1,\sqrt {\text {a2}}+1,-8 i \sqrt {\text {a1}},\sin ^2\left (\frac {x}{2}\right )\right ]\right ) \end{align*}
Sympy
from sympy import * 
x = symbols("x") 
a0 = symbols("a0") 
a1 = symbols("a1") 
a2 = symbols("a2") 
y = Function("y") 
ode = Eq((a0 + 4*a1*sin(x)**2 - a2/sin(x)**2)*y(x) + Derivative(y(x), (x, 2)) + Derivative(y(x), x)/tan(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : The given ODE -(a2*y(x) - (a0*y(x) + 4*a1*y(x)*sin(x)**2 + Derivative(y(x), (x