4.27.27 \(y''(x)-(3 \cos (x)+2) \csc (x) y'(x)-2 y(x) (\cos (x)+1) \sec (x)=0\)

ODE
\[ y''(x)-(3 \cos (x)+2) \csc (x) y'(x)-2 y(x) (\cos (x)+1) \sec (x)=0 \] ODE Classification

[[_2nd_order, _with_linear_symmetries]]

Book solution method
TO DO

Mathematica
cpu = 0.371841 (sec), leaf count = 30

\[\left \{\left \{y(x)\to c_2 \left (-\cos ^2(x)+2 \cos (x) \log (\cos (x))+1\right )-c_1 \cos (x)\right \}\right \}\]

Maple
cpu = 1.599 (sec), leaf count = 25

\[\left [y \left (x \right ) = \left (\left (-\cos \left (x \right )+\frac {1}{\cos \left (x \right )}+2 \ln \left (\cos \left (x \right )\right )\right ) \textit {\_C1} +\textit {\_C2} \right ) \cos \left (x \right )\right ]\] Mathematica raw input

DSolve[-2*(1 + Cos[x])*Sec[x]*y[x] - (2 + 3*Cos[x])*Csc[x]*y'[x] + y''[x] == 0,y[x],x]

Mathematica raw output

{{y[x] -> -(C[1]*Cos[x]) + C[2]*(1 - Cos[x]^2 + 2*Cos[x]*Log[Cos[x]])}}

Maple raw input

dsolve(diff(diff(y(x),x),x)-diff(y(x),x)*csc(x)*(2+3*cos(x))-2*y(x)*sec(x)*(1+cos(x)) = 0, y(x))

Maple raw output

[y(x) = ((-cos(x)+1/cos(x)+2*ln(cos(x)))*_C1+_C2)*cos(x)]