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

Jul 9, 2018

The function is convex at $x = 0$

#### Explanation:

The derivative of a quotient is

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

The function is

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

The first derivative is

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

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

The second derivative is

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

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

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

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

When $x = 0$

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

As $f ' ' \left(0\right) > 0$, the function is convex at $x = 0$

graph{e^x-x^2/(x-1) [-14.24, 14.23, -7.12, 7.12]}