89.10.22 problem 22

Internal problem ID [24515]
Book : A short course in Differential Equations. Earl D. Rainville. Second edition. 1958. Macmillan Publisher, NY. CAT 58-5010
Section : Chapter 4. Additional topics on equations of first order and first degree. Exercises at page 77
Problem number : 22
Date solved : Sunday, October 12, 2025 at 05:55:32 AM
CAS classification : [`y=_G(x,y')`]

\begin{align*} y^{\prime }&=\tan \left (y\right ) \cot \left (x \right )-\sec \left (y\right ) \cos \left (x \right ) \end{align*}
Maple. Time used: 0.013 (sec). Leaf size: 15
ode:=diff(y(x),x) = tan(y(x))*cot(x)-sec(y(x))*cos(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \arcsin \left (\sin \left (x \right ) \left (-\ln \left (\sin \left (x \right )\right )+c_1 \right )\right ) \]
Mathematica. Time used: 6.36 (sec). Leaf size: 20
ode=D[y[x],x]==Tan[y[x]]*Cot[x]-Sec[ y[x]]*Cos[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \arcsin \left (\frac {1}{2} \sin (x) (-2 \log (\sin (x))+c_1)\right ) \end{align*}
Sympy. Time used: 1.327 (sec). Leaf size: 31
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(cos(x)*sec(y(x)) - tan(y(x))*cot(x) + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = \operatorname {asin}{\left (\left (C_{1} + \log {\left (\sin {\left (x \right )} \right )}\right ) \sin {\left (x \right )} \right )} + \pi , \ y{\left (x \right )} = - \operatorname {asin}{\left (\left (C_{1} + \log {\left (\sin {\left (x \right )} \right )}\right ) \sin {\left (x \right )} \right )}\right ] \]