15.1.15 problem 15

Internal problem ID [2855]
Book : Differential Equations by Alfred L. Nelson, Karl W. Folley, Max Coral. 3rd ed. DC heath. Boston. 1964
Section : Exercise 5, page 21
Problem number : 15
Date solved : Tuesday, March 04, 2025 at 02:51:25 PM
CAS classification : [_separable]

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

Maple. Time used: 0.004 (sec). Leaf size: 11
ode:=sec(x)*cos(y(x))^2 = cos(x)*sin(y(x))*diff(y(x),x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \arccos \left (\frac {1}{\tan \left (x \right )+c_1}\right ) \]
Mathematica. Time used: 0.772 (sec). Leaf size: 45
ode=Sec[x]*Cos[y[x]]^2==Cos[x]*Sin[y[x]]*D[y[x],x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to -\sec ^{-1}(\tan (x)+2 c_1) \\ y(x)\to \sec ^{-1}(\tan (x)+2 c_1) \\ y(x)\to -\frac {\pi }{2} \\ y(x)\to \frac {\pi }{2} \\ \end{align*}
Sympy. Time used: 0.930 (sec). Leaf size: 34
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-sin(y(x))*cos(x)*Derivative(y(x), x) + cos(y(x))**2/cos(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = - \operatorname {acos}{\left (\frac {\cos {\left (x \right )}}{C_{1} \cos {\left (x \right )} + \sin {\left (x \right )}} \right )} + 2 \pi , \ y{\left (x \right )} = \operatorname {acos}{\left (\frac {\cos {\left (x \right )}}{C_{1} \cos {\left (x \right )} + \sin {\left (x \right )}} \right )}\right ] \]