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.287385 (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 = 10.331 (sec), leaf count = 71

\[\left [y \left (x \right ) = \textit {\_C1} \,{\mathrm e}^{\frac {\cot \left (x \right )}{2 \sqrt {\cot ^{2}\left (x \right )+1}}} \sinh \left (\frac {\cot \left (x \right ) \sqrt {3}}{2 \sqrt {-1-\left (\cot ^{2}\left (x \right )\right )}}\right )+\textit {\_C2} \,{\mathrm e}^{\frac {\cot \left (x \right )}{2 \sqrt {\cot ^{2}\left (x \right )+1}}} \cosh \left (\frac {\cot \left (x \right ) \sqrt {3}}{2 \sqrt {-1-\left (\cot ^{2}\left (x \right )\right )}}\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))

Maple raw output

[y(x) = _C1*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))+_C2*exp(1/2*cot(x)/(cot(x)^2+1)^(1/2))*cosh(1/2*cot(x)/(-1-cot(x)^2)
^(1/2)*3^(1/2))]