# Is f(x)=(x-2)^2(x+1)(x+4) increasing or decreasing at x=1?

Jul 14, 2017

We are given $y = {\left(x - 2\right)}^{2} \left(x + 1\right) \left(x + 4\right)$

To find the gradient we must differentiate, but as our equation is in the form $y = u \cdot v \cdot w$, where $u$, $v$ and $w$ are functions of $x$. We must use the product rule where:
$\frac{\mathrm{dy}}{\mathrm{dx}} = \left(u ' \cdot v \cdot w\right) + \left(u \cdot v ' \cdot w\right) + \left(u \cdot v \cdot w '\right)$

In this case, $y = {u}^{2} \cdot v \cdot w$, where:
$u = \left(x - 2\right)$,
$v = \left(x + 1\right)$, and
$w = \left(x + 4\right)$

$\frac{\mathrm{dy}}{\mathrm{du}} = 2 u$

$\frac{\mathrm{dy}}{\mathrm{dv}} = 1$

$\frac{\mathrm{dy}}{\mathrm{dw}} = 1$

$\frac{\mathrm{du}}{\mathrm{dx}} = 1$

$\frac{\mathrm{dv}}{\mathrm{dx}} = 1$

$\frac{\mathrm{dw}}{\mathrm{dx}} = 1$

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

Putting our values for $x = 1$ in gives us $2 \left(1 - 2\right) \left(1 + 1\right) \left(1 + 4\right) + {\left(1 - 2\right)}^{2} \left(1 + 4\right) + {\left(1 - 2\right)}^{2} \left(1 + 1\right) = 2 \left(- 1\right) \left(2\right) \left(5\right) + {\left(- 1\right)}^{2} \left(5\right) + {\left(- 1\right)}^{2} \left(2\right) = - 13$

As $\frac{\mathrm{dy}}{\mathrm{dx}}$ is negative when $x = 1$, the gradient is negative and therefore decreasing.