# Is f(x)=-xe^x+x^3-x^2 concave or convex at x=-2?

Jan 15, 2017

Since $f ' ' \left(- 2\right) < 0$, the function is concave

#### Explanation:

First, you would calculate the first and the second derivatives:

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

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

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

$= - 2 {e}^{x} - x {e}^{x} + 6 x - 2$

Then you would calculate

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

$= \cancel{- 2 {e}^{-} 2} \cancel{+ 2 {e}^{-} 2} - 12 - 2$

$- 14 < 0$

Since $f ' ' \left(- 2\right) < 0$, the function is concave
graph{-xe^x+x3-x^2 [-10.035, 9.965, -7.32, 2.68]}