# How do you determine whether the function f(x) = x^2e^x is concave up or concave down and its intervals?

Apr 18, 2018

You have to calculate inflection point(s), which mean find zeros of the second derivative.

#### Explanation:

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

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

$f ' ' \left(x\right) = 0$ $\iff$ $2 \cdot {e}^{x} \left(1 + x + {x}^{2}\right) = 0$
Remember that ${e}^{x}$ is always* positive
$\implies \left(1 + x + {x}^{2}\right) = 0$
${x}_{1 , 2} = \setminus \frac{- b \setminus \pm \setminus \sqrt{{b}^{2} - 4 a c}}{2 a}$
${x}_{1 , 2} = \setminus \frac{- 4 \setminus \pm \setminus \sqrt{{4}^{2} - 4 \cdot 2 \cdot 1}}{2 \cdot 1} =$
$= \setminus \frac{- 4 \setminus \pm \setminus \sqrt{16 - 8}}{2} =$
$= \setminus \frac{- 4 \setminus \pm \setminus \sqrt{8}}{2} =$
$= \setminus \frac{- 4 \setminus \pm 2 \setminus \sqrt{2}}{2} =$
$= - 2 \setminus \pm \setminus \sqrt{2}$

${x}_{1} = - 2 + \setminus \sqrt{2} = - 0.59$
${x}_{2} = - 2 - \setminus \sqrt{2} = - 3.41$
now you have 3 intervals:
1. $\left(- \infty , {x}_{2}\right)$
2. $\left({x}_{2} , {x}_{1}\right)$
3. $\left({x}_{1} , \infty\right)$

ask yourself if $f ' ' \left(x\right)$ is positive or negative on each interval:
(choose a number of the interval and calculate the value,
don't choose ${x}_{1}$ or ${x}_{2}$ because there is 0 as we calculated before).
1. $\left(- \infty , - 3.41\right)$ $x = 4 , f ' ' \left(- 4\right) > 0$
2. $\left(- 3.41 , - 0.59\right)$ $x = - 1 , f ' ' \left(- 1\right) < 0$
3. $\left(- 0.59 , \infty\right)$ $x = 0 , f ' ' \left(0\right) > 0$

if $f ' ' \left(x\right) > 0$ $\implies f \left(x\right)$ is convex
if $f ' ' \left(x\right) < 0$ $\implies f \left(x\right)$ is concave

convex interval: $\left(- \infty , - 3.41\right) \cup \left(- 0.59 , \infty\right)$
concave interval: $\left(- 3.41 , - 0.59\right)$

*${\lim}_{x \to - \infty} f ' ' \left(x\right) = 0$ (we are looking for $\left\mid x \right\mid < \infty$)