29.5.2 problem 117

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

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

Maple. Time used: 0.255 (sec). Leaf size: 11
ode:=diff(y(x),x) = tan(x)*cot(y(x)); 
dsolve(ode,y(x), singsol=all);
 
\[ y \left (x \right ) = \arccos \left (\frac {\cos \left (x \right )}{c_{1}}\right ) \]
Mathematica. Time used: 5.322 (sec). Leaf size: 47
ode=D[y[x],x]==Tan[x] Cot[y[x]]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to -\arccos \left (\frac {1}{2} c_1 \cos (x)\right ) \\ y(x)\to \arccos \left (\frac {1}{2} c_1 \cos (x)\right ) \\ y(x)\to -\frac {\pi }{2} \\ y(x)\to \frac {\pi }{2} \\ \end{align*}
Sympy. Time used: 0.380 (sec). Leaf size: 20
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-tan(x)/tan(y(x)) + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = - \operatorname {acos}{\left (C_{1} \cos {\left (x \right )} \right )} + 2 \pi , \ y{\left (x \right )} = \operatorname {acos}{\left (C_{1} \cos {\left (x \right )} \right )}\right ] \]