# How do you implicitly differentiate 2=e^(x-y)-xcosy ?

Jan 24, 2017

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

#### Explanation:

We have:

${e}^{x - y} - x \cos y = 2$

Differentiate both sides of the equation with respect to $x$ keeping in mind that:

$\frac{d}{\mathrm{dx}} f \left(y \left(x\right)\right) = f ' \left(y \left(x\right)\right) \cdot y ' \left(x\right)$

so that:

$\frac{d}{\mathrm{dx}} \left({e}^{x - y} - x \cos y\right) = 0$

$\left(1 - y '\right) {e}^{x - y} - \cos y + x y ' \sin y = 0$

Solving for $y '$:

$y ' \left({e}^{x - y} - x \sin y\right) = {e}^{x - y} - \cos y$

$y ' = \frac{{e}^{x - y} - \cos y}{{e}^{x - y} - x \sin y}$

We can now simplify the expression substituting:

${e}^{x - y} = 2 + x \cos y$

and we have:

$y ' = \frac{2 + x \cos y - \cos y}{2 + x \cos y - x \sin y}$

$y ' = \frac{2 + \left(x - 1\right) \cos y}{2 + x \left(\cos y - \sin y\right)}$