23.1.81 problem 75

Internal problem ID [4688]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Part II. Chapter 1. THE DIFFERENTIAL EQUATION IS OF FIRST ORDER AND OF FIRST DEGREE, page 223
Problem number : 75
Date solved : Tuesday, September 30, 2025 at 08:14:48 AM
CAS classification : [_separable]

\begin{align*} y^{\prime }+\tan \left (x \right ) \left (1-y^{2}\right )&=0 \end{align*}
Maple. Time used: 0.004 (sec). Leaf size: 14
ode:=diff(y(x),x)+tan(x)*(1-y(x)^2) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = -\tanh \left (-\ln \left (\cos \left (x \right )\right )+c_1 \right ) \]
Mathematica. Time used: 0.203 (sec). Leaf size: 46
ode=D[y[x],x]+Tan[x]*(1-y[x]^2)==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \text {InverseFunction}\left [\int _1^{\text {$\#$1}}\frac {1}{(K[1]-1) (K[1]+1)}dK[1]\&\right ][-\log (\cos (x))+c_1]\\ y(x)&\to -1\\ y(x)&\to 1 \end{align*}
Sympy. Time used: 0.409 (sec). Leaf size: 15
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((1 - y(x)**2)*tan(x) + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {C_{1} + \cos ^{2}{\left (x \right )}}{- C_{1} + \cos ^{2}{\left (x \right )}} \]