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

1 Answer
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^4x4. The second derivative is 12x^212x2. 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(x)=-x^2-xe^xf(x)=x2xex

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

d/dx(x^a)=ax^(a-1)ddx(xa)=axa1

The second is the product rule, which says:

d/dx(f(x)*g(x))=f'(x)g(x)+f(x)g'(x)

So we'll return to that function, and take the derivative.

f'(x)=-2x-(e^x+xe^x)
f'(x)=-2x-e^x-xe^x

Now, let's take the derivative again.

f''(x)=-2-e^x-(e^x+xe^x)
f''(x)=-2-2e^x-xe^x
f''(x)=-2-e^x(2+x)

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.