Differential Equation-Separation of variables

337 Views Asked by At

1) Solve the following differential equation by separation of variables (or otherwise) $$\frac{dy}{dx}-1=e^{x-y}$$.

What I tried:- Suppose $$z^2=e^{x-y}$$ $$\Rightarrow 2z\frac{dz}{dx}=e^{x-y}(1-\frac{dy}{dx})$$ $$\Rightarrow 2z\frac{dz}{dx}=z^2(1-\frac{dy}{dx})$$ $$\Rightarrow 2\frac{dz}{dx}=z(1-\frac{dy}{dx})$$ $$\Rightarrow \frac{dy}{dx}=1-\frac{2dz}{zdx} \tag1$$

Again, $$\frac{dy}{dx}-1=e^{x-y}$$ $$\Rightarrow \frac{dy}{dx}=1+z^2 \tag2$$

Equating $(1)$ and $(2)$,

$$1+z^2=1-\frac{2dz}{zdx}$$ $$\Rightarrow z^3dx=-2dz$$ $$\Rightarrow z^{-3}dz=-\frac{1}{2}dx$$ $$\Rightarrow \int z^{-3}dz=\int -\frac{1}{2}dx$$ $$\Rightarrow \frac{z^{-2}}{-2}=-\frac{1}{2} x+\frac{c}{2}$$ $$\Rightarrow -z^{-2}=-x+c$$ $$\Rightarrow z^{-2}-x+c=0$$

Am I correct ?

3

There are 3 best solutions below

0
On BEST ANSWER

Lets try $x-y = t$ and $t_x = 1-y_x$

$$-\frac{dt}{dx} = e^t \\ \int -e^{-t} dt = \int dx\\ e^{-t} = x+c$$

0
On

If you put $z=x-y$ then you can find easily the solution of the problem. By putting $z=x-y$ the above ODE becomes $$-\frac{dz}{dx}=e^z.$$ By separation of variable, $$-e^{-z}dz=dx.$$ By integrating we get $$e^{y-x}=x+c.$$

2
On

$$y'-1=e^{x-y} \implies (y'-1)e^{y-x}=1 $$ Integrate simply since on the left side you have a derivative $$\int e^{y-x}(y'-1)dx=x+K \implies \int (e^{y-x})'dx=x+K$$ $$e^{y-x}=x+K$$ Another way

substitute $y=\ln(z)$:

$$\frac{dy}{dx}-1=e^{x-y}$$ $$\frac{z'}{z}-1=\frac {e^{x}}z$$ $${z'}-z= {e^{x}}$$ $$({ze^{-x}})'=1$$ $$z=e^{x}(x+K)$$ $$e^y=e^{x}(x+K)$$ $$\boxed{y=x+\ln|x+K|}$$