# How do you differentiate f(x)=(x^2-2x+8)/sinx-1/x using the quotient rule?

Jun 8, 2016

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

#### Explanation:

The quotient rule is $f ' \left(x\right) = \frac{v \frac{\mathrm{du}}{\mathrm{dx}} - u \frac{\mathrm{dv}}{\mathrm{dx}}}{v} ^ 2$

First lets rearrange the second term in f(x) to make it easier to differentiate.

$f \left(x\right) = \frac{{x}^{2} - 2 x + 8}{\sin} x - {x}^{-} 1$

Next let's differentiate the first term using the quotient rule.

$u = {x}^{2} - 2 x + 8$
$v = \sin x$

$\frac{\mathrm{du}}{\mathrm{dx}} = 2 x - 2$

$\frac{\mathrm{dv}}{\mathrm{dx}} = \cos x$

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

We can simplify this a bit by splitting up the fraction and cancelling the sin on the top and the bottom.

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

Now we just put that back in and differentiate ${x}^{-} 1$

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