# If e^(xy) + x^2 - y^2 = 0, how do I find dy/dx?

Mar 26, 2018

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

#### Explanation:

We have:

${e}^{x y} + {x}^{2} - {y}^{2} = 0$

Differentiating wrt $x$, and applying the chain rule followed by the product rule we have:

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

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

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

$\therefore x {e}^{x y} \frac{\mathrm{dy}}{\mathrm{dx}} + y {e}^{x y} + 2 x - 2 y \frac{\mathrm{dy}}{\mathrm{dx}} = 0$

Now we rearrange for $\frac{\mathrm{dy}}{\mathrm{dx}}$:

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

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

$\therefore \frac{\mathrm{dy}}{\mathrm{dx}} = \frac{2 x + y {e}^{x y}}{2 y - x {e}^{x y}}$