# How do you find local maximum value of f using the first and second derivative tests: f(x) = e^x(x^2+2x+1)?

Jun 21, 2017

${f}_{\max} = f \left(- 3\right) = 4 {e}^{- 3} \approx 0.19914827347$

#### Explanation:

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

For a local maximum or minimum of $f \left(x\right) , f ' \left(x\right) = 0$

Applying the product rule and the standard differential of ${e}^{x}$

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

$= {e}^{x} \left({x}^{2} + 4 x + 3\right)$

Setting $f ' \left(x\right) = 0$

${e}^{x} \left({x}^{2} + 4 x + 3\right) = 0$

Since ${e}^{x} > 0 \forall x$

${x}^{2} + 4 x + 3 = 0$

$\left(x + 3\right) \left(x + 1\right) = 0 \to x = - 3 \mathmr{and} - 1$

To test for a maximum or minimum we need to test the sign of $f ' ' \left(x\right)$ at the turning points.

Applying the product rule and the standard differential of ${e}^{x}$ again.

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

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

$f ' ' \left(- 3\right) = {e}^{- 3} \left(9 - 18 + 7\right) = - 2 {e}^{- 3} < 0 \to f \left(- 3\right)$ is a local maximum

$f ' ' \left(- 1\right) = {e}^{- 1} \left(1 - 6 + 7\right) = 2 {e}^{- 1} > 0 \to f \left(- 1\right)$ is a local minimum

We are asked to find the local maximum.

${f}_{\text{max}} = f \left(- 3\right) = {e}^{- 3} \left(9 - 6 + 1\right) = 4 {e}^{- 3} \approx 0.19914827347$

The local extrema can be seen on the graph of $f \left(x\right)$ below.
graph{e^x(x^2+2x+1) [-4.783, 0.086, -1.156, 1.277]}