# How to solve the differential equation ( d y <mrow class="MJX-TeXAtom-ORD"> / <

How to solve the differential equation $\left(dy/dx{\right)}^{2}=\left(x-y{\right)}^{2}$ with initial condition $y\left(0\right)=0$?
I solved the equation by partitioning it into two differential equations.
1) $dy/dx=x-y$ The solution is $\to$ $1-x+y=-\mathrm{exp}\left(-x\right)$
and
2) $1+x-y=\mathrm{exp}\left(x\right)$
How do we write combined solution of such equations.
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

Allison Pena
${y}^{\prime }+y=x\phantom{\rule{thickmathspace}{0ex}}⟹\phantom{\rule{thickmathspace}{0ex}}y=x-1+K{e}^{-x}$
Don't forget the constant of integration
${y}^{\prime }-y=-x\phantom{\rule{thickmathspace}{0ex}}⟹\phantom{\rule{thickmathspace}{0ex}}y\left(x\right)=x+1+K{e}^{x}$