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

Feb 24, 2018

$\left({e}^{x} + \sin x\right) \left(- 2 \cot x {\csc}^{2} x\right) + \left({\cot}^{2} x + 1\right) \left({e}^{x} + \cos x\right)$

is the function obtained after differentiating using the product rule for the function described by

$f \left(x\right) = \left({e}^{x} + \sin x\right) \left({\cot}^{2} x + 1\right)$

#### Explanation:

Given:

$f \left(x\right) = \left({e}^{x} + \sin x\right) \left({\cot}^{2} x + 1\right)$

Let

$y = f \left(x\right)$

$u = \left({e}^{x} + \sin x\right)$

$v = \left({\cot}^{2} x + 1\right)$

By the product rule,

$\frac{d}{\mathrm{dx}} \left(u v\right) = u \frac{\mathrm{dv}}{\mathrm{dx}} + v \frac{\mathrm{du}}{\mathrm{dx}}$

Here,

$u = \left({e}^{x} + \sin x\right)$

Differentiating wrt x

$\frac{\mathrm{du}}{\mathrm{dx}} = \frac{d}{\mathrm{dx}} \left(u\right)$

$\frac{d}{\mathrm{dx}} \left(u\right) = \frac{d}{\mathrm{dx}} \left({e}^{x} + \sin x\right)$

By the sum rule

$\frac{d}{\mathrm{dx}} \left({e}^{x} + \sin x\right) = \frac{d}{\mathrm{dx}} \left({e}^{x}\right) + \frac{d}{\mathrm{dx}} \left(\sin x\right)$

$\frac{d}{\mathrm{dx}} \left({e}^{x}\right) = {e}^{x}$

$\frac{d}{\mathrm{dx}} \left(e \sin x\right) = \cos x$

$\frac{d}{\mathrm{dx}} \left({e}^{x} + \sin x\right) = {e}^{x} + \cos x$

$\frac{d}{\mathrm{dx}} \left(u\right) = {e}^{x} + \cos x$

$\frac{\mathrm{du}}{\mathrm{dx}} = {e}^{x} + \cos x$

$v = \left({\cot}^{2} x + 1\right)$

Differentiating wrt x

$\frac{\mathrm{dv}}{\mathrm{dx}} = \frac{d}{\mathrm{dx}} \left(v\right)$

$\frac{d}{\mathrm{dx}} \left(v\right) = \frac{d}{\mathrm{dx}} \left({\cot}^{2} x + 1\right)$

By the sum rule

$\frac{d}{\mathrm{dx}} \left({\cot}^{2} x + 1\right) = \frac{d}{\mathrm{dx}} \left({\cot}^{2} x\right) + \frac{d}{\mathrm{dx}} \left(1\right)$

$\frac{d}{\mathrm{dx}} \left({\cot}^{2} x\right) = 2 \cot x \left(- {\csc}^{2} x\right)$

$\frac{d}{\mathrm{dx}} \left({\cot}^{2} x\right) = - 2 \cot x {\csc}^{2} x$

$\frac{d}{\mathrm{dx}} \left(1\right) = 0$

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

$\frac{d}{\mathrm{dx}} \left(v\right) = - 2 \cot x {\csc}^{2} x$

$\frac{\mathrm{dv}}{\mathrm{dx}} = - 2 \cot x {\csc}^{2} x$

$\frac{d}{\mathrm{dx}} \left(u v\right) = u \frac{\mathrm{dv}}{\mathrm{dx}} + v \frac{\mathrm{du}}{\mathrm{dx}}$

$u = \left({e}^{x} + \sin x\right)$

$v = \left({\cot}^{2} x + 1\right)$

$\frac{\mathrm{du}}{\mathrm{dx}} = {e}^{x} + \cos x$

$\frac{\mathrm{dv}}{\mathrm{dx}} = - 2 \cot x {\csc}^{2} x$

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