4.1.24 \(y'(x)=4 x \csc (x) \left (y(x)-\tan ^2(x)+1\right )\)

ODE
\[ y'(x)=4 x \csc (x) \left (y(x)-\tan ^2(x)+1\right ) \] ODE Classification

[_linear]

Book solution method
Linear ODE

Mathematica
cpu = 28.6501 (sec), leaf count = 155

\[\left \{\left \{y(x)\to \exp \left (4 i \text {Li}_2\left (-e^{i x}\right )-4 i \text {Li}_2\left (e^{i x}\right )+4 x \left (\log \left (1-e^{i x}\right )-\log \left (1+e^{i x}\right )\right )\right ) \left (c_1+\int _1^x 4 K[1] \cos (2 K[1]) \csc (K[1]) \sec ^2(K[1]) \exp \left (-4 i \text {Li}_2\left (-e^{i K[1]}\right )+4 i \text {Li}_2\left (e^{i K[1]}\right )+4 K[1] \left (\log \left (1+e^{i K[1]}\right )-\log \left (1-e^{i K[1]}\right )\right )\right ) \, dK[1]\right )\right \}\right \}\]

Maple
cpu = 1.476 (sec), leaf count = 125

\[ \left \{ y \relax (x ) ={{\rm e}^{-4\,i \left ({\it polylog} \left (2,{{\rm e}^{ix}} \right ) -{\it polylog} \left (2,-{{\rm e}^{ix}} \right ) \right ) }} \left (1-{{\rm e}^{ix}} \right ) ^{4\,x} \left (1+{{\rm e}^{ix}} \right ) ^{-4\,x} \left (4\,\int \!4\,{\frac {x \left (1-{{\rm e}^{ix}} \right ) ^{-4\,x} \left (1+{{\rm e}^{ix}} \right ) ^{4\,x}{{\rm e}^{4\,i \left ({\it polylog} \left (2,{{\rm e}^{ix}} \right ) -{\it polylog} \left (2,-{{\rm e}^{ix}} \right ) \right ) }} \left (-\sin \left (3\,x \right ) +\sin \relax (x ) \right ) }{-1+\cos \left (4\,x \right ) }}\,{\rm d}x+{\it \_C1} \right ) \right \} \] Mathematica raw input

DSolve[y'[x] == 4*x*Csc[x]*(1 - Tan[x]^2 + y[x]),y[x],x]

Mathematica raw output

{{y[x] -> E^(4*x*(Log[1 - E^(I*x)] - Log[1 + E^(I*x)]) + (4*I)*PolyLog[2, -E^(I*
x)] - (4*I)*PolyLog[2, E^(I*x)])*(C[1] + Integrate[4*E^(4*K[1]*(-Log[1 - E^(I*K[
1])] + Log[1 + E^(I*K[1])]) - (4*I)*PolyLog[2, -E^(I*K[1])] + (4*I)*PolyLog[2, E
^(I*K[1])])*Cos[2*K[1]]*Csc[K[1]]*K[1]*Sec[K[1]]^2, {K[1], 1, x}])}}

Maple raw input

dsolve(diff(y(x),x) = 4*csc(x)*x*(1-tan(x)^2+y(x)), y(x),'implicit')

Maple raw output

y(x) = exp(-4*I*(polylog(2,exp(I*x))-polylog(2,-exp(I*x))))*(1-exp(I*x))^(4*x)*(
1+exp(I*x))^(-4*x)*(4*Int(4*x*(1-exp(I*x))^(-4*x)*(1+exp(I*x))^(4*x)*exp(4*I*(po
lylog(2,exp(I*x))-polylog(2,-exp(I*x))))*(-sin(3*x)+sin(x))/(-1+cos(4*x)),x)+_C1
)