<s>[INST] Resolution of first order differential equation I have difficulties to solve these two differential equations:
1) $ y'(x)=\frac{x-y(x)}{x+y(x)} $ with the initial condition $ y(1)=1 $ .I'm arrived to prove that $$ y=x(\sqrt{2-e^{-2(\ln x+c)}}-1) $$ but I don't know if it's correct. If it's right, how do I find the constant $ c $? Because WolframAlpha says that the solution is $ y(x)=\sqrt{2}\sqrt{x^2+1}-x $.
2)  $ y'(x)=\frac{2y(x)-x}{2x-y(x)} $ . I'm arrived to prove that $ \frac{z-1}{(z+1)^3}=e^{2c}x^{2} $ but I don't know if it's correct. If it's right, how do I explain $ z $ to substitute it in $ y=xz $? Then, how do I find the constant $ c $ ?
Thanks for any help!
 [/INST] HINT
First of all, notice that
\begin{align*}
y^{\prime} = \frac{x-y}{x+y} \Longleftrightarrow y^{\prime} = \frac{1 - \frac{y}{x}}{1 + \frac{y}{x}}
\end{align*}
Then, if we make $y = ux$, we get:
\begin{align*}
u + u^{\prime}x = \frac{1-u}{1+u} \Longleftrightarrow u^{\prime}x = \frac{1-u}{1+u} - u = \frac{1-2u-u^{2}}{1+u} \Longleftrightarrow \left[\frac{1+u}{2 - (1+u)^{2}}\right]u^{\prime} = \frac{1}{x}
\end{align*}
The same trick applies to the second case. Can you proceed from here?
EDIT
If we make $y = ux$, we get:
\begin{align*}
y^{\prime} = \frac{2y-x}{2x-y} & \Longleftrightarrow u + u^{\prime}x = \frac{2u-1}{2 - u}\\
& \Longleftrightarrow u^{\prime}x = \frac{2u-1}{2 - u} - u = \frac{u^{2}-1}{u-2}\\
& \Longleftrightarrow \left[\frac{u-2}{u^{2}-1}\right]u^{\prime} = \frac{1}{x}
\end{align*}
</s>