72.4.2 problem 2

Internal problem ID [19411]
Book : DIFFERENTIAL EQUATIONS WITH APPLICATIONS AND HISTORICAL NOTES by George F. Simmons. 3rd edition. 2017. CRC press, Boca Raton FL.
Section : Chapter 2. First order equations. Section 8 (Exact Equations). Problems at page 72
Problem number : 2
Date solved : Thursday, October 02, 2025 at 04:23:13 PM
CAS classification : [`y=_G(x,y')`]

\begin{align*} \sin \left (x \right ) \tan \left (y\right )+1+\cos \left (x \right ) \sec \left (y\right )^{2} y^{\prime }&=0 \end{align*}
Maple
ode:=sin(x)*tan(y(x))+1+cos(x)*sec(y(x))^2*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ \text {No solution found} \]
Mathematica. Time used: 1.476 (sec). Leaf size: 54
ode=(Sin[x]*Tan[y[x]]+1)+Cos[x]*Sec[y[x]]^2*D[y[x],x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to -\arctan (\sin (x)+c_1 \cos (x))\\ y(x)&\to -\frac {1}{2} \pi \sqrt {\cos ^2(x)} \sec (x)\\ y(x)&\to \frac {1}{2} \pi \sqrt {\cos ^2(x)} \sec (x) \end{align*}
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(sin(x)*tan(y(x)) + cos(x)*Derivative(y(x), x)/cos(y(x))**2 + 1,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
KeyError : _y