83.8.19 problem 20

Internal problem ID [19074]
Book : A Text book for differentional equations for postgraduate students by Ray and Chaturvedi. First edition, 1958. BHASKAR press. INDIA
Section : Chapter II. Equations of first order and first degree. Misc examples on chapter II at page 25
Problem number : 20
Date solved : Monday, March 31, 2025 at 06:43:37 PM
CAS classification : [_exact]

\begin{align*} y \left (1+\frac {1}{x}\right )+\cos \left (y\right )+\left (x +\ln \left (x \right )-x \sin \left (y\right )\right ) y^{\prime }&=0 \end{align*}

Maple. Time used: 0.108 (sec). Leaf size: 17
ode:=y(x)*(1+1/x)+cos(y(x))+(x+ln(x)-x*sin(y(x)))*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ \cos \left (y\right ) x +\left (\ln \left (x \right )+x \right ) y+c_1 = 0 \]
Mathematica. Time used: 0.256 (sec). Leaf size: 22
ode=y[x]*(1+1/x)+Cos[y[x]]+(x+Log[x]-x*Sin[y[x]])*D[y[x],x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}[y(x) (-\log (x))-x (y(x)+\cos (y(x)))=c_1,y(x)] \]
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((1 + 1/x)*y(x) + (-x*sin(y(x)) + x + log(x))*Derivative(y(x), x) + cos(y(x)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
Timed Out