85.33.22 problem 22

Internal problem ID [22645]
Book : Applied Differential Equations. By Murray R. Spiegel. 3rd edition. 1980. Pearson. ISBN 978-0130400970
Section : Chapter two. First order and simple higher order ordinary differential equations. A Exercises at page 65
Problem number : 22
Date solved : Thursday, October 02, 2025 at 09:01:42 PM
CAS classification : [`y=_G(x,y')`]

\begin{align*} \tan \left (y\right )-\tan \left (y\right )^{2} \cos \left (x \right )-x \sec \left (y\right )^{2} y^{\prime }&=0 \end{align*}
Maple. Time used: 0.111 (sec). Leaf size: 15
ode:=tan(y(x))-tan(y(x))^2*cos(x)-x*sec(y(x))^2*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \arctan \left (\frac {x}{-c_1 +\sin \left (x \right )}\right ) \]
Mathematica. Time used: 0.405 (sec). Leaf size: 27
ode=(Tan[y[x]]-Tan[y[x]]^2*Cos[x] )-(x*Sec[y[x]]^2 )*D[y[x],x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \cot ^{-1}\left (\frac {4 \sin (x)-c_1}{4 x}\right )\\ y(x)&\to 0 \end{align*}
Sympy. Time used: 4.663 (sec). Leaf size: 71
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x*sec(y(x))**2*Derivative(y(x), x) - cos(x)*tan(y(x))**2 + tan(y(x)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = - 2 \operatorname {atan}{\left (\frac {C_{1} - \sqrt {C_{1}^{2} + 2 C_{1} \sin {\left (x \right )} + x^{2} + \sin ^{2}{\left (x \right )}} + \sin {\left (x \right )}}{x} \right )}, \ y{\left (x \right )} = - 2 \operatorname {atan}{\left (\frac {C_{1} + \sqrt {C_{1}^{2} + 2 C_{1} \sin {\left (x \right )} + x^{2} + \sin ^{2}{\left (x \right )}} + \sin {\left (x \right )}}{x} \right )}\right ] \]