# How do you differentiate y = x(1 - x)^2(x + 2)^3?

Apr 3, 2015

The product rule gives us:
For a product of two factors, (First and Second)

$\left(F S\right) ' = F ' S + F S '$.

Now, if there are three factors (First Second and Third), then we get

$\left(F S T\right) ' = \left(F S\right) ' T + \left(F S\right) T ' = \left(F ' S + F S '\right) T + \left(F S\right) T '$ which may be written:

$\left(F S T\right) ' = F ' S T + F S ' T + F S T '$.

For $y = x {\left(1 - x\right)}^{2} {\left(x + 2\right)}^{3}$, we start:

$y ' = \left[1\right] {\left(1 - x\right)}^{2} {\left(x + 2\right)}^{3} + x \left[2 \left(1 - x\right) \left(- 1\right)\right] {\left(x + 2\right)}^{3} + x {\left(1 - x\right)}^{2} \left[3 {\left(x + 2\right)}^{2} \left(1\right)\right]$.

We can rewrite this:

$y ' = {\left(1 - x\right)}^{2} {\left(x + 2\right)}^{3} - 2 x \left(1 - x\right) {\left(x + 2\right)}^{3} + 3 x {\left(1 - x\right)}^{2} {\left(x + 2\right)}^{2}$.

Removing common factors and simplifying gives us:

$y ' = \left(1 - x\right) {\left(x + 2\right)}^{2} \left(- 6 {x}^{2} - 2 x + 2\right) = - 2 \left(1 - x\right) {\left(x + 2\right)}^{2} \left(3 {x}^{2} + x - 1\right)$.

Final Note:

Because $\left(1 - x\right) = - \left(x - 1\right)$, we could rewrite the middle factor as ${\left(x - 1\right)}^{2}$.

Our answer would look like:

$y ' = 2 \left(x - 1\right) {\left(x + 2\right)}^{2} \left(3 {x}^{2} + x - 1\right)$,

which is, of course, equivalent to the expression above.