We can help you get into your dream school.

Start Magoosh SAT or Magoosh ACT Prep today!

Shaun Ault

AP Calculus Review: Average Value of Functions

The average of a set of data is typically defined as the sum of the values divided by the number of data points. But what if you have infinitely many data points? What is the average value of a function? Read on to find out!

Graph of a wavy function - finding the average value

Defining the average value of a continuous function is not as easy as finding the average of a finite set of data.

Average Value of Functions

Suppose f is a continuous function defined over an interval [a, b]. In particular f(x) exists at every one of the infinitely-many points x between and including a and b. So, if you’re looking for the average value of f on that interval, it won’t do any good to try adding up those infinitely-many data points.

Instead, the way to tame the infinity is to use calculus. Specifically, we define the average value of a function f as the following definite integral.

average value formula

The Theory Behind the Formula

But where does the integral formula for average come from?

The key is sampling. If you included enough of the function values, say a thousand, a million, or even more, then that should approximate the average of all infinitely-many points!

Let’s illustrate with the following example.

Estimate the average value of the function f(x) = √(x) + 1 over the interval [1, 3].

Since we’re just estimating, let’s pick four sample points. (The more sample points you pick, the better your estimated average will be.)

Divide the interval [1, 3] into four equal subintervals, and let’s agree to choose the midpoint of each subinterval. Then plug those midpoints into f to find the sample values.

MidpointsHeight: f(x) = √(x) + 1
1.25√(1.25) + 1 = 2.12
1.75√(1.75) + 1 = 2.32
2.25√(2.25) + 1 = 2.50
2.75√(2.75) + 1 = 2.66

Finally, use the familiar old averaging formula. Add up the data and divide by the number of data points:

(2.12 + 2.32 + 2.50 + 2.66)/4 = 2.4

So the (approximate) average of the function is 2.4.

Taking it to the Limit

However, what we’ve just done will not give us an exact answer because we’ve essentially ignored most of the function! What about f(1.3) or f(2.95234)? No matter how many sample points we include, there will always be some missing… Unless we can use the magic of calculus to catch them all.

The sampling process should remind you of a Riemann Sum. For a quick reminder, feel free to check out AP Calculus Review: Riemann Sums.

Illustration of midpoint rule

Midpoint Riemann sum. In the limit as the number of sample points goes to ∞, the Riemann sum becomes a definite integral.

Let n be any whole number and xk* stand for the various sample x-values. Then the estimated average is the sum:

Estimated average value

Next, allow n → ∞ using a limit. We also need to get Δx into the act somehow. The trick is to multiply and divide by (ba). Remember, Δx = (ba)/n.

Derivation of the f_ave formula


Ok, now that you’ve seen the theory, let’s use the formula in practice!

Problem 1

Find the exact average value of f(x) = √(x) + 1 over the interval [1, 3].


Above, we only estimated the average to be 2.4. Now we’ll use the integral formula to determine the average value precisely.

average value example 1

(It’s interesting to compare our estimate with the exact value above. √(3) + 2/3 ≈ 2.39871747, which means that our estimate of 2.4 was actually pretty good!)

Problem 2

The amount of energy associated with a certain chemical reaction is given by E = x ln x, where 1 ≤ xe, and x represents the amount of one of the reactants. Find the average energy of the reaction over the range of possible levels of reactant.


This problem seems more like chemistry than math!

Chemical reaction

Chemistry can be fun too! But what does this have to do with calculus??

However, the keyword average tells us that mathematics plays a major role in this problem. In fact, they are simply asking for the average value of f(x) = x ln x, over the interval [1, e].

First set up the integral formula with a = 1 and b = e. Then work out the integration, which involves Integration By Parts in this case.

Average value example 2, with solution

Thus the average energy of the reaction is (e2 + 1)/[ 4(e – 1) ], or roughly 1.22.

Mean Value Theorem for Integrals

Averages are also called means. So you may use the same formula to find the mean value of a function.

There is also an important result in calculus that relates the mean value to a particular function value on the given interval.

The Mean Value Theorem for Integrals (MVTI). If f is continuous on a closed interval [a, b], then there is at least one point x = c in that interval such that the mean value of the function is equal to f(c). That is,

The Mean Value Theorem for Integrals

(Caution: There is also a Mean Value Theorem for Derivatives. It’s important not to confuse the two.)

Problem 3

Let f(x) = 6x2 – 8x + 1. Determine the value of c at which the mean value of f on [-1, 1] is the same as f(c).


According to the Mean Value Theorem for Integrals, there must be at least one such value c. Let’s set up the formula and find it!

MVTI example, part A

At this point, we will need to solve a quadratic equation. Don’t forget your Quadratic Formula!

6c2 – 8c – 2 = 0

c = (2 ± √(7))/3

It seems as though there may be two answers. However, only one lies within the given interval [-1, 1].

c = (2 + √(7))/3 ≈ 1.549, not in the interval.

c = (2 – √(7))/3 ≈ -0.215, in the interval.

Therefore, the only value that satisfies the MVTI is c = (2 – √(7))/3.


Although average value and the Mean Value Theorem for Integrals are specialized topics and only show up in a few problems on any given AP Calculus test, they are important concepts to master. For one thing, they illustrate how integral calculus can be used in applications.

Moreover, working out the average value of a function is no more difficult than computing a definite integral. So now when you see these kinds of problems on the AP Calculus Exam, you can rise to the challenge!

Improve your SAT or ACT score, guaranteed. Start your 1 Week Free Trial of Magoosh SAT Prep or your 1 Week Free Trial of Magoosh ACT Prep today!

magoosh logo checks

About Shaun Ault

Shaun earned his Ph. D. in mathematics from The Ohio State University in 2008 (Go Bucks!!). He received his BA in Mathematics with a minor in computer science from Oberlin College in 2002. In addition, Shaun earned a B. Mus. from the Oberlin Conservatory in the same year, with a major in music composition. Shaun still loves music -- almost as much as math! -- and he (thinks he) can play piano, guitar, and bass. Shaun has taught and tutored students in mathematics for about a decade, and hopes his experience can help you to succeed!

Leave a Reply

Magoosh blog comment policy: To create the best experience for our readers, we will approve and respond to comments that are relevant to the article, general enough to be helpful to other students, concise, and well-written! :) If your comment was not approved, it likely did not adhere to these guidelines. If you are a Premium Magoosh student and would like more personalized service, you can use the Help tab on the Magoosh dashboard. Thanks!