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 Classiﬁcation

[_linear]

Book solution method
Linear ODE

Mathematica
cpu = 1.0232 (sec), leaf count = 156

$\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 (\int _1^x4 \exp \left (4 K[1] \left (\log \left (1+e^{i K[1]}\right )-\log \left (1-e^{i K[1]}\right )\right )-4 i \text {Li}_2\left (-e^{i K[1]}\right )+4 i \text {Li}_2\left (e^{i K[1]}\right )\right ) \cos (2 K[1]) \csc (K[1]) K[1] \sec ^2(K[1])dK[1]+c_1\right )\right \}\right \}$

Maple
cpu = 1.025 (sec), leaf count = 178

$\left [y \left (x \right ) = \left (1+{\mathrm e}^{i x}\right )^{-4 x} \left (1-{\mathrm e}^{i x}\right )^{4 x} {\mathrm e}^{4 i \left (\dilog \left (1+{\mathrm e}^{i x}\right )-\dilog \left (1-{\mathrm e}^{i x}\right )\right )} \textit {\_C1} +4 \left (1+{\mathrm e}^{i x}\right )^{-4 x} \left (1-{\mathrm e}^{i x}\right )^{4 x} {\mathrm e}^{4 i \left (\dilog \left (1+{\mathrm e}^{i x}\right )-\dilog \left (1-{\mathrm e}^{i x}\right )\right )} \left (\int \frac {4 \left (1-{\mathrm e}^{i x}\right )^{-4 x} \left (1+{\mathrm e}^{i x}\right )^{4 x} x \,{\mathrm e}^{-4 i \left (\dilog \left (1+{\mathrm e}^{i x}\right )-\dilog \left (1-{\mathrm e}^{i x}\right )\right )} \left (-\sin \left (3 x \right )+\sin \left (x \right )\right )}{-1+\cos \left (4 x \right )}d x \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] + Inactive[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)*Po
lyLog[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))

Maple raw output

[y(x) = (1+exp(I*x))^(-4*x)*(1-exp(I*x))^(4*x)*exp(4*I*(dilog(1+exp(I*x))-dilog(
1-exp(I*x))))*_C1+4*(1+exp(I*x))^(-4*x)*(1-exp(I*x))^(4*x)*exp(4*I*(dilog(1+exp(
I*x))-dilog(1-exp(I*x))))*Int(4*(1-exp(I*x))^(-4*x)*(1+exp(I*x))^(4*x)*x*exp(-4*
I*(dilog(1+exp(I*x))-dilog(1-exp(I*x))))*(-sin(3*x)+sin(x))/(-1+cos(4*x)),x)]