4.2.41 \(y'(x)+y(x) \left (y(x)^2 \sec (x)+\tan (x)\right )=0\)

ODE
\[ y'(x)+y(x) \left (y(x)^2 \sec (x)+\tan (x)\right )=0 \] ODE Classification

[_Bernoulli]

Book solution method
The Bernoulli ODE

Mathematica
cpu = 0.0322549 (sec), leaf count = 43

\[\left \{\left \{y(x)\to -\frac {1}{\sqrt {\sec ^2(x) \left (c_1+2 \sin (x)\right )}}\right \},\left \{y(x)\to \frac {1}{\sqrt {\sec ^2(x) \left (c_1+2 \sin (x)\right )}}\right \}\right \}\]

Maple
cpu = 0.034 (sec), leaf count = 21

\[ \left \{ \left (y \relax (x ) \right ) ^{-2}+{\frac {-{\it \_C1}-2\,\sin \relax (x ) }{ \left (\cos \relax (x ) \right ) ^{2}}}=0 \right \} \] Mathematica raw input

DSolve[y[x]*(Tan[x] + Sec[x]*y[x]^2) + y'[x] == 0,y[x],x]

Mathematica raw output

{{y[x] -> -(1/Sqrt[Sec[x]^2*(C[1] + 2*Sin[x])])}, {y[x] -> 1/Sqrt[Sec[x]^2*(C[1]
 + 2*Sin[x])]}}

Maple raw input

dsolve(diff(y(x),x)+(tan(x)+y(x)^2*sec(x))*y(x) = 0, y(x),'implicit')

Maple raw output

1/y(x)^2+(-_C1-2*sin(x))/cos(x)^2 = 0