# Is f(x)=1-x-e^(x)/x^2 concave or convex at x=-1?

Aug 8, 2017

Convex

#### Explanation:

The second derivative is determinative of concavity. Start by finding the first derivative.

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

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

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

Now differentiate this.

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

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

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

We now evaluate the point within the second derivative.

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

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

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

This is obviously negative, therefore, the function is convex at $x = - 1$. If the second derivative had had a positive value at $x = - 1$, then we would have dubbed it concave at that point. Here is a graphical confirmation:

graph{1 - x - e^x/x^2 [-10, 10, -5, 5]}

Hopefully this helps!