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

Dec 27, 2015

$f ' \left(x\right) = \frac{\left(1 - 2 x \sin x - {x}^{2} \cos x\right) \tan x - {\sec}^{2} x \left(x - {x}^{2} \sin x\right)}{\tan} ^ 2 x$

#### Explanation:

Use the quotient rule.

If $f \left(x\right) = \frac{g \left(x\right)}{h \left(x\right)}$, then

$f ' \left(x\right) = \frac{g ' \left(x\right) h \left(x\right) - h ' \left(x\right) g \left(x\right)}{h \left(x\right)} ^ 2$

$g \left(x\right) = x - {x}^{2} \sin x$
$h \left(x\right) = \tan x$

$g ' \left(x\right) = 1 - 2 x \sin x - {x}^{2} \cos x$
$h ' \left(x\right) = {\sec}^{2} x$

Note the use of the product rule to find $g ' \left(x\right)$.

Thus,

$f ' \left(x\right) = \frac{\left(1 - 2 x \sin x - {x}^{2} \cos x\right) \tan x - {\sec}^{2} x \left(x - {x}^{2} \sin x\right)}{\tan} ^ 2 x$