4.43.49 \(y'''(x)+y''(x) (2 \cot (x)+\csc (x))-y'(x)=\cot (x)\)

ODE
\[ y'''(x)+y''(x) (2 \cot (x)+\csc (x))-y'(x)=\cot (x) \] ODE Classification

[[_3rd_order, _missing_y]]

Book solution method
TO DO

Mathematica
cpu = 1.1473 (sec), leaf count = 56

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

Maple
cpu = 27.286 (sec), leaf count = 315

\[\left [y \left (x \right ) = \frac {2 i \textit {\_C1} \ln \left ({\mathrm e}^{i x}\right )}{{\mathrm e}^{i x}-1}-\frac {\textit {\_C1} \pi \,\mathrm {csgn}\left (i {\mathrm e}^{-i x}\right ) \mathrm {csgn}\left (i \left (1+{\mathrm e}^{i x}\right )^{2}\right ) \mathrm {csgn}\left (i {\mathrm e}^{-i x} \left (1+{\mathrm e}^{i x}\right )^{2}\right )-\textit {\_C1} \pi \,\mathrm {csgn}\left (i {\mathrm e}^{-i x}\right ) \mathrm {csgn}\left (i {\mathrm e}^{-i x} \left (1+{\mathrm e}^{i x}\right )^{2}\right )^{2}+\textit {\_C1} \pi \mathrm {csgn}\left (i \left (1+{\mathrm e}^{i x}\right )\right )^{2} \mathrm {csgn}\left (i \left (1+{\mathrm e}^{i x}\right )^{2}\right )-2 \textit {\_C1} \pi \,\mathrm {csgn}\left (i \left (1+{\mathrm e}^{i x}\right )\right ) \mathrm {csgn}\left (i \left (1+{\mathrm e}^{i x}\right )^{2}\right )^{2}+\textit {\_C1} \pi \mathrm {csgn}\left (i \left (1+{\mathrm e}^{i x}\right )^{2}\right )^{3}-\textit {\_C1} \pi \,\mathrm {csgn}\left (i \left (1+{\mathrm e}^{i x}\right )^{2}\right ) \mathrm {csgn}\left (i {\mathrm e}^{-i x} \left (1+{\mathrm e}^{i x}\right )^{2}\right )^{2}+\textit {\_C1} \pi \mathrm {csgn}\left (i {\mathrm e}^{-i x} \left (1+{\mathrm e}^{i x}\right )^{2}\right )^{3}+2 i \textit {\_C1} \ln \left (1+{\mathrm e}^{i x}\right )+2 i \textit {\_C1} \ln \left (1+{\mathrm e}^{i x}\right ) {\mathrm e}^{i x}+2 i \textit {\_C2} -2 i \ln \left (2\right ) \textit {\_C1} +2 \textit {\_C1} x \,{\mathrm e}^{i x}+i x +i x \,{\mathrm e}^{i x}-2 \textit {\_C1} x}{{\mathrm e}^{i x}-1}+\textit {\_C3}\right ]\] Mathematica raw input

DSolve[-y'[x] + (2*Cot[x] + Csc[x])*y''[x] + y'''[x] == Cot[x],y[x],x]

Mathematica raw output

{{y[x] -> -((x*C[2])/Sqrt[2]) + C[3] + ArcSin[Cos[x]]*Cot[x/2] - (Cot[x/2]*(2*C[
1] + C[2]*Log[2*(1 + Cos[x])]))/Sqrt[2]}}

Maple raw input

dsolve(diff(diff(diff(y(x),x),x),x)+(2*cot(x)+csc(x))*diff(diff(y(x),x),x)-diff(y(x),x) = cot(x), y(x))

Maple raw output

[y(x) = 2*I*_C1/(exp(I*x)-1)*ln(exp(I*x))-(_C1*Pi*csgn(I*exp(-I*x))*csgn(I*(1+ex
p(I*x))^2)*csgn(I*exp(-I*x)*(1+exp(I*x))^2)-_C1*Pi*csgn(I*exp(-I*x))*csgn(I*exp(
-I*x)*(1+exp(I*x))^2)^2+_C1*Pi*csgn(I*(1+exp(I*x)))^2*csgn(I*(1+exp(I*x))^2)-2*_
C1*Pi*csgn(I*(1+exp(I*x)))*csgn(I*(1+exp(I*x))^2)^2+_C1*Pi*csgn(I*(1+exp(I*x))^2
)^3-_C1*Pi*csgn(I*(1+exp(I*x))^2)*csgn(I*exp(-I*x)*(1+exp(I*x))^2)^2+_C1*Pi*csgn
(I*exp(-I*x)*(1+exp(I*x))^2)^3+2*I*_C1*ln(1+exp(I*x))+2*I*_C1*ln(1+exp(I*x))*exp
(I*x)+2*I*_C2-2*I*ln(2)*_C1+2*_C1*x*exp(I*x)+I*x+I*x*exp(I*x)-2*_C1*x)/(exp(I*x)
-1)+_C3]