# How do you differentiate f(x)= ( x + 1 )/ ( xcot x ) using the quotient rule?

Feb 3, 2016

$\frac{2 {x}^{2} + 2 x - \sin \left(2 x\right)}{2 {x}^{2} {\cos}^{2} \left(x\right)}$

#### Explanation:

Ohhhh boy. This is gonna be long.

First let's write down the quotient rule:
$\frac{d}{\mathrm{dx}} \frac{u \left(x\right)}{v \left(x\right)} = \frac{u ' \left(x\right) v \left(x\right) - u \left(x\right) v ' \left(x\right)}{{\left[v \left(x\right)\right]}^{2}}$

In our case $u \left(x\right) = x + 1$ and $v \left(x\right) = x \cot \left(x\right)$.
Let's now find $u ' \left(x\right)$ and $v ' \left(x\right)$:
$\frac{d}{\mathrm{dx}} \left(x + 1\right) = 1$
$\frac{d}{\mathrm{dx}} \left(x \cot \left(x\right)\right) = \ldots$
...and this is where it begins to get complicated because in order to find the derivative of $x \cot \left(x\right)$, we need to use the product rule, which states:
$\frac{d}{\mathrm{dx}} u \left(x\right) v \left(x\right) = u ' \left(x\right) v \left(x\right) + u \left(x\right) v \left(x\right) '$

In $x \cot \left(x\right)$, $u \left(x\right) = x$ and $v \left(x\right) = \cot \left(x\right)$. Let's find the derivatives:
$\frac{d}{\mathrm{dx}} x = 1$
$\frac{d}{\mathrm{dx}} \cot \left(x\right) = - {\csc}^{2} \left(x\right)$
Applying this to the product rule,
$\frac{d}{\mathrm{dx}} \left(x \cot \left(x\right)\right) = \left(x\right) ' \left(\cot \left(x\right)\right) + \left(x\right) \left(\cot \left(x\right)\right) '$
$\frac{d}{\mathrm{dx}} \left(x \cot \left(x\right)\right) = \cot \left(x\right) - x {\csc}^{2} \left(x\right)$

Okay, now back to the quotient rule. We know
$\frac{d}{\mathrm{dx}} \left(x + 1\right) = 1$
$\frac{d}{\mathrm{dx}} \left(x \cot \left(x\right)\right) = \cot \left(x\right) - x {\csc}^{2} \left(x\right)$

Let's plug it all into the quotient rule:
$\frac{d}{\mathrm{dx}} \frac{x + 1}{x \cot \left(x\right)} = \frac{\left(x + 1\right) ' \left(x \cot \left(x\right)\right) - \left(x + 1\right) \left(x \cot \left(x\right)\right) '}{{\left[x \cot \left(x\right)\right]}^{2}}$

Making necessary substitutions,
$\frac{d}{\mathrm{dx}} \frac{x + 1}{x \cot \left(x\right)} = \frac{\left(1\right) \left(x \cot \left(x\right)\right) - \left(x + 1\right) \left(\cot \left(x\right) - x {\csc}^{2} \left(x\right)\right)}{{\left[x \cot \left(x\right)\right]}^{2}}$

Now onto the algebra/trig:
d/dx(x+1)/(xcot(x))=(xcot(x)-(xcot(x)-x^2csc^2(x)+cot(x)-xcsc^2(x)))/(x^2cot^2(x)$\to$multiplying $x + 1$ by $\cot \left(x\right) - x {\csc}^{2} \left(x\right)$ and squaring the denominator

d/dx(x+1)/(xcot(x))=(xcot(x)-xcot(x)+x^2csc^2(x)-cot(x)+xcsc^2(x))/(x^2cot^2(x)$\to$distributing the negative sign

d/dx(x+1)/(xcot(x))=((xcsc^2(x))(x+1)-cot(x))/(x^2cot^2(x)$\to$canceling $x \cot \left(x\right)$ and factoring out $x {\csc}^{2} \left(x\right)$

$\frac{d}{\mathrm{dx}} \frac{x + 1}{x \cot \left(x\right)} = \frac{\left(x {\csc}^{2} \left(x\right)\right) \left(x + 1\right)}{{x}^{2} {\cot}^{2} \left(x\right)} - \frac{\cot \left(x\right)}{{x}^{2} {\cot}^{2} \left(x\right)}$$\to$splitting the fraction

$\frac{d}{\mathrm{dx}} \frac{x + 1}{x \cot \left(x\right)} = \frac{\left({\csc}^{2} \left(x\right)\right) \left(x + 1\right)}{x {\cot}^{2} \left(x\right)} - \frac{1}{{x}^{2} \cot \left(x\right)}$$\to$doing some canceling

$\frac{d}{\mathrm{dx}} \frac{x + 1}{x \cot \left(x\right)} = \frac{\left({\sec}^{2} \left(x\right)\right) \left(x + 1\right)}{x} - \frac{\tan \left(x\right)}{{x}^{2}}$$\to$because ${\csc}^{2} \frac{x}{\cot} ^ 2 \left(x\right) = {\sec}^{2} \left(x\right)$ and $\frac{1}{\cot} \left(x\right) = \tan \left(x\right)$

$\frac{d}{\mathrm{dx}} \frac{x + 1}{x \cot \left(x\right)} = \frac{\left(x {\sec}^{2} \left(x\right)\right) \left(x + 1\right) - \left(\tan \left(x\right)\right)}{{x}^{2}}$$\to$adding the fractions

We can also express this result with only sines and cosines:

$\frac{d}{\mathrm{dx}} \frac{x + 1}{x \cot \left(x\right)} = \frac{{x}^{2} {\sec}^{2} \left(x\right) + x {\sec}^{2} \left(x\right) - \tan \left(x\right)}{{x}^{2}}$

$\frac{d}{\mathrm{dx}} \frac{x + 1}{x \cot \left(x\right)} = \frac{1}{\cos} ^ 2 \left(x\right) \frac{{x}^{2} + x - \sin \left(x\right) \cos \left(x\right)}{{x}^{2}}$

$\frac{d}{\mathrm{dx}} \frac{x + 1}{x \cot \left(x\right)} = \frac{{x}^{2} + x - \sin \left(x\right) \cos \left(x\right)}{{x}^{2} {\cos}^{2} \left(x\right)}$

$\frac{d}{\mathrm{dx}} \frac{x + 1}{x \cot \left(x\right)} = \frac{2}{2} \cdot \frac{{x}^{2} + x - \sin \left(x\right) \cos \left(x\right)}{{x}^{2} {\cos}^{2} \left(x\right)}$

$\frac{d}{\mathrm{dx}} \frac{x + 1}{x \cot \left(x\right)} = \frac{2 {x}^{2} + 2 x - 2 \sin \left(x\right) \cos \left(x\right)}{2 {x}^{2} {\cos}^{2} \left(x\right)}$

$\frac{d}{\mathrm{dx}} \frac{x + 1}{x \cot \left(x\right)} = \frac{2 {x}^{2} + 2 x - \sin \left(2 x\right)}{2 {x}^{2} {\cos}^{2} \left(x\right)}$

And with that, we have our result.