4.27.16 \(y''(x)+2 \cot (x) y'(x)+3 y(x)=e^x \csc (x)\)

ODE
\[ y''(x)+2 \cot (x) y'(x)+3 y(x)=e^x \csc (x) \] ODE Classification

[[_2nd_order, _linear, _nonhomogeneous]]

Book solution method
TO DO

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

\[\left \{\left \{y(x)\to \frac {e^{-i x} \left (5 c_2 e^{4 i x}+20 i c_1+4 i e^{(1+2 i) x}\right )}{10 \left (-1+e^{2 i x}\right )}\right \}\right \}\]

Maple
cpu = 0.441 (sec), leaf count = 76

\[ \left \{ y \left ( x \right ) ={\frac {- \left ( \left ( -2+i \right ) \cos \left ( 2\,x \right ) - \left ( 1+2\,i \right ) \sin \left ( 2\,x \right ) \right ) {{\rm e}^{x}}{{\rm e}^{-2\,ix}}+{{\rm e}^{x}} \left ( \left ( 2+i \right ) \cos \left ( 2\,x \right ) + \left ( 1-2\,i \right ) \sin \left ( 2\,x \right ) \right ) {{\rm e}^{2\,ix}}+20\,\cos \left ( 2\,x \right ) {\it \_C1}+20\,\sin \left ( 2\,x \right ) {\it \_C2}}{20\,\sin \left ( x \right ) }} \right \} \] Mathematica raw input

DSolve[3*y[x] + 2*Cot[x]*y'[x] + y''[x] == E^x*Csc[x],y[x],x]

Mathematica raw output

{{y[x] -> ((4*I)*E^((1 + 2*I)*x) + (20*I)*C[1] + 5*E^((4*I)*x)*C[2])/(10*E^(I*x)
*(-1 + E^((2*I)*x)))}}

Maple raw input

dsolve(diff(diff(y(x),x),x)+2*cot(x)*diff(y(x),x)+3*y(x) = exp(x)*csc(x), y(x),'implicit')

Maple raw output

y(x) = 1/20*(-((-2+I)*cos(2*x)-(1+2*I)*sin(2*x))*exp(x)*exp(-2*I*x)+exp(x)*((2+I
)*cos(2*x)+(1-2*I)*sin(2*x))*exp(2*I*x)+20*cos(2*x)*_C1+20*sin(2*x)*_C2)/sin(x)