# How do you find the local max and min for f(x) = e^x(x^2+2x+1)?

Mar 17, 2016

We have a local maxima at $x = - 3$ and a local minima at $x = - 1$.

#### Explanation:

To find local maxima and minima of $f \left(x\right) = {e}^{x} \left({x}^{2} + 2 x + 1\right)$, let us first differentiate it

$f ' \left(x\right) = {e}^{x} \frac{d}{\mathrm{dx}} \left({x}^{2} + 2 x + 1\right) + \frac{{\mathrm{de}}^{x}}{\mathrm{dx}} \left({x}^{2} + 2 x + 1\right)$ or

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

$f ' \left(x\right) = {e}^{x} \left({x}^{2} + 4 x + 3\right) = {e}^{x} \left(x + 3\right) \left(x + 1\right)$
which will be zero for $x = - 1$ and $x = - 3$

Hence, maxima and minima will be at $x = - 1$ and $x = - 3$

To find whether is maxima or minima, let us find out second derivative.

$f ' ' \left(x\right) - \frac{d}{\mathrm{dx}} {e}^{x} \left({x}^{2} + 4 x + 3\right)$, which is

$f ' ' \left(x\right) = {e}^{x} \frac{d}{\mathrm{dx}} \left({x}^{2} + 4 x + 3\right) + \frac{{\mathrm{de}}^{x}}{\mathrm{dx}} \left({x}^{2} + 4 x + 3\right)$ or

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

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

At $x = - 3$, $f ' ' \left(x\right) = {e}^{-} 3 \left({\left(- 3\right)}^{2} + 6 \left(- 3\right) + 7\right) = - 2 {e}^{-} 3$ and is negative.

At $x = - 1$, $f ' ' \left(x\right) = {e}^{-} 1 \left({\left(- 1\right)}^{2} + 6 \left(- 1\right) + 7\right) = 2 {e}^{-} 3$ and is positive.

Hence we have a local maxima at $x = - 3$ and a local minima at $x = - 1$.

graph{e^x(x^2+2x+1) [-10, 10, -5, 5]}