89.6.15 problem 15

Internal problem ID [24398]
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. Miscellaneous Exercises at page 45
Problem number : 15
Date solved : Thursday, October 02, 2025 at 10:24:37 PM
CAS classification : [[_homogeneous, `class A`]]

\begin{align*} x -y \cos \left (\frac {y}{x}\right )+x y^{\prime } \cot \left (\frac {y}{x}\right )&=0 \end{align*}
Maple. Time used: 0.004 (sec). Leaf size: 33
ode:=x-y(x)*cos(y(x)/x)+x*cot(y(x)/x)*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \operatorname {RootOf}\left (-\int _{}^{\textit {\_Z}}\frac {\cot \left (\textit {\_a} \right )}{\cos \left (\textit {\_a} \right ) \textit {\_a} -\textit {\_a} \cot \left (\textit {\_a} \right )-1}d \textit {\_a} +\ln \left (x \right )+c_1 \right ) x \]
Mathematica. Time used: 1.313 (sec). Leaf size: 48
ode=(x-y[x]*Cos[y[x]/x ] )+ (x* Cot[ y[x]/x] )*D[y[x],x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}\left [\int _1^{\frac {y(x)}{x}}\frac {1}{\sec (K[1]) \sin (2 K[1]) K[1]-2 K[1]-2 \tan (K[1])}dK[1]=\frac {\log (x)}{2}+c_1,y(x)\right ] \]
Sympy. Time used: 52.043 (sec). Leaf size: 54
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x*cot(y(x)/x)*Derivative(y(x), x) + x - y(x)*cos(y(x)/x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} e^{- \int \limits ^{\frac {x}{y{\left (x \right )}}} \frac {\tan {\left (\frac {1}{u_{1}} \right )}}{u_{1} \tan {\left (\frac {1}{u_{1}} \right )} - \sin {\left (\frac {1}{u_{1}} \right )} + 1}\, du_{1} + \int \limits ^{\frac {x}{y{\left (x \right )}}} \frac {\sin {\left (\frac {1}{u_{1}} \right )}}{u_{1} \left (u_{1} \tan {\left (\frac {1}{u_{1}} \right )} - \sin {\left (\frac {1}{u_{1}} \right )} + 1\right )}\, du_{1}} \]