# How do you differentiate ycosx^2-y^2=xy-x^2?

Jun 8, 2018

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

#### Explanation:

Treat $y$ as a function of $x$ and use the Chain Rule whenever $y$ appears. See here for more details on implicit differentiation.
Here, differentiating both sides with respect to $x$ and taking the Product Rule and Chain Rule into account yields

$\setminus \frac{\mathrm{dy}}{\mathrm{dx}} \setminus \cos \left({x}^{2}\right) - 2 x y \setminus \sin \left({x}^{2}\right) - 2 y \setminus \frac{\mathrm{dy}}{\mathrm{dx}} = y + x \setminus \frac{\mathrm{dy}}{\mathrm{dx}} - 2 x$
Put all terms that contain $\setminus \frac{\mathrm{dy}}{\mathrm{dx}}$ on one side, all the other terms on the other sides:
$\setminus \frac{\mathrm{dy}}{\mathrm{dx}} \setminus \cos \left({x}^{2}\right) - 2 y \setminus \frac{\mathrm{dy}}{\mathrm{dx}} - x \setminus \frac{\mathrm{dy}}{\mathrm{dx}} = 2 x y \setminus \sin \left({x}^{2}\right) + y - 2 x$
Factoring $\setminus \frac{\mathrm{dy}}{\mathrm{dx}}$ and dividing, we obtain
$\setminus \frac{\mathrm{dy}}{\mathrm{dx}} = \setminus \frac{2 x y \setminus \sin \left({x}^{2}\right) + y - 2 x}{\setminus \cos \left({x}^{2}\right) - 2 y - x}$