4.5.3 \(x y'(x)-y(x)+x \cos \left (\frac {y(x)}{x}\right )+x=0\)

ODE
\[ x y'(x)-y(x)+x \cos \left (\frac {y(x)}{x}\right )+x=0 \] ODE Classification

[[_homogeneous, `class A`], _dAlembert]

Book solution method
Homogeneous equation

Mathematica
cpu = 0.243554 (sec), leaf count = 16

\[\left \{\left \{y(x)\to 2 x \tan ^{-1}(-\log (x)+c_1)\right \}\right \}\]

Maple
cpu = 0.039 (sec), leaf count = 12

\[[y \left (x \right ) = -2 \arctan \left (\ln \left (x \right )+\textit {\_C1} \right ) x]\] Mathematica raw input

DSolve[x + x*Cos[y[x]/x] - y[x] + x*y'[x] == 0,y[x],x]

Mathematica raw output

{{y[x] -> 2*x*ArcTan[C[1] - Log[x]]}}

Maple raw input

dsolve(x*diff(y(x),x)+x-y(x)+x*cos(y(x)/x) = 0, y(x))

Maple raw output

[y(x) = -2*arctan(ln(x)+_C1)*x]