ODE
\[ y'(x)=y(x) \sec (x)+(\sin (x)-1)^2 \] ODE Classification
[_linear]
Book solution method
The Bernoulli ODE
Mathematica ✓
cpu = 0.0521092 (sec), leaf count = 50
\[\left \{\left \{y(x)\to -\frac {1}{4} e^{2 \tanh ^{-1}\left (\tan \left (\frac {x}{2}\right )\right )} \left (\cos (2 x)-4 \left (c_1-3 \sin (x)+8 \log \left (\sin \left (\frac {x}{2}\right )+\cos \left (\frac {x}{2}\right )\right )\right )\right )\right \}\right \}\]
Maple ✓
cpu = 0.215 (sec), leaf count = 35
\[ \left \{ y \left ( x \right ) = \left ( \sec \left ( x \right ) +\tan \left ( x \right ) \right ) \left ( -{\frac { \left ( \cos \left ( x \right ) \right ) ^{2}}{2}}+{\it \_C1}-3\,\sin \left ( x \right ) +4\,\ln \left ( \cos \left ( x \right ) \right ) +4\,\ln \left ( \sec \left ( x \right ) +\tan \left ( x \right ) \right ) \right ) \right \} \] Mathematica raw input
DSolve[y'[x] == (-1 + Sin[x])^2 + Sec[x]*y[x],y[x],x]
Mathematica raw output
{{y[x] -> -(E^(2*ArcTanh[Tan[x/2]])*(Cos[2*x] - 4*(C[1] + 8*Log[Cos[x/2] + Sin[x
/2]] - 3*Sin[x])))/4}}
Maple raw input
dsolve(diff(y(x),x) = y(x)*sec(x)+(sin(x)-1)^2, y(x),'implicit')
Maple raw output
y(x) = (sec(x)+tan(x))*(-1/2*cos(x)^2+_C1-3*sin(x)+4*ln(cos(x))+4*ln(sec(x)+tan(
x)))