23.3.147 problem 149

Internal problem ID [5861]
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 : 149
Date solved : Tuesday, September 30, 2025 at 02:04:43 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

\begin{align*} a \tan \left (\frac {x}{2}\right )^{2} y-\csc \left (x \right ) y^{\prime }+y^{\prime \prime }&=0 \end{align*}
Maple
ode:=a*tan(1/2*x)^2*y(x)-csc(x)*diff(y(x),x)+diff(diff(y(x),x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ \text {No solution found} \]
Mathematica. Time used: 0.054 (sec). Leaf size: 43
ode=a*Tan[x/2]^2*y[x] - Csc[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 c_1 \cos \left (2 \sqrt {a} \log \left (\cos \left (\frac {x}{2}\right )\right )\right )-c_2 \sin \left (2 \sqrt {a} \log \left (\cos \left (\frac {x}{2}\right )\right )\right ) \end{align*}
Sympy
from sympy import * 
x = symbols("x") 
a = symbols("a") 
y = Function("y") 
ode = Eq(a*y(x)*tan(x/2)**2 + Derivative(y(x), (x, 2)) - Derivative(y(x), x)/sin(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : The given ODE -(a*y(x)*tan(x/2)**2 + Derivative(y(x), (x, 2)))*sin(x) + Deriva