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.3599 (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.35 (sec), leaf count = 34

\[\left [y \left (x \right ) = \arctanh \left (\frac {1}{\sqrt {-x^{4} \textit {\_C1} +1}}\right ) x, y \left (x \right ) = -\arctanh \left (\frac {1}{\sqrt {-x^{4} \textit {\_C1} +1}}\right ) x\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))

Maple raw output

[y(x) = arctanh(1/(-_C1*x^4+1)^(1/2))*x, y(x) = -arctanh(1/(-_C1*x^4+1)^(1/2))*x
]