# I have difficulties to solve these two differential equations: 1) y &#x2032; </m

I have difficulties to solve these two differential equations:
1) ${y}^{\prime }\left(x\right)=\frac{x-y\left(x\right)}{x+y\left(x\right)}$ with the initial condition $y\left(1\right)=1$ .I'm arrived to prove that
$y=x\left(\sqrt{2-{e}^{-2\left(\mathrm{ln}x+c\right)}}-1\right)$
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\left(x\right)=\sqrt{2}\sqrt{{x}^{2}+1}-x$.
2) ${y}^{\prime }\left(x\right)=\frac{2y\left(x\right)-x}{2x-y\left(x\right)}$. I'm arrived to prove that $\frac{z-1}{\left(z+1{\right)}^{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$ ?
You can still ask an expert for help

• Questions are typically answered in as fast as 30 minutes

Solve your problem for the price of one coffee

• Math expert for every subject
• Pay only if we can solve it

zlepljalz2
${y}^{\prime }\left(y+x\right)=x-y$
${y}^{\prime }x+y=x-{y}^{\prime }y$
$\left(xy{\right)}^{\prime }=x-\frac{1}{2}\left({y}^{2}{\right)}^{\prime }$
Integrate
$xy=\frac{1}{2}{x}^{2}-\frac{1}{2}{y}^{2}+C$
${y}^{2}-{x}^{2}+2xy=C$
Evaluate the constant:
$y\left(1\right)=1\phantom{\rule{thickmathspace}{0ex}}⟹\phantom{\rule{thickmathspace}{0ex}}C=2$
$\left(y+x{\right)}^{2}=2\left({x}^{2}+1\right)$
Finally,
$\overline{)y\left(x\right)=\sqrt{2\left({x}^{2}+1\right)}-x}$
You are on the right track
$y=x\left(\sqrt{2-{e}^{-2\left(\mathrm{ln}x+c\right)}}-1\right)$
$y=x\left(\sqrt{2-\frac{{e}^{-2c}}{{x}^{2}}}-1\right)$
Note that ${e}^{-2c}=k$
$y=\sqrt{2{x}^{2}-k}-x$
$y=\sqrt{2{x}^{2}+2}-x$