29.4.19 problem 108

Internal problem ID [4710]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 4
Problem number : 108
Date solved : Sunday, March 30, 2025 at 03:46:46 AM
CAS classification : [_separable]

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

Maple. Time used: 0.004 (sec). Leaf size: 9
ode:=diff(y(x),x) = sec(x)^2*cot(y(x))*cos(y(x)); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \operatorname {arcsec}\left (c_1 +\tan \left (x \right )\right ) \]
Mathematica. Time used: 0.776 (sec). Leaf size: 45
ode=D[y[x],x]==Sec[x]^2 Cot[y[x]] Cos[y[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.599 (sec). Leaf size: 34
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(Derivative(y(x), x) - cos(y(x))/(cos(x)**2*tan(y(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 ] \]