29.5.6 problem 121

Internal problem ID [4723]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 5
Problem number : 121
Date solved : Tuesday, March 04, 2025 at 07:10:47 PM
CAS classification : [_separable]

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

Maple. Time used: 0.069 (sec). Leaf size: 22
ode:=diff(y(x),x) = cos(x)*sec(y(x))^2; 
dsolve(ode,y(x), singsol=all);
 
\[ y \left (x \right ) = \frac {\operatorname {RootOf}\left (-\textit {\_Z} +4 c_{1} +4 \sin \left (x \right )-\sin \left (\textit {\_Z} \right )\right )}{2} \]
Mathematica. Time used: 0.337 (sec). Leaf size: 32
ode=D[y[x],x]==Cos[x] Sec[y[x]]^2; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \text {InverseFunction}\left [2 \left (\frac {\text {$\#$1}}{2}+\frac {1}{4} \sin (2 \text {$\#$1})\right )\&\right ][2 \sin (x)+c_1] \]
Sympy. Time used: 5.205 (sec). Leaf size: 20
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-cos(x)/cos(y(x))**2 + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \frac {y{\left (x \right )}}{2} - \sin {\left (x \right )} + \frac {\sin {\left (y{\left (x \right )} \right )} \cos {\left (y{\left (x \right )} \right )}}{2} = C_{1} \]