# How do you differentiate f(x)=(x-1)(x-2)(x-3)?

Sep 7, 2015

$\frac{d}{\mathrm{dx}} \left(x - 1\right) \left(x - 2\right) \left(x - 3\right) = 3 {x}^{2} - 12 x + 11$

#### Explanation:

One method is to expand the entire expression, and then differentiate using the power rule .

$\frac{d}{\mathrm{dx}} \left(x - 1\right) \left(x - 2\right) \left(x - 3\right)$
$= \frac{d}{\mathrm{dx}} \left[\left({x}^{2} - 3 x + 2\right) \left(x - 3\right)\right]$
$= \frac{d}{\mathrm{dx}} \left({x}^{3} - 3 {x}^{2} + 2 x - 3 {x}^{2} + 9 x - 6\right)$
$= \frac{d}{\mathrm{dx}} \left({x}^{3} - 6 {x}^{2} + 11 x - 6\right)$
$= \frac{d}{\mathrm{dx}} \left({x}^{3}\right) - \frac{d}{\mathrm{dx}} \left(6 {x}^{2}\right) + \frac{d}{\mathrm{dx}} \left(11 x\right) - \frac{d}{\mathrm{dx}} \left(6\right)$
$= 3 {x}^{2} - 12 x + 11 - 0$
$= 3 {x}^{2} - 12 x + 11$

Another method is to use the product rule, which I'll show here:
$\frac{d}{\mathrm{dx}} f \left(x\right) g \left(x\right) = f \left(x\right) \frac{d}{\mathrm{dx}} g \left(x\right) + g \left(x\right) \frac{d}{\mathrm{dx}} f \left(x\right)$

We want to find $\frac{d}{\mathrm{dx}} \left(x - 1\right) \left(x - 2\right) \left(x - 3\right)$
We can apply the product rule in stages:

First, let's let our $f \left(x\right) = x - 1$ and $g \left(x\right) = \left(x - 2\right) \left(x - 3\right)$.

$\frac{d}{\mathrm{dx}} \left(x - 1\right) \left(x - 2\right) \left(x - 3\right)$
$= \left(x - 1\right) \frac{d}{\mathrm{dx}} \left[\left(x - 2\right) \left(x - 3\right)\right] + \left(x - 2\right) \left(x - 3\right) \frac{d}{\mathrm{dx}} \left[x - 1\right]$

The right side is easy enough: $\frac{d}{\mathrm{dx}} \left[x - 1\right] = \left(1 - 0\right) = 1$

So now we have:
$\left(x - 1\right) \frac{d}{\mathrm{dx}} \left[\left(x - 2\right) \left(x - 3\right)\right] + \left(x - 2\right) \left(x - 3\right)$

Now we apply the product rule again, this time with $f \left(x\right) = x - 2$ and $g \left(x\right) = x - 3$.

$\left(x - 1\right) \frac{d}{\mathrm{dx}} \left[\left(x - 2\right) \left(x - 3\right)\right] + \left(x - 2\right) \left(x - 3\right)$

$= \left(x - 1\right) \left[\left(x - 2\right) \frac{d}{\mathrm{dx}} \left(x - 3\right) + \left(x - 3\right) \frac{d}{\mathrm{dx}} \left(x - 2\right)\right] + \left(x - 2\right) \left(x - 3\right)$

$= \left(x - 1\right) \left[\left(x - 2\right) + \left(x - 3\right)\right] + \left(x - 2\right) \left(x - 3\right)$

$= \left(x - 1\right) \left(2 x - 5\right) + \left(x - 2\right) \left(x - 3\right)$

$= \left(2 {x}^{2} - 7 x + 5\right) + \left({x}^{2} - 5 x + 6\right)$

$= 3 {x}^{2} - 12 x + 11$

which is the same as our previous answer.