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

Aug 4, 2017

The function $f \left(x\right)$ is convex at $x = - 1$

#### Explanation:

The derivative of a quotient is

$\left(\frac{u}{v}\right) ' = \frac{u ' v - u v '}{{v}^{2}}$

We calcule the first derivative

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

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

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

Now, we calculate the second derivative,

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

$= {e}^{x - 1} - \frac{2 {x}^{2} - 2 x - 2 x + 2 - 2 {x}^{2} + 4 x}{x - 1} ^ 3$

$= {e}^{x - 1} - \frac{2}{x - 1} ^ 3$

At $x = - 1$

$f ' ' \left(- 1\right) = {e}^{- 1 - 1} - \frac{2}{- 1 - 1} ^ 3 = 0.135 + 0.25 = 0.385$

As $f ' ' \left(- 1\right) > 0$, we conclude that $f \left(x\right)$ is convex at $x = - 1$

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