23.3.154 problem 156

Internal problem ID [5868]
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 : 156
Date solved : Tuesday, September 30, 2025 at 02:05:11 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

\begin{align*} b \tan \left (x \right )^{2} y-2 \csc \left (2 x \right ) \left (1-a \sin \left (x \right )^{2}\right ) y^{\prime }+y^{\prime \prime }&=0 \end{align*}
Maple. Time used: 0.104 (sec). Leaf size: 44
ode:=b*tan(x)^2*y(x)-2*csc(2*x)*(1-a*sin(x)^2)*diff(y(x),x)+diff(diff(y(x),x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \cos \left (x \right )^{\frac {a}{2}} \left (c_1 \cos \left (x \right )^{\frac {\sqrt {a^{2}-4 b}}{2}}+c_2 \cos \left (x \right )^{-\frac {\sqrt {a^{2}-4 b}}{2}}\right ) \]
Mathematica. Time used: 0.575 (sec). Leaf size: 48
ode=b*Tan[x]^2*y[x] - 2*Csc[2*x]*(1 - a*Sin[x]^2)*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 ^{\frac {1}{2} \left (a-\sqrt {a^2-4 b}\right )}(x) \left (c_2 \cos ^{\sqrt {a^2-4 b}}(x)+c_1\right ) \end{align*}
Sympy
from sympy import * 
x = symbols("x") 
a = symbols("a") 
b = symbols("b") 
y = Function("y") 
ode = Eq(b*y(x)*tan(x)**2 - 2*(-a*sin(x)**2 + 1)*Derivative(y(x), x)/sin(2*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)*tan(x)**2 + Derivative(y(x), (x, 2