4.2.22 y(x)=sin(x)(2sec2(x)y(x))

ODE
y(x)=sin(x)(2sec2(x)y(x)) ODE Classification

[_linear]

Book solution method
Riccati ODE, Generalized ODE

Mathematica
cpu = 0.064027 (sec), leaf count = 28

{{y(x)c1ecos(x)+2ecos(x)Ei(cos(x))+2sec(x)}}

Maple
cpu = 0.271 (sec), leaf count = 29

{y(x)=(4sin(x)ecos(x)cos(2x)+1dx+_C1)ecos(x)} Mathematica raw input

DSolve[y'[x] == Sin[x]*(2*Sec[x]^2 - y[x]),y[x],x]

Mathematica raw output

{{y[x] -> E^Cos[x]*C[1] + 2*E^Cos[x]*ExpIntegralEi[-Cos[x]] + 2*Sec[x]}}

Maple raw input

dsolve(diff(y(x),x) = sin(x)*(2*sec(x)^2-y(x)), y(x),'implicit')

Maple raw output

y(x) = (Int(4*sin(x)/(cos(2*x)+1)*exp(-cos(x)),x)+_C1)*exp(cos(x))