When Is A Function Concave Or Convex? (4 Key Ideas)


Knowing the concavity of a function helps us to get an idea of its shape and behavior.  We can tell concavity by looking at the graph of a function or by looking at the sign of its second derivative.

So, when is a function concave or convex?  A function f is concave if the 2nd derivative f’’ is negative (f’’ < 0). Graphically, a concave function opens downward, and water poured onto the curve would roll off. A function f is convex if f’’ is positive (f’’ > 0). A convex function opens upward, and water poured onto the curve would fill it.

Of course, there is some interchangeable terminology at work here.  “Concave” is a synonym for “concave down” (a negative second derivative), while “convex” is a synonym for “concave up” (a positive second derivative).

In this article, we’ll talk about concave and convex functions, when they occur, and what they look like.  We’ll also go through some examples to make the concepts clear.

Let’s begin.

When Is A Function Concave Or Convex?

We can use the second derivative of a function f(x) to tell when it is concave or convex as follows:

  • If the second derivative of the function is negative, then the function is concave (also called concave down).  In symbols, this would mean f’’(x) < 0.
  • If the second derivative of the function is positive, then the function is convex (also called concave up).  In symbols, this would mean f’’(x) > 0.

One important note: it is also possible for the second derivative of a function to equal zero – that is, f’’(x) = 0.  If that happens, then we may have an inflection point.

At an inflection point of the function f(x), the sign of the second derivative f’’(x) changes from negative to positive (or from positive to negative).  This means that the function f(x) changes from concave to convex (or convex to concave) at that point.

We can tell when the second derivative of f’’(x) is positive, negative, or zero in several ways:

  • by examining the graph of f’’(x)
  • by  plugging in values of x into f’’(x)
  • by using a table of values

We will go into more detail on these methods (along with some examples) soon.

The concavity of f(x) also tells us about the behavior of the first derivative f’(x) as follows:

  • For a convex function, we have f’’(x) < 0.  This means that f’(x) is decreasing.
  • For a concave function, we have f’’(x) > 0.  This means that f’(x) is increasing.
ConcavityConcave
(concave
down)
Convex
(concave
up)
Shape
of f(x)
arch
(opens
up)
cup
(opens
down)
Behavior
of f'(x)
decreasing
(f getting
less steep)
increasing
(f getting
more steep)
Sign
of f”(x)
negativepositive
This table shows how f(x), f'(x), and f”(x)
behave for concave and convex functions.

Finally, the concavity of f(x) tells us a bit about the shape of the graph:

  • For a convex function, the graph opens downward.  It has a shape such that if you pour water over it, the water will run off (like rain falling on an arched roof).
  • For a concave function, the graph opens upward.  It has a shape such that if you pour water over it, the water will collect at the bottom of the shape (like rain collecting in a hole in the ground).

When Is A Function Concave? (Examples Of Concave Down Functions)

A function f(x) is concave (concave down) when the second derivative is negative (that is, f’’(x) < 0).  Here are some examples of concave functions and their graphs.

Example 1: Concave Function f(x) = -x2

The function f(x) = -x2 is concave, since the second derivative is always negative.  We can prove this by taking derivatives:

  • f’(x) = -2x
  • f’’(x) = -2

Since the second derivative f’’(x) always has a negative value, the function will be concave (concave down) at all points.

The graph of f(x) = -x2 is shown below.

graph of f(x) = -x2
The graph of f(x) = -x2.

Example 2: Concave Function f(x) = -x4 – 6x2 + 5x – 3

The function f(x) = -x4 – 6x2 + 5x – 3 is concave, since the second derivative is always negative.  We can prove this by taking derivatives:

  • f’(x) = -4x3 – 12x + 5
  • f’’(x) = -12x2 – 12

We can factor f’’(x) as -12(x2 + 1).  The minimum value of x2 + 1 is 1 (at x = 0), so the maximum value of f’’(x) is -12.

Since the second derivative f’’(x) always has a negative value, the function will be concave (concave down) at all points.

The graph of f(x) = -x4 – 6x2 + 5x – 3 is shown below.

graph of -x4 - 6x2 + 5x - 3
The graph of f(x) = -x4 – 6x2 + 5x – 3.

Example 3: Concave Function f(x) = ex

The function f(x) = -ex is concave, since the second derivative is always negative.  We can prove this by taking derivatives:

  • f’(x) = -ex
  • f’’(x) = -ex

For any real value of x, ex is positive, so –ex is negative.

Since the second derivative f’’(x) always has a negative value, the function will be concave (concave down) at all points.

The graph of f(x) = -ex is shown below.

graph of f(x) = -ex
The graph of f(x) = -ex.

When Is  A Function Convex? (Examples Of Concave Up Functions)

A function f(x) is convex (concave up) when the second derivative is positive (that is, f’’(x) > 0).  Here are some examples of convex functions and their graphs.

Example 1: Convex Function f(x) = x2

The function f(x) = x2 is convex, since the second derivative is always positive.  We can prove this by taking derivatives:

  • f’(x) = 2x
  • f’’(x) = 2

Since the second derivative f’’(x) always has a positive value, the function will be convex (concave up) at all points.

The graph of f(x) = x2 is shown below.

graph of f(x) = x2
The graph of f(x) = x2.

Example 2: Convex Function f(x) = x6 + 15x2 – 10

The function f(x) = x6 + 15x2 – 10 is convex, since the second derivative is always positive.  We can prove this by taking derivatives:

  • f’(x) = 6x5 + 30x
  • f’’(x) = 30x4 + 30

We can factor f’’(x) as 30(x4 + 1).  The minimum value of x4 + 1 is 1 (at x = 0), so the minimum value of f’’(x) is 30.

Since the second derivative f’’(x) always has a positive value, the function will be convex (concave up) at all points.

The graph of f(x) = x6 + 15x2 – 10 is shown below.

graph of f(x) = x6 + 15x2 - 10
The graph of f(x) = x6 + 15x2 – 10.

Example 3: Convex Function f(x) = ex

The function f(x) = ex is convex, since the second derivative is always positive.  We can prove this by taking derivatives:

  • f’(x) = ex
  • f’’(x) = ex

For any real value of x, ex is positive.

Since the second derivative f’’(x) always has a positive value, the function will be convex (concave up) at all points.

The graph of f(x) = ex is shown below.

graph of f(x) = ex
The graph of f(x) = ex.

When Does A Function Change Concavity? (Inflection Points)

A function f(x) changes concavity at x = c if:

  • f’’(c) = 0
  • f’’(x) changes signs at x = c

Here are some examples of functions that change concavity.

Example 1: A Function f(x) = x3 That Changes Concavity At The Inflection Point x = 0

The function f(x) = x3 changes concavity at x = 0.  We can prove this by taking derivatives and checking the signs:

  • f’(x) = 3x2
  • f’’(x) = 6x

First, f’’(0) = 6(0) = 0, so the first condition for a concavity change is satisfied.

For the second condition:

  • f’’(x) < 0 for x < 0, since a positive times a negative is negative (6 is positive, and x is negative).
  • f’’(x) > 0 for x > 0, since a positive times a positive is positive (6 is positive, and x is positive).

Since the second derivative f’’(x) changes from negative to positive at x = 0, we have an inflection point there.  In this case, the function changes from concave (for x < 0) to convex (for x > 0).

The graph of f(x) = x3 is shown below.

graph of f(x) = x3
The graph of f(x) = x3.

Example 2: A Function f(x) = x3 That Changes Concavity At The Inflection Point x = 2

The function f(x) = -x3 + 6x2 – 12x – 8 changes concavity at x = 2.  We can prove this by taking derivatives and checking the signs:

  • f’(x) = -3x2 + 12x – 12
  • f’’(x) = -6x + 12

First, f’’(2) = -6(2) = 12 = -12 + 12 = 0, so the first condition for a concavity change is satisfied.

For the second condition, we can factor f’’(x) as -6(x – 2) to see that:

  • f’’(x) > 0 for x < 2, since a negative times a negative is positive (-6 is negative, and x – 2 is negative).
  • f’’(x) < 0 for x > 0, since a negative times a positive is negative (-6 is negative, and x – 2 is positive).

Since the second derivative f’’(x) changes from positive to negative at x = 0, we have an inflection point there.  In this case, the function changes from convex (for x < 0) to concave (for x > 0).

The graph of f(x) = -x3 + 6x2 – 12x – 8 is shown below.

graph of f(x) = -x3 +6x2 - 12x - 8
The graph of f(x) = -x3 + 6x2 – 12x – 8.

Conclusion

Now you know when a function is concave or convex.  You also have an idea of what their graphs look like and how to tell when you are in either case.

You can learn about when a function is onto (maps onto the entire codomain) in my article here.

I hope you found this article helpful.  If so, please share it with someone who can use the information.

Don’t forget to subscribe to my YouTube channel & get updates on new math videos!

~Jonathon

Recent Posts