78.4.5 problem 6

Internal problem ID [18057]
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 : 6
Date solved : Monday, March 31, 2025 at 05:01:05 PM
CAS classification : [_separable]

\begin{align*} \cos \left (x \right ) \cos \left (y\right )^{2}+2 \sin \left (x \right ) \sin \left (y\right ) \cos \left (y\right ) y^{\prime }&=0 \end{align*}

Maple. Time used: 0.087 (sec). Leaf size: 31
ode:=cos(x)*cos(y(x))^2+2*sin(x)*sin(y(x))*cos(y(x))*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} y &= \frac {\pi }{2} \\ y &= \arccos \left (\sqrt {\sin \left (x \right ) c_1}\right ) \\ y &= \frac {\pi }{2}+\arcsin \left (\sqrt {\sin \left (x \right ) c_1}\right ) \\ \end{align*}
Mathematica. Time used: 5.061 (sec). Leaf size: 73
ode=(Cos[x]*Cos[y[x]]^2)+(2*Sin[x]*Sin[y[x]]*Cos[y[x]])*D[y[x],x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to -\frac {\pi }{2} \\ y(x)\to \frac {\pi }{2} \\ y(x)\to -\arccos \left (-\frac {1}{4} c_1 \sqrt {\sin (x)}\right ) \\ y(x)\to \arccos \left (-\frac {1}{4} c_1 \sqrt {\sin (x)}\right ) \\ y(x)\to -\frac {\pi }{2} \\ y(x)\to \frac {\pi }{2} \\ \end{align*}
Sympy. Time used: 0.848 (sec). Leaf size: 27
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(2*sin(x)*sin(y(x))*cos(y(x))*Derivative(y(x), x) + cos(x)*cos(y(x))**2,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = - \operatorname {acos}{\left (C_{1} \sqrt {\sin {\left (x \right )}} \right )} + 2 \pi , \ y{\left (x \right )} = \operatorname {acos}{\left (C_{1} \sqrt {\sin {\left (x \right )}} \right )}\right ] \]