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.0256671 (sec), leaf count = 16

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

Maple
cpu = 0.02 (sec), leaf count = 17

\[ \left \{ -{\it \_C1}+\tan \left ( {\frac {y \left ( x \right ) }{2\,x}} \right ) +\ln \left ( x \right ) =0 \right \} \] 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),'implicit')

Maple raw output

-_C1+tan(1/2*y(x)/x)+ln(x) = 0