# For what values of x is f(x)=(x^2−x)e^x concave or convex?

Dec 31, 2015

The function is convex on $\left(- \infty , - 3\right) \cup \left(0 , \infty\right)$.
The function is concave on $\left(- 3 , 0\right)$.

#### Explanation:

First, find the second derivative.

First Derivative

Use product rule.

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

$\implies {e}^{x} \left({x}^{2} + x - 1\right)$

Second Derivative

Use product rule again.

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

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

Create a sign chart to find when $f ' ' \left(x\right)$ is positive (convex) and negative (concave). To find the important values on the chart, set $f ' ' \left(x\right) = 0$.

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

$x = - 3 , 0$

$\textcolor{w h i t e}{s s s s s s s s s s} - 3 \textcolor{w h i t e}{s s s s s s s s s s s s s s} 0$
$\leftarrow - - - - - - - - - - - - - \rightarrow$
$\textcolor{w h i t e}{s s s s s} + \textcolor{w h i t e}{s s s s s s s s s s s s} - \textcolor{w h i t e}{s s s s s s s s s s s s} +$

The function is convex on $\left(- \infty , - 3\right) \cup \left(0 , \infty\right)$.
The function is concave on $\left(- 3 , 0\right)$.

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