# How do you differentiate f(x)=ln2x * cot(5-x) using the product rule?

Jun 19, 2016

$\frac{\mathrm{df}}{\mathrm{dx}} = \cot \frac{5 - x}{x} + {\csc}^{2} \left(5 - x\right) \ln \left(2 x\right)$

#### Explanation:

Product rule states if $f \left(x\right) = g \left(x\right) h \left(x\right)$

then $\frac{\mathrm{df}}{\mathrm{dx}} = \frac{\mathrm{dg}}{\mathrm{dx}} \times h \left(x\right) + \frac{\mathrm{dh}}{\mathrm{dx}} \times g \left(x\right)$

Hence as $f \left(x\right) = \ln \left(2 x\right) \cot \left(5 - x\right)$

$\frac{\mathrm{df}}{\mathrm{dx}} = \frac{1}{2 x} \times 2 \times \cot \left(5 - x\right) - {\csc}^{2} \left(5 - x\right) \times \left(- 1\right) \times \ln \left(2 x\right)$

or $\frac{\mathrm{df}}{\mathrm{dx}} = \cot \frac{5 - x}{x} + {\csc}^{2} \left(5 - x\right) \ln \left(2 x\right)$