<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] This belongs to the class of homogeneous differential equations of order 0, that is, it satisfies $f(\lambda x, \lambda y) =  f(x,y)$. One way to solve such a equation is to write the differential equation in the form: $y' = f(\frac{y}{x})$ and make the substitution $v=\frac{y}{x}$.
</s>