# How do you differentiate -2y=y^2/(xsin(x-y)?

Feb 19, 2018

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

#### Explanation:

We can rearrange and simplify to get:

$- 2 x \sin \left(x - y\right) = y$

$\frac{d}{\mathrm{dx}} \left[y\right] = \frac{d}{\mathrm{dx}} \left[- 2 x \sin \left(x - y\right)\right]$

$\frac{d}{\mathrm{dx}} \left[y\right] = \frac{d}{\mathrm{dx}} \left[- 2 x\right] \sin \left(x - y\right) - 2 x \frac{d}{\mathrm{dx}} \left[\sin \left(x - y\right)\right]$

$\frac{d}{\mathrm{dx}} \left[y\right] = - 2 \sin \left(x - y\right) - 2 x \frac{d}{\mathrm{dx}} \left[\sin \left(x - y\right)\right]$

$\frac{d}{\mathrm{dx}} \left[y\right] = - 2 \sin \left(x - y\right) - 2 x \cos \left(x - y\right) \frac{d}{\mathrm{dx}} \left[x - y\right]$

$\frac{d}{\mathrm{dx}} \left[y\right] = - 2 \sin \left(x - y\right) - 2 x \cos \left(x - y\right) \left(\frac{d}{\mathrm{dx}} \left[x\right] - \frac{d}{\mathrm{dx}} \left[y\right]\right)$

$\frac{d}{\mathrm{dx}} \left[y\right] = - 2 \sin \left(x - y\right) - 2 x \cos \left(x - y\right) \left(\frac{d}{\mathrm{dx}} \left[x\right] - \frac{d}{\mathrm{dx}} \left[y\right]\right)$

Using the chqain rule we get that $\frac{d}{\mathrm{dx}} = \frac{\mathrm{dy}}{\mathrm{dx}} \cdot \frac{d}{\mathrm{dy}}$

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

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

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

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

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

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