ODE
\[ y''(x)-\cot (x) y'(x)+2 y(x)=0 \] ODE Classification
[[_2nd_order, _with_linear_symmetries]]
Book solution method
TO DO
Mathematica ✓
cpu = 0.234927 (sec), leaf count = 45
\[\left \{\left \{y(x)\to -c_1 \sin ^2(x)-\frac {1}{4} c_2 \left (2 \cos (x)+\sin ^2(x) (\log (\cos (x)+1)-\log (1-\cos (x)))\right )\right \}\right \}\]
Maple ✓
cpu = 0.706 (sec), leaf count = 30
\[\left [y \left (x \right ) = \textit {\_C1} \left (\sin ^{2}\left (x \right )\right )+\textit {\_C2} \left (\arctanh \left (\frac {1}{\cos \left (x \right )}\right ) \left (1-\left (\cos ^{2}\left (x \right )\right )\right )+\cos \left (x \right )\right )\right ]\] Mathematica raw input
DSolve[2*y[x] - Cot[x]*y'[x] + y''[x] == 0,y[x],x]
Mathematica raw output
{{y[x] -> -(C[1]*Sin[x]^2) - (C[2]*(2*Cos[x] + (-Log[1 - Cos[x]] + Log[1 + Cos[x
]])*Sin[x]^2))/4}}
Maple raw input
dsolve(diff(diff(y(x),x),x)-cot(x)*diff(y(x),x)+2*y(x) = 0, y(x))
Maple raw output
[y(x) = _C1*sin(x)^2+_C2*(arctanh(1/cos(x))*(1-cos(x)^2)+cos(x))]