89.1.13 problem 13

Internal problem ID [24248]
Book : A short course in Differential Equations. Earl D. Rainville. Second edition. 1958. Macmillan Publisher, NY. CAT 58-5010
Section : Chapter 2. Equations of the first order and first degree. Exercises at page 21
Problem number : 13
Date solved : Thursday, October 02, 2025 at 10:01:37 PM
CAS classification : [_separable]

\begin{align*} x \cos \left (y\right )^{2}+\tan \left (y\right ) y^{\prime }&=0 \end{align*}
Maple. Time used: 0.003 (sec). Leaf size: 35
ode:=x*cos(y(x))^2+tan(y(x))*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} y &= \operatorname {arccot}\left (\frac {1}{\sqrt {-x^{2}-2 c_1}}\right ) \\ y &= \pi -\operatorname {arccot}\left (\frac {1}{\sqrt {-x^{2}-2 c_1}}\right ) \\ \end{align*}
Mathematica. Time used: 0.654 (sec). Leaf size: 103
ode=( x*Cos[y[x]]^2 )+( Tan[y[x]] )*D[y[x],x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to -\sec ^{-1}\left (-\sqrt {-x^2+8 c_1}\right )\\ y(x)&\to \sec ^{-1}\left (-\sqrt {-x^2+8 c_1}\right )\\ y(x)&\to -\sec ^{-1}\left (\sqrt {-x^2+8 c_1}\right )\\ y(x)&\to \sec ^{-1}\left (\sqrt {-x^2+8 c_1}\right )\\ y(x)&\to -\frac {\pi }{2}\\ y(x)&\to \frac {\pi }{2} \end{align*}
Sympy. Time used: 1.405 (sec). Leaf size: 71
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x*cos(y(x))**2 + tan(y(x))*Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = - \operatorname {acos}{\left (- \sqrt {- \frac {1}{C_{1} + x^{2}}} \right )} + 2 \pi , \ y{\left (x \right )} = - \operatorname {acos}{\left (\sqrt {- \frac {1}{C_{1} + x^{2}}} \right )} + 2 \pi , \ y{\left (x \right )} = \operatorname {acos}{\left (- \sqrt {- \frac {1}{C_{1} + x^{2}}} \right )}, \ y{\left (x \right )} = \operatorname {acos}{\left (\sqrt {- \frac {1}{C_{1} + x^{2}}} \right )}\right ] \]