# What are the global and local extrema of f(x) = e^x(x^2+2x+1)  ?

Feb 28, 2017

$f \left(x\right)$ has an absolute minimum at $\left(- 1. 0\right)$
$f \left(x\right)$ has a local maximum at $\left(- 3 , 4 {e}^{-} 3\right)$

#### Explanation:

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

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

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

For absolute or local extrema: $f ' \left(x\right) = 0$

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

Since ${e}^{x} > 0 \forall x \in \mathbb{R}$

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

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

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

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

Again, since ${e}^{x} > 0$ we need only test the sign of $\left({x}^{2} + 6 x + 7\right)$
at our extrema points to determine whether the point is a maximum or a minimum.

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

$f ' ' \left(- 3\right) = {e}^{-} 3 \cdot \left(- 2\right) < 0 \to f \left(- 3\right)$ is a maximum

Considering the graph of $f \left(x\right)$ below it is clear that $f \left(- 3\right)$ is a local maximum and $f \left(- 1\right)$ is an absolute minimum.

graph{e^x(x^2+2x+1) [-5.788, 2.005, -0.658, 3.24]}

Finally, evaluating the extrema points:

$f \left(- 1\right) = {e}^{-} 1 \left(1 - 2 + 1\right) = 0$
and
$f \left(- 3\right) = {e}^{-} 3 \left(9 - 6 + 1\right) = 4 {e}^{-} 3 \cong 0.199$