ODE
\[ y''(x)+y'(x) (\cot (x)+\csc (x))=a \csc (x)+1 \] ODE Classification
[[_2nd_order, _missing_y]]
Book solution method
TO DO
Mathematica ✓
cpu = 0.194706 (sec), leaf count = 77
\[\left \{\left \{y(x)\to \frac {e^{i x} \left (2 a x+2 c_2-i x+1\right )+2 i a \left (1+e^{i x}\right ) \log \left (1+e^{i x}\right )+2 i c_1-i x-1}{-1+e^{i x}}\right \}\right \}\]
Maple ✓
cpu = 1.181 (sec), leaf count = 274
\[ \left \{ y \left ( x \right ) ={\frac {1}{-1+{{\rm e}^{ix}}} \left ( -a\pi \, \left ( {\it csgn} \left ( {\frac {i{{\rm e}^{ix}}}{ \left ( 1+{{\rm e}^{ix}} \right ) ^{2}}} \right ) \right ) ^{3}+a\pi \, \left ( {\it csgn} \left ( i{{\rm e}^{ix}} \right ) +{\it csgn} \left ( {\frac {i}{ \left ( 1+{{\rm e}^{ix}} \right ) ^{2}}} \right ) \right ) \left ( {\it csgn} \left ( {\frac {i{{\rm e}^{ix}}}{ \left ( 1+{{\rm e}^{ix}} \right ) ^{2}}} \right ) \right ) ^{2}-a\pi \,{\it csgn} \left ( {\frac {i}{ \left ( 1+{{\rm e}^{ix}} \right ) ^{2}}} \right ) {\it csgn} \left ( i{{\rm e}^{ix}} \right ) {\it csgn} \left ( {\frac {i{{\rm e}^{ix}}}{ \left ( 1+{{\rm e}^{ix}} \right ) ^{2}}} \right ) +a\pi \, \left ( {\it csgn} \left ( i \left ( 1+{{\rm e}^{ix}} \right ) ^{2} \right ) \right ) ^{3}-2\,a\pi \,{\it csgn} \left ( i+i{{\rm e}^{ix}} \right ) \left ( {\it csgn} \left ( i \left ( 1+{{\rm e}^{ix}} \right ) ^{2} \right ) \right ) ^{2}+a\pi \, \left ( {\it csgn} \left ( i+i{{\rm e}^{ix}} \right ) \right ) ^{2}{\it csgn} \left ( i \left ( 1+{{\rm e}^{ix}} \right ) ^{2} \right ) +2\,ia \left ( 1+{{\rm e}^{ix}} \right ) \ln \left ( 1+{{\rm e}^{ix}} \right ) -2\,ia\ln \left ( {{\rm e}^{ix}} \right ) + \left ( -ix+2\,ax+{\it \_C2} \right ) {{\rm e}^{ix}}-4\,i\ln \left ( 2 \right ) a-ix-2\,i{\it \_C1}-2\,ax-{\it \_C2} \right ) } \right \} \] Mathematica raw input
DSolve[(Cot[x] + Csc[x])*y'[x] + y''[x] == 1 + a*Csc[x],y[x],x]
Mathematica raw output
{{y[x] -> (-1 - I*x + (2*I)*C[1] + E^(I*x)*(1 - I*x + 2*a*x + 2*C[2]) + (2*I)*a*
(1 + E^(I*x))*Log[1 + E^(I*x)])/(-1 + E^(I*x))}}
Maple raw input
dsolve(diff(diff(y(x),x),x)+(cot(x)+csc(x))*diff(y(x),x) = 1+a*csc(x), y(x),'implicit')
Maple raw output
y(x) = (-a*Pi*csgn(I*exp(I*x)/(1+exp(I*x))^2)^3+a*Pi*(csgn(I*exp(I*x))+csgn(I/(1
+exp(I*x))^2))*csgn(I*exp(I*x)/(1+exp(I*x))^2)^2-a*Pi*csgn(I/(1+exp(I*x))^2)*csg
n(I*exp(I*x))*csgn(I*exp(I*x)/(1+exp(I*x))^2)+a*Pi*csgn(I*(1+exp(I*x))^2)^3-2*a*
Pi*csgn(I+I*exp(I*x))*csgn(I*(1+exp(I*x))^2)^2+a*Pi*csgn(I+I*exp(I*x))^2*csgn(I*
(1+exp(I*x))^2)+2*I*a*(1+exp(I*x))*ln(1+exp(I*x))-2*I*a*ln(exp(I*x))+(-I*x+2*a*x
+_C2)*exp(I*x)-4*I*ln(2)*a-I*x-2*I*_C1-2*a*x-_C2)/(-1+exp(I*x))