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

Nov 11, 2015

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

#### Explanation:

The quotient rule states that
$\frac{d}{\mathrm{dx}} \left(f \frac{x}{g} \left(x\right)\right) = \frac{g \left(x\right) \cdot f ' \left(x\right) - f \left(x\right) \cdot g ' \left(x\right)}{{\left(g \left(x\right)\right)}^{2}}$

Hence applying this rule to the given functions yields

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