Solve $y\frac{dy}{dx}+x=\sqrt{x^2+y^2}$ using line integrals I'm aware of the fact that the ODE
\begin{align}y\frac{dy}{dx}+x=\sqrt{x^2+y^2},\end{align}
can be solved using substitution methods. I've worked out the solution quite easily by setting $u=\sqrt{x^2+y^2}$ and everything works out. But what if I rewrite the equation as
\begin{align}\frac{dy}{dx}+\left(\frac{y}{x}\right)^{-1}&=\sqrt{\frac{x^2+y^2}{y^2}}\\\implies \frac{dy}{dx}+\left(\frac{y}{x}\right)^{-1} &=\sqrt{\left(\frac{y}{x}\right)^{-2}+1}.\end{align}
Now let $u=\displaystyle\frac{y}{x}\implies \displaystyle\frac{dy}{dx}=\frac{d\left(ux\right)}{dx}$, obtaining
\begin{align}\frac{d\left(ux\right)}{dx}&=\sqrt{\frac{1}{u^2}+1}-\frac{1}{u}\\\implies \int\left(\sqrt{\frac{1}{u^2}+1}-\frac{1}{u}\right)^{-1}\:d\left(ux\right)&=\int\:dx\\\implies \int\frac{u\:dx+x\:du}{\sqrt{\frac{1}{u^2}+1}-\frac{1}{u}}&=x+C_0.\end{align}
Assuming I haven't messed anything up (I feel like I've made a mistake here), how do I evaluate the integral on the LHS? The RHS looks familiar, however, because the answers I've found have all taken the form $y=\sqrt{\left(x+C\right)^2-x^2}$.
 A: Another simplest way :
From your given equation we have ,
$$2(y\,dy+x\,dx)=2\sqrt{x^2+y^2}\,dx$$
$$\implies \frac{d(x^2+y^2)}{\sqrt{x^2+y^2}}=2\,dx$$
$$\implies 2\sqrt{x^2+y^2}=2x+2C \implies \sqrt{x^2+y^2}=x+C$$
A: This is a homogeneous equation so your substitution will turn into a separable equation which you can solve. It's probably easiest to proceed by rewriting the equation as
$${ dy \over  dx} = {{\sqrt{x^2 + y^2} - x} \over y}$$
Both the numerator and the denominator of the right-hand side are homogeneous in $(x,y)$ of the same degree, so your substitution $y = xu$ will work. You get
$$u + x{du \over dx} = {\sqrt{1 + u^2} - 1\over u} $$
This rearranges into 
$$x{du \over dx} = {\sqrt{1 + u^2} - (1 + u^2)\over u}$$
Which is the same as
$${u \over \sqrt{1 + u^2} - (1 + u^2)}\,du = {1 \over x}\,dx$$
If $v = \sqrt{1 + u^2}$, the left integral is
$${1 \over (1 - v)}\,dv$$
Which integrates to $-\ln(1 - v) = -\ln(1 - \sqrt{1 + u^2}) = -\ln(1 - \sqrt{1 + ({y \over x})^2})$. This will give the solution if you substitute it in above. 
