23.3.157 problem 159

Internal problem ID [5871]
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 : 159
Date solved : Friday, October 03, 2025 at 01:44:52 AM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

\begin{align*} -a \left (1+a \right ) \csc \left (x \right )^{2} y-\tan \left (x \right ) y^{\prime }+y^{\prime \prime }&=0 \end{align*}
Maple. Time used: 0.146 (sec). Leaf size: 61
ode:=-a*(a+1)*csc(x)^2*y(x)-tan(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 )^{-a} \operatorname {hypergeom}\left (\left [-\frac {a}{2}, \frac {1}{2}-\frac {a}{2}\right ], \left [\frac {1}{2}-a \right ], \sin \left (x \right )^{2}\right )+c_2 \sin \left (x \right )^{1+a} \operatorname {hypergeom}\left (\left [1+\frac {a}{2}, \frac {1}{2}+\frac {a}{2}\right ], \left [\frac {3}{2}+a \right ], \sin \left (x \right )^{2}\right ) \]
Mathematica. Time used: 0.369 (sec). Leaf size: 96
ode=-(a*(1 + a)*Csc[x]^2*y[x]) - Tan[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 (\cos (x)-1)^{\frac {a+1}{2}} (\cos (x)+1)^{-a/2} \left (c_1 \text {HeunG}\left [2,\frac {1}{4}-a,\frac {1}{2},\frac {3}{2},\frac {1}{2}-a,1,\cos (x)+1\right ]+c_2 (\cos (x)+1)^{a+\frac {1}{2}} \operatorname {Hypergeometric2F1}\left (\frac {a+1}{2},\frac {a+2}{2},a+\frac {3}{2},\sin ^2(x)\right )\right ) \end{align*}
Sympy
from sympy import * 
x = symbols("x") 
a = symbols("a") 
y = Function("y") 
ode = Eq(-a*(a + 1)*y(x)/sin(x)**2 - tan(x)*Derivative(y(x), x) + Derivative(y(x), (x, 2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : The given ODE -(-a*(a + 1)*y(x) + sin(x)**2*Derivative(y(x), (x, 2)))/(sin(x)*