# How do you differentiate xy = cot(xy)?

Sep 6, 2015

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

#### Explanation:

Start off by differentiating both sides.

$\frac{d}{\mathrm{dx}} \left(x y\right) = \frac{d}{\mathrm{dx}} \left(\cot \left(x y\right)\right)$

First, let's discuss how to differentiate the left side.
We can apply the product rule.

$x \left(\frac{d}{\mathrm{dx}} y\right) + y \left(\frac{d}{\mathrm{dx}} x\right) = \frac{d}{\mathrm{dx}} \left(\cot \left(x y\right)\right)$

$\frac{d}{\mathrm{dx}} y = \frac{\mathrm{dy}}{\mathrm{dx}}$ due to implicit differentiation and the chain rule.

So:

$x \left(\frac{d}{\mathrm{dx}} y\right) + y \left(\frac{d}{\mathrm{dx}} x\right) = \frac{d}{\mathrm{dx}} \left(\cot \left(x y\right)\right)$

$x \frac{\mathrm{dy}}{\mathrm{dx}} + y = \frac{d}{\mathrm{dx}} \left(\cot \left(x y\right)\right)$

Next, we can differentiate the right side using the chain rule.
In short terms, the chain rule is:
1) The derivative of the outer function, with the inner function plugged in...
2) ...multiplied by the derivative of the inner function.

The outer function is $\cot \left(x\right)$.
The inner function is $x y$.

The derivative of the outer function is ${\csc}^{2} \left(x\right)$.
Plug in the inner function and we get ${\csc}^{2} \left(x y\right)$.
Then we multiply this by the derivative of the inner function.

So $x \frac{\mathrm{dy}}{\mathrm{dx}} + y = \frac{d}{\mathrm{dx}} \left(\cot \left(x y\right)\right)$ becomes:

$x \frac{\mathrm{dy}}{\mathrm{dx}} + y = {\csc}^{2} \left(x y\right) \cdot \frac{d}{\mathrm{dx}} \left(x y\right)$

We've already solved $\frac{d}{\mathrm{dx}} \left(x y\right)$ on the left side, so we can just copy it:

$x \frac{\mathrm{dy}}{\mathrm{dx}} + y = {\csc}^{2} \left(x y\right) \cdot \left[x \frac{\mathrm{dy}}{\mathrm{dx}} + y\right]$

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

Then we need to isolate $\frac{\mathrm{dy}}{\mathrm{dx}}$ so we bring all $\frac{\mathrm{dy}}{\mathrm{dx}}$ terms to one side:

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

Then we factor out $\frac{\mathrm{dy}}{\mathrm{dx}}$ to isolate it:

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

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