69.1.9 problem 10

Internal problem ID [17959]
Book : A book of problems in ordinary differential equations. M.L. KRASNOV, A.L. KISELYOV, G.I. MARKARENKO. MIR, MOSCOW. 1983
Section : Section 1. Basic concepts and definitions. Exercises page 18
Problem number : 10
Date solved : Thursday, October 02, 2025 at 02:31:29 PM
CAS classification : [_quadrature]

\begin{align*} y^{\prime }&=1-\cot \left (y\right ) \end{align*}
Maple. Time used: 0.018 (sec). Leaf size: 29
ode:=diff(y(x),x) = 1-cot(y(x)); 
dsolve(ode,y(x), singsol=all);
 
\[ x -\frac {\ln \left (-1+\cot \left (y\right )\right )}{2}+\frac {\ln \left (\csc \left (y\right )^{2}\right )}{4}+\frac {\pi }{4}-\frac {y}{2}+c_1 = 0 \]
Mathematica. Time used: 0.222 (sec). Leaf size: 69
ode=D[y[x],x]==1-Cot[y[x]]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \text {InverseFunction}\left [\left (\frac {1}{4}+\frac {i}{4}\right ) \log (-\tan (\text {$\#$1})+i)-\frac {1}{2} \log (1-\tan (\text {$\#$1}))+\left (\frac {1}{4}-\frac {i}{4}\right ) \log (\tan (\text {$\#$1})+i)\&\right ][-x+c_1]\\ y(x)&\to \frac {\pi }{4} \end{align*}
Sympy. Time used: 1.552 (sec). Leaf size: 29
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(Derivative(y(x), x) - 1 + 1/tan(y(x)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ x - \frac {y{\left (x \right )}}{2} - \frac {\log {\left (\tan {\left (y{\left (x \right )} \right )} - 1 \right )}}{2} + \frac {\log {\left (\tan ^{2}{\left (y{\left (x \right )} \right )} + 1 \right )}}{4} = C_{1} \]