# For what values of x is f(x)=x^3+x-e^x/x concave or convex?

Sep 13, 2017

See description and attached graph.

#### Explanation:

To solve this, we must find the second derivative. In finding both the first and second derivative we will need to recall the Quotient Rule:

$f \left(x\right) = g \frac{x}{h \left(x\right)} \to f ' \left(x\right) = \frac{g ' \left(x\right) h \left(x\right) - g \left(x\right) h ' \left(x\right)}{{h}^{2} \left(x\right)}$

This is useful for our third term.

Using the power rule, the quotient rule, and the definition of the derivative of the ${e}^{x}$ function, we obtain...

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

Of note, this function is not differentiable at x = 0. Elsewhere, however...

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

We now graph this result. Where this second derivative is greater than 0, the function is "convex" aka "concave up." Where the second derivative is less than 0, the function is "concave" aka "concave down".

graph{6x - e^x/x + e^x/x^2 + e^x/x^2 - 2e^x/x^3 [-10, 10, -5, 5]}