21.2.2 problem 2

Internal problem ID [4302]
Book : An introduction to the solution and applications of differential equations, J.W. Searl, 1966
Section : Chapter 4, Ex. 4.2
Problem number : 2
Date solved : Tuesday, September 30, 2025 at 07:16:43 AM
CAS classification : [_separable]

\begin{align*} x \left (x -1\right ) y^{\prime }&=\cot \left (y\right ) \end{align*}
Maple. Time used: 0.009 (sec). Leaf size: 15
ode:=x*(x-1)*diff(y(x),x) = cot(y(x)); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \arccos \left (\frac {x}{c_1 \left (x -1\right )}\right ) \]
Mathematica. Time used: 44.745 (sec). Leaf size: 59
ode=x*(x-1)*D[y[x],x]==Cot[y[x]]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to -\arccos \left (-\frac {e^{-c_1} x}{x-1}\right )\\ y(x)&\to \arccos \left (-\frac {e^{-c_1} x}{x-1}\right )\\ y(x)&\to -\frac {\pi }{2}\\ y(x)&\to \frac {\pi }{2} \end{align*}
Sympy. Time used: 0.311 (sec). Leaf size: 24
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x*(x - 1)*Derivative(y(x), x) - 1/tan(y(x)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = - \operatorname {acos}{\left (\frac {C_{1} x}{x - 1} \right )} + 2 \pi , \ y{\left (x \right )} = \operatorname {acos}{\left (\frac {C_{1} x}{x - 1} \right )}\right ] \]