<s>[INST] Solving an ordinary differential equation nonlinear I have the following
$$ y' = \frac{ xy }{x^2 + y^2} $$
My approach would be to rewrite this in terms of $x$
$$ x' = \frac{x}{y} + \frac{y}{x} $$
And then let $u = \frac{y}{x} \implies u' = \frac{x + y x'}{x^2} = \frac{1}{x} + \frac{u}{x} x' = \frac{1}{x} + \frac{u}{x} \left( \frac{1}{u} + u\right)$. Therfore,
$$ u' = \frac{1}{x} + \frac{1}{x} + \frac{u^2}{x} = \frac{2 + u^2}{x}$$
Thus,
$$ \int \frac{ d u}{2 + u^2} = \int \frac{ dx}{x} \implies \frac{1}{\sqrt{2}} \arctan (u/ \sqrt{2}) = \ln |x| + C$$
So general solution ( with $u = y/x$) is 
$$ \boxed{  \arctan \left( \frac{y}{x \sqrt{2}} \right) = \sqrt{2} \ln |x| + \sqrt{2} +C }$$
is this sufficient? is  there an easier way to solve this ODE?
 [/INST] $$y' = \frac{ xy }{x^2 + y^2}=\frac{\frac{y}{x}}{1+\frac{y^2}{x^2}}$$
let $y=ux$ 
$$y'=u+xu'$$
so
$$u+xu'=\frac{u}{1+u^2}$$
$$xu'=\frac{-u^3}{1+u^2}$$
$$-\frac{dx}{x}=\frac{u^2+1}{u^3}du$$
$$-\frac{dx}{x}=\frac{1}{u}du+\frac{1}{u^3}du$$
</s>