4.2.25 \(y'(x)+\left (1-y(x)^2\right ) \tan (x)=0\)

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

[_separable]

Book solution method
Separable ODE, Neither variable missing

Mathematica
cpu = 0.282676 (sec), leaf count = 35

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

Maple
cpu = 0.046 (sec), leaf count = 14

\[[y \left (x \right ) = -\tanh \left (-\ln \left (\cos \left (x \right )\right )+\textit {\_C1} \right )]\] Mathematica raw input

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

Mathematica raw output

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

Maple raw input

dsolve(diff(y(x),x)+tan(x)*(1-y(x)^2) = 0, y(x))

Maple raw output

[y(x) = -tanh(-ln(cos(x))+_C1)]