# How do you implicitly differentiate xy- yln(x-y)= 4-x?

Apr 22, 2018

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

#### Explanation:

$\frac{d}{\mathrm{dx}} \left(x y - y \ln \left(x - y\right)\right) = \frac{d}{\mathrm{dx}} \left(4 - x\right)$

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

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

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

now isolate $\frac{\mathrm{dy}}{\mathrm{dx}}$

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

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

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