# How do you differentiate 2xln(x-y)-e^(x-y)?

Dec 28, 2015

$\frac{\mathrm{dy}}{\mathrm{dx}} = \frac{\frac{2 x}{x - y} + 2 \ln \left(x - y\right) - {e}^{x - y}}{1 - \frac{2 x}{x - y} + {e}^{x - y}}$.

#### Explanation:

I assume that y is a function of x.
Since you cannot obtain y explicitly as a function of x, you would have to use the method of implicit differentiation here, at all times bearing in mind that y is a function of x.

$\therefore \frac{d}{\mathrm{dx}} \left(y\right) = \frac{d}{\mathrm{dx}} \left(2 x \ln \left(x - y\right) - {e}^{x - y}\right)$

$\therefore \frac{\mathrm{dy}}{\mathrm{dx}} = 2 x \cdot \frac{1}{x - y} \cdot \left(1 - \frac{\mathrm{dy}}{\mathrm{dx}}\right) + 2 \ln \left(x - y\right) - {e}^{x - y} \cdot \left(1 - \frac{\mathrm{dy}}{\mathrm{dx}}\right)$

$\therefore \frac{\mathrm{dy}}{\mathrm{dx}} \left(1 - \frac{2 x}{x - y} + {e}^{x - y}\right) = \frac{2 x}{x - y} + 2 \ln \left(x - y\right) - {e}^{x - y}$

$\therefore \frac{\mathrm{dy}}{\mathrm{dx}} = \frac{\frac{2 x}{x - y} + 2 \ln \left(x - y\right) - {e}^{x - y}}{1 - \frac{2 x}{x - y} + {e}^{x - y}}$.