89.3.12 problem 12

Internal problem ID [24310]
Book : A short course in Differential Equations. Earl D. Rainville. Second edition. 1958. Macmillan Publisher, NY. CAT 58-5010
Section : Chapter 2. Equations of the first order and first degree. Exercises at page 34
Problem number : 12
Date solved : Thursday, October 02, 2025 at 10:13:38 PM
CAS classification : [_exact]

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