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

Sep 10, 2017

First, split off your separate expressions into sub-functions.

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

Then $\frac{\mathrm{dt}}{\mathrm{dx}} = 2 x$.

$\frac{\mathrm{du}}{\mathrm{dx}} = 2 \left(x + 2\right)$.

By the chain rule, $\frac{\mathrm{dv}}{\mathrm{dx}} = 3 {\left(x - 3\right)}^{2}$.

The product rule for three terms states:

If $y = t \cdot u \cdot v$, and $y$ is a function of $x$.

Then $\frac{\mathrm{dy}}{\mathrm{dx}} = \frac{\mathrm{dt}}{\mathrm{dx}} \cdot u \cdot v + \frac{\mathrm{du}}{\mathrm{dx}} \cdot t \cdot v + \frac{\mathrm{dv}}{\mathrm{dx}} \cdot t \cdot u$.

So, $\frac{\mathrm{dy}}{\mathrm{dx}} =$ $2 x \cdot {\left(x + 2\right)}^{2} \cdot {\left(x - 3\right)}^{3} + 2 \left({x}^{2} + 1\right) \cdot {\left(x - 3\right)}^{3} \cdot \left(x + 2\right) + 3 \left({x}^{2} + 1\right) \cdot {\left(x + 2\right)}^{2} \cdot {\left(x - 3\right)}^{3}$

Which when you go through the painful process of expansion and simplification, yields:

$\frac{\mathrm{dy}}{\mathrm{dx}} = 7 {x}^{6} - 30 {x}^{5} - 20 {x}^{4} + 160 {x}^{3} - 15 {x}^{2} - 126 x$

Sep 10, 2017

$f ' \left(x\right) = x \left(x + 2\right) {\left(x - 3\right)}^{2} \left(7 {x}^{2} - 2 x - 7\right)$

#### Explanation:

We have:

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

We can utilise the triple product rule, a direct extension of the standard product rule for differentiation:

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

and we will also require the chain rule:

Applying the triple product rule we get:

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

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

We can readily simplify as there is a common factor of $\left(x + 2\right) {\left(x - 3\right)}^{2}$:

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

 \ \ \ \ \ \ \ \ \= (x+2)(x-3)^2 { (3x^3+6x^2+3x+6) +
 \ \ \ \ \ \ \ \ \ \ \ (2x^3-6x^2+2x-6) + (2x^3-2x^2-12x) }

$\setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus = \left(x + 2\right) {\left(x - 3\right)}^{2} \left(7 {x}^{3} - 2 {x}^{2} - 7 x\right)$
$\setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus \setminus = x \left(x + 2\right) {\left(x - 3\right)}^{2} \left(7 {x}^{2} - 2 x - 7\right)$