For what values of x is f(x)=-x^2-xe^x concave or convex?

Jun 12, 2018

The graph is always concave down (or just concave).

Explanation:

Each of a function's derivatives tells us some sort of information. The one you need is the second derivative, which tells concavity of a function at a given interval. In my math class, we used "Concave Up" and "Concave Down" rather than "Convex" and "Concave" (respectively). If the second derivative is negative, the graph is concave. If the second derivative is positive, the graph is convex.

If the second derivative is 0, there is no concavity. This is actually known as the "Inflection Point," where the graph changes concavity (unless it's a fake inflection point, such as in the function ${x}^{4}$. The second derivative is $12 {x}^{2}$. The concavity never goes negative, so there's no actual inflection point).

So to answer your question, we need to take the derivative of:

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

We need two rules. The first is the power rule, which says:

$\frac{d}{\mathrm{dx}} \left({x}^{a}\right) = a {x}^{a - 1}$

The second is the product rule, which says:

$\frac{d}{\mathrm{dx}} \left(f \left(x\right) \cdot g \left(x\right)\right) = f ' \left(x\right) g \left(x\right) + f \left(x\right) g ' \left(x\right)$

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

Now, let's take the derivative again.

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

So that's what we test for concavity. First, let's solve for 0, which is actually quite simple. The function never is 0, and no matter what point you plug in, you always get a negative value.

Hence, the answer to your question is: The graph is always concave. You can actually see this graphically too.

graph{-x^2-xe^x [-75.84, 66.36, -62.3, 8.8]}

The graph never opens upwards.