# How do you differentiate f(x)=(e^x+x)(cot^2x+x) using the product rule?

Mar 8, 2017

$\frac{\mathrm{df}}{\mathrm{dx}} = \left({e}^{x} + 1\right) \left({\cot}^{2} x + x\right) + \left(1 - 2 \cot x {\csc}^{2} x\right) \left({e}^{x} + 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)$

Here we have $g \left(x\right) = {e}^{x} + x$ and $h \left(x\right) = {\cot}^{2} x + x$

and as $\frac{\mathrm{dg}}{\mathrm{dx}} = {e}^{x} + 1$

and $\frac{\mathrm{dh}}{\mathrm{dx}} = 2 \cot x \times - {\csc}^{2} x + 1 = - 2 \cot x {\csc}^{2} x + 1$

hence

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