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

Jul 27, 2017

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

#### Explanation:

Implicit differentiation is a special case of the chain rule for derivatives. Generally differentiation problems involve functions i.e. $y = f \left(x\right)$ - written explicitly as functions of $x$.

However, some functions y are written implicitly as functions of $x$. So what we do is to treat $y$ as $y = y \left(x\right)$ and use chain rule. This means differentiating $y$ w.r.t. $y$, but as we have to derive w.r.t. $x$, as per chain rule, we multiply it by $\frac{\mathrm{dy}}{\mathrm{dx}}$.

Here we have $y = {\left(x - y\right)}^{2} {e}^{x y}$

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

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

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

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

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