TITLE: Find a solution to the following ordinary differential equation : $\frac{dy}{dx}=e^{x−y}(e^x−e^y).$
QUESTION [6 upvotes]: Find a solution to the following ordinary differential equation - $$\frac{dy}{dx}=e^{x−y}(e^x−e^y).$$
A change of variables so that it becomes variable separable may be required.

REPLY [2 votes]: With the change of variables $z = e^y$ and $\omega = e^x$ the ODE becomes
$$\frac{dz}{d\omega} = \omega - z \implies \frac{d}{d\omega}\left(e^{\omega} z\right) = \omega e^{\omega}$$
which gives the solution
$$z = e^{-\omega}\int\omega' e^{\omega'}d\omega' = (\omega-1) + Ce^{-\omega}$$
or in terms of the original variables
$$y(x) = \log\left(e^x - 1 + C\exp(-e^x)\right)$$
where the integration constant $C$ can be written $C = e^{y(0) + 1}$.