4.5.21 \(x y'(x)=y(x)-2 x \tanh \left (\frac {y(x)}{x}\right )\)

ODE
\[ x y'(x)=y(x)-2 x \tanh \left (\frac {y(x)}{x}\right ) \] ODE Classification

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

Book solution method
Homogeneous equation

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

\[\left \{\left \{y(x)\to x \sinh ^{-1}\left (\frac {e^{c_1}}{x^2}\right )\right \}\right \}\]

Maple
cpu = 0.042 (sec), leaf count = 45

\[ \left \{ {\frac {1}{4}\ln \left ( \tanh \left ( {\frac {y \left ( x \right ) }{x}} \right ) -1 \right ) }+{\frac {1}{4}\ln \left ( \tanh \left ( {\frac {y \left ( x \right ) }{x}} \right ) +1 \right ) }-{\frac {1}{2}\ln \left ( \tanh \left ( {\frac {y \left ( x \right ) }{x}} \right ) \right ) }-\ln \left ( x \right ) -{\it \_C1}=0 \right \} \] Mathematica raw input

DSolve[x*y'[x] == -2*x*Tanh[y[x]/x] + y[x],y[x],x]

Mathematica raw output

{{y[x] -> x*ArcSinh[E^C[1]/x^2]}}

Maple raw input

dsolve(x*diff(y(x),x) = y(x)-2*x*tanh(y(x)/x), y(x),'implicit')

Maple raw output

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