23.3.141 problem 143

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

\begin{align*} \left (b +k^{2} \cos \left (x \right )^{2}\right ) y+a \cot \left (x \right ) y^{\prime }+y^{\prime \prime }&=0 \end{align*}
Maple. Time used: 0.102 (sec). Leaf size: 77
ode:=(b+k^2*cos(x)^2)*y(x)+a*cot(x)*diff(y(x),x)+diff(diff(y(x),x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = c_1 \operatorname {HeunC}\left (0, \frac {a}{2}-\frac {1}{2}, -\frac {1}{2}, \frac {k^{2}}{4}, -\frac {a}{8}+\frac {3}{8}-\frac {k^{2}}{4}-\frac {b}{4}, \sin \left (x \right )^{2}\right )+c_2 \sin \left (x \right )^{-a +1} \operatorname {HeunC}\left (0, \frac {1}{2}-\frac {a}{2}, -\frac {1}{2}, \frac {k^{2}}{4}, -\frac {a}{8}+\frac {3}{8}-\frac {k^{2}}{4}-\frac {b}{4}, \sin \left (x \right )^{2}\right ) \]
Mathematica
ode=(b + k^2*Cos[x]^2)*y[x] + a*Cot[x]*D[y[x],x] + D[y[x],{x,2}] == 0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 

Not solved

Sympy
from sympy import * 
x = symbols("x") 
a = symbols("a") 
b = symbols("b") 
k = symbols("k") 
y = Function("y") 
ode = Eq(a*Derivative(y(x), x)/tan(x) + (b + k**2*cos(x)**2)*y(x) + Derivative(y(x), (x, 2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : The given ODE Derivative(y(x), x) + (b*y(x) + k**2*y(x)*cos(x)**2 + Derivative