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.11491 (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.244 (sec), leaf count = 30
\[ \left \{ y \left ( x \right ) = \left ( -{\it \_C2}\, \left ( \cos \left ( x \right ) \right ) ^{2}+{\it \_C2} \right ) {\it Artanh} \left ( \left ( \cos \left ( x \right ) \right ) ^{-1} \right ) +{\it \_C1}\, \left ( \sin \left ( x \right ) \right ) ^{2}+\cos \left ( x \right ) {\it \_C2} \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),'implicit')
Maple raw output
y(x) = (-_C2*cos(x)^2+_C2)*arctanh(1/cos(x))+_C1*sin(x)^2+cos(x)*_C2