4.27.28 \(y''(x)-y'(x) (\cot (x)-\sin (x))+y(x) \sin ^2(x)=0\)

ODE
\[ y''(x)-y'(x) (\cot (x)-\sin (x))+y(x) \sin ^2(x)=0 \] ODE Classification

[[_2nd_order, _with_linear_symmetries]]

Book solution method
TO DO

Mathematica
cpu = 0.144804 (sec), leaf count = 45

\[\left \{\left \{y(x)\to e^{\frac {\cos (x)}{2}} \left (c_1 \cos \left (\frac {1}{2} \sqrt {3} \cos (x)\right )+c_2 \sin \left (\frac {1}{2} \sqrt {3} \cos (x)\right )\right )\right \}\right \}\]

Maple
cpu = 11.259 (sec), leaf count = 59

\[ \left \{ y \left ( x \right ) ={{\rm e}^{{\frac {\cot \left ( x \right ) }{2}{\frac {1}{\sqrt { \left ( \cot \left ( x \right ) \right ) ^{2}+1}}}}}} \left ( \sinh \left ( {\frac {\cot \left ( x \right ) \sqrt {3}}{2}{\frac {1}{\sqrt {-1- \left ( \cot \left ( x \right ) \right ) ^{2}}}}} \right ) {\it \_C1}+\cosh \left ( {\frac {\cot \left ( x \right ) \sqrt {3}}{2}{\frac {1}{\sqrt {-1- \left ( \cot \left ( x \right ) \right ) ^{2}}}}} \right ) {\it \_C2} \right ) \right \} \] Mathematica raw input

DSolve[Sin[x]^2*y[x] - (Cot[x] - Sin[x])*y'[x] + y''[x] == 0,y[x],x]

Mathematica raw output

{{y[x] -> E^(Cos[x]/2)*(C[1]*Cos[(Sqrt[3]*Cos[x])/2] + C[2]*Sin[(Sqrt[3]*Cos[x])
/2])}}

Maple raw input

dsolve(diff(diff(y(x),x),x)-(cot(x)-sin(x))*diff(y(x),x)+y(x)*sin(x)^2 = 0, y(x),'implicit')

Maple raw output

y(x) = exp(1/2*cot(x)/(cot(x)^2+1)^(1/2))*(sinh(1/2*cot(x)/(-1-cot(x)^2)^(1/2)*3
^(1/2))*_C1+cosh(1/2*cot(x)/(-1-cot(x)^2)^(1/2)*3^(1/2))*_C2)