# How do you differentiate f(x)=(x+3)^2*(x-1) using the product rule?

May 29, 2016

See below.

#### Explanation:

The product rule: $\frac{d}{\mathrm{dx}} u \left(x\right) v \left(x\right) = v \left(x\right) \frac{d}{\mathrm{dx}} u \left(x\right) + u \left(x\right) \frac{d}{\mathrm{dx}} v \left(x\right)$

Let $u \left(x\right) = {\left(x + 3\right)}^{2}$ and $v \left(x\right) = \left(x - 1\right)$

Therefore $f ' \left(x\right)$ (just different notation to $\frac{d}{\mathrm{dx}} f \left(x\right)$) is equal to:
$\left(x - 1\right) \frac{d}{\mathrm{dx}} {\left(x + 3\right)}^{2} + {\left(x + 3\right)}^{2} \frac{d}{\mathrm{dx}} \left(x - 1\right)$

Let's firstly simplify those derivatives:
$\frac{d}{\mathrm{dx}} {\left(x + 3\right)}^{2}$ needs a use of the chain rule: $2 \left(x + 3\right)$
$\frac{d}{\mathrm{dx}} \left(x - 1\right)$ is just $1$

Therefore, finishing off:
$f ' \left(x\right) = 2 \left(x - 1\right) \left(x + 3\right) + {\left(x + 3\right)}^{2}$
You could then factorise by (x+3):
$f ' \left(x\right) = \left(x + 3\right) \left[2 \left(x - 1\right) + \left(x + 3\right)\right]$
Finally:
$f ' \left(x\right) = \left(x + 3\right) \left(3 x + 1\right)$