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!
 A: $$y'(y+x)=x-y$$
$$y'x+y=x-y'y$$
$$(xy)'=x-\frac 12 (y^2)'$$
Integrate
$$xy=\frac 12 x^2-\frac 12y^2+C$$
$$y^2-x^2+2xy=C$$
Evaluate the constant :
$$y(1)=1 \implies C=2$$
$$(y+x)^2=2(x^2+1)$$
Finally,
$$\boxed {y(x)=\sqrt {2(x^2+1)}-x}$$

You are on the right track
$$y=x(\sqrt{2-e^{-2(\ln x+c)}}-1)$$
$$y=x(\sqrt{2-\frac {e^{-2c}}{x^2}}-1)$$
Note that $e^{-2c}=k$
$$y=\sqrt{2x^2-k}-x$$
$$y=\sqrt{2x^2+2}-x$$
A: 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*}
A: You may write your equation like $dy(x+y)=(x-y)dx $ $\Rightarrow$ $ydy+xdy=xdx-ydy$ $\Rightarrow$
$ydy+xdy+ydy=xdx$ $\Rightarrow$
$(y^2/2)'+(xy)'=(x^2/2)'$ $\Rightarrow$ $y^2+2xy=x^2$ $\Rightarrow$ $(y+x)^2=2x^2+c$
$\Rightarrow$ $y=\pm\sqrt{2x^2+c}-x$ . Now for the initial condition $y(1)=1$, only the positive root works. You may do the same for the second. Hint: You can always check your answer by differentiating your solution and substitute it to the initial equation.
A: Sorry I have not seen your second question
Your result is correct. Don't forget to substitute $e^c=K$ 
I susbstitued $y=tx$ and I got this
$$\frac  {t-1}{(t+1)^2}=Kx^2$$
Then substitute back $t=y/x$
$$\frac {y-x}{(y+x)^3}=K$$
You didn't give the initial condition so lets consider $y(x_0)=y_0$
$$K=\frac {y_0-x_0}{(y_0+x_0)^3}$$
Therefore
$$\frac {y-x}{(y+x)^3}=\frac {y_0-x_0}{(y_0+x_0)^3}$$
