# How do you differentiate sin (xy) = x^2 - y^2?

In deriving remember that $y$ is a fnction of $x$:
$\cos \left(x y\right) \cdot \left(y + x \frac{\mathrm{dy}}{\mathrm{dx}}\right) = 2 x - 2 y \frac{\mathrm{dy}}{\mathrm{dx}}$
$y \cos \left(x y\right) + x \frac{\mathrm{dy}}{\mathrm{dx}} \cos \left(x y\right) - 2 x + 2 y \frac{\mathrm{dy}}{\mathrm{dx}} = 0$
$\frac{\mathrm{dy}}{\mathrm{dx}} \left[x \cos \left(x y\right) + 2 y\right] = 2 x - y \cos \left(x y\right)$
$\frac{\mathrm{dy}}{\mathrm{dx}} = \frac{2 x - y \cos \left(x y\right)}{x \cos \left(x y\right) + 2 y}$