ODE
\[ a y(x) \csc ^2(x)+y''(x)+(\cos (x)+2) \csc (x) y'(x)=0 \] ODE Classification
[[_2nd_order, _with_linear_symmetries]]
Book solution method
TO DO
Mathematica ✓
cpu = 0.152252 (sec), leaf count = 71
\[\left \{\left \{y(x)\to \left (c_2 e^{\sqrt {1-a} (\log (1-\cos (x))-\log (\cos (x)+1))}+c_1\right ) \exp \left (-\frac {1}{2} \left (\sqrt {1-a}+1\right ) (\log (1-\cos (x))-\log (\cos (x)+1))\right )\right \}\right \}\]
Maple ✓
cpu = 0.829 (sec), leaf count = 74
\[ \left \{ y \left ( x \right ) ={\frac {1}{\sin \left ( x \right ) } \left ( {\it \_C1}\, \left ( 1+\cos \left ( x \right ) \right ) ^{1+{\frac {1}{2}\sqrt {1-a}}} \left ( \cos \left ( x \right ) -1 \right ) ^{-{\frac {1}{2}\sqrt {1-a}}}+{\it \_C2}\, \left ( 1+\cos \left ( x \right ) \right ) ^{1-{\frac {1}{2}\sqrt {1-a}}} \left ( \cos \left ( x \right ) -1 \right ) ^{{\frac {1}{2}\sqrt {1-a}}} \right ) } \right \} \] Mathematica raw input
DSolve[a*Csc[x]^2*y[x] + (2 + Cos[x])*Csc[x]*y'[x] + y''[x] == 0,y[x],x]
Mathematica raw output
{{y[x] -> (C[1] + E^(Sqrt[1 - a]*(Log[1 - Cos[x]] - Log[1 + Cos[x]]))*C[2])/E^((
(1 + Sqrt[1 - a])*(Log[1 - Cos[x]] - Log[1 + Cos[x]]))/2)}}
Maple raw input
dsolve(diff(diff(y(x),x),x)+diff(y(x),x)*csc(x)*(2+cos(x))+a*y(x)*csc(x)^2 = 0, y(x),'implicit')
Maple raw output
y(x) = (_C1*(1+cos(x))^(1+1/2*(1-a)^(1/2))*(cos(x)-1)^(-1/2*(1-a)^(1/2))+_C2*(1+
cos(x))^(1-1/2*(1-a)^(1/2))*(cos(x)-1)^(1/2*(1-a)^(1/2)))/sin(x)