86.2.7 problem 7

Internal problem ID [23081]
Book : An introduction to Differential Equations. By Howard Frederick Cleaves. 1969. Oliver and Boyd publisher. ISBN 0050015044
Section : Chapter 3. Some standard types of differential equations. Exercise 3c at page 50
Problem number : 7
Date solved : Thursday, October 02, 2025 at 09:19:16 PM
CAS classification : [_separable]

\begin{align*} x \sec \left (y\right )^{2} y^{\prime }+1+\tan \left (y\right )&=0 \end{align*}
Maple. Time used: 0.005 (sec). Leaf size: 19
ode:=x*sec(y(x))^2*diff(y(x),x)+1+tan(y(x)) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = -\arctan \left (\frac {c_1 x -1}{x c_1}\right ) \]
Mathematica. Time used: 57.465 (sec). Leaf size: 302
ode=x*Sec[ y[x] ]^2*D[y[x],x]+ (1+Tan[ y[x] ]) ==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to -\arccos \left (-\frac {x}{\sqrt {2 x^2-2 e^{2 c_1} x+e^{4 c_1}}}\right )\\ y(x)&\to \arccos \left (-\frac {x}{\sqrt {2 x^2-2 e^{2 c_1} x+e^{4 c_1}}}\right )\\ y(x)&\to -\arccos \left (\frac {x}{\sqrt {2 x^2-2 e^{2 c_1} x+e^{4 c_1}}}\right )\\ y(x)&\to \arccos \left (\frac {x}{\sqrt {2 x^2-2 e^{2 c_1} x+e^{4 c_1}}}\right )\\ y(x)&\to -\frac {\pi }{2}\\ y(x)&\to -\frac {\pi }{4}\\ y(x)&\to \frac {\pi }{2}\\ y(x)&\to -\frac {\pi }{2}-i \log \left (\frac {1-\frac {i x}{\sqrt {x^2}}}{\sqrt {2}}\right )\\ y(x)&\to \frac {1}{2} \left (\pi +2 i \log \left (\frac {1-\frac {i x}{\sqrt {x^2}}}{\sqrt {2}}\right )\right )\\ y(x)&\to -\frac {\pi }{2}-i \log \left (\frac {1+\frac {i x}{\sqrt {x^2}}}{\sqrt {2}}\right )\\ y(x)&\to \frac {1}{2} \left (\pi +2 i \log \left (\frac {1+\frac {i x}{\sqrt {x^2}}}{\sqrt {2}}\right )\right ) \end{align*}
Sympy. Time used: 0.690 (sec). Leaf size: 27
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x*sec(y(x))**2*Derivative(y(x), x) + tan(y(x)) + 1,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \operatorname {atan}{\left (\frac {C_{1} + \sqrt {2} C_{1} - \sqrt {2} x + x}{- C_{1} + x} \right )} - \frac {\pi }{8} \]