# How do you differentiate xcosy+ycos x=1?

Mar 10, 2015

Differentiate $x \cos y + y \cos x = 1$

I assume that you want $\frac{\mathrm{dy}}{\mathrm{dx}}$, which is

$\frac{\mathrm{dy}}{\mathrm{dx}} = \frac{y \sin x - \cos y}{\cos x - x \sin y}$.

Method:
Since we can't (or don't want to) solve for $y$, leave the function(s) implicit and use implicit differentiation. (An application of the chain rule.)

Given: $x \cos y + y \cos x = 1$
We know: $\frac{d}{\mathrm{dx}} \left(x \cos y + y \cos x\right) = \frac{d}{\mathrm{dx}} \left(1\right)$
So, using the product rule twice on the left:
$\left[\frac{\mathrm{dx}}{\mathrm{dx}} \cos y + x \frac{d}{\mathrm{dx}} \left(\cos y\right)\right] + \left[\frac{\mathrm{dy}}{\mathrm{dx}} \cos x + y \frac{d}{\mathrm{dx}} \left(\cos x\right)\right] = 0$

Thus, we see that:

$\cos y - x \sin y \frac{\mathrm{dy}}{\mathrm{dx}} + \frac{\mathrm{dy}}{\mathrm{dx}} \cos x - y \sin x = 0$

Solve algebraically for $\frac{\mathrm{dy}}{\mathrm{dx}}$, to get:

$\frac{\mathrm{dy}}{\mathrm{dx}} = \frac{y \sin x - \cos y}{\cos x - x \sin y}$.