Average Value of a Function: Formula, Meaning and Examples
Learn the average value of a function formula, why it works, how it links to the Mean Value Theorem for integrals, and worked examples step by step.
By the PracticeCalculus team Published 8 min read
Try it yourself
On this page
- What is the average value of a function?
- Where does the average value formula come from?
- The rectangle picture
- Worked example 1: a polynomial
- Worked example 2: the average value of sin x
- Worked example 3: 1/x and a logarithm
- Worked example 4: an average temperature
- Worked example 5: an average of zero
- The Mean Value Theorem for integrals
- Average value vs average rate of change
- Common mistakes with average value
- Quick reference
- Practice until the formula is automatic
Averaging five test scores is easy: add them up and divide by five. But how do you average a temperature that changes every second, or a velocity that never sits still? There are infinitely many values, so you cannot list them. The average value of a function solves exactly this problem, and it turns out to be one short formula built on the definite integral.
This guide explains what the average value means, where the formula comes from, how to find the point where the function equals its average, and walks through worked examples one step at a time.
What is the average value of a function?
The average value of a function f on an interval [a,b] is the single constant height that would produce the same total as f over that interval. If you flattened the graph into a level line without changing the area underneath, the height of that line is the average value.
The formula is:
Read it as a two-step recipe:
- Integrate f from a to b. This is the total accumulation (signed area).
- Divide by b - a, the length of the interval.
It is the continuous version of the familiar rule: total divided by how many.
Where does the average value formula come from?
Start with something you already know. Pick n equally spaced sample points x_1, x_2, \ldots, x_n in [a,b] and average the function values:
The spacing between sample points is \Delta x = \frac{b-a}{n}, which means \frac{1}{n} = \frac{\Delta x}{b-a}. Substitute that in:
The sum on the right is a Riemann sum. As you take more and more samples, n \to \infty, it becomes the definite integral:
So the average value really is an ordinary average, taken over infinitely many evenly spread sample points.
The rectangle picture
Multiply both sides of the formula by b-a:
The left side is the area of a rectangle with width b-a and height f_{\text{avg}}. The right side is the area under the curve. So the average value is the height of the rectangle that has exactly the same area as the region under the graph. The parts of the curve that poke above the rectangle balance the gaps below it.
Worked example 1: a polynomial
Find the average value of f(x) = x^2 on [0, 3].
Step 1. Identify a, b and the length. Here a = 0, b = 3, so b - a = 3.
Step 2. Integrate. Using the reverse power rule:
Step 3. Divide by the length.
The average value is 3. Notice that this is not the average of the endpoint values, which would be \frac{0 + 9}{2} = 4.5. The curve spends most of the interval low and only shoots up near the end, so its true average is smaller.
Step 4 (often asked). Find where f equals its average. Solve c^2 = 3 with c in [0,3]: c = \sqrt{3} \approx 1.732. That is the point marked on the graph above.
Worked example 2: the average value of sin x
Find the average value of f(x) = \sin x on [0, \pi], and find every c where f(c) equals that average.
Step 1. Length. b - a = \pi - 0 = \pi.
Step 2. Integrate. The antiderivative of sin x is -\cos x:
Step 3. Divide.
Step 4. Solve \sin c = \frac{2}{\pi}. One solution is c = \arcsin\left(\frac{2}{\pi}\right) \approx 0.690. Because sine is symmetric about x = \frac{\pi}{2} on this interval, the second solution is c = \pi - 0.690 \approx 2.451. Both lie in [0,\pi], so both count.
Worked example 3: 1/x and a logarithm
Find the average value of f(x) = \frac{1}{x} on [1, e].
Step 1. Length. b - a = e - 1.
Step 2. Integrate.
Step 3. Divide.
Step 4. Find c. Solve \frac{1}{c} = \frac{1}{e-1}, which gives c = e - 1 \approx 1.718. That is inside [1, e] \approx [1, 2.718], as it must be.
Worked example 4: an average temperature
On a spring day the temperature, in degrees Fahrenheit, is modeled by
where t is hours after 6 a.m. Find the average temperature from 6 a.m. to 6 p.m., that is, on [0, 12].
Step 1. Set up.
Step 2. Integrate the constant. \int_0^{12} 50\,dt = 600.
Step 3. Integrate the sine term with u-substitution. Let u = \frac{\pi t}{12}, so dt = \frac{12}{\pi}\,du, and the limits become u = 0 to u = \pi:
Step 4. Divide by 12.
The temperature peaks at 64 degrees at noon, but the daytime average is just under 59 degrees.
Worked example 5: an average of zero
A particle moves with velocity v(t) = t^2 - 4t meters per second. Find its average velocity on [0, 6].
So v_{\text{avg}} = \frac{1}{6}\cdot 0 = 0 meters per second. The particle moves backward for 0 < t < 4 (where v < 0) and forward afterward, and the two signed areas cancel. It ends exactly where it started. This is the net change theorem in action: average velocity equals displacement divided by elapsed time. Average value can be zero or negative because the integral measures signed area.
The Mean Value Theorem for integrals
In every example above, we found a point c where the function equals its average. That is not luck. The Mean Value Theorem for integrals guarantees it:
If f is continuous on [a,b], then there is at least one number c in [a,b] such that f(c) = \frac{1}{b-a}\int_a^b f(x)\,dx
The reason is short. A continuous function on a closed interval has a minimum m and a maximum M. The average must lie between them, since you cannot average numbers and get something bigger than all of them. By the Intermediate Value Theorem, f takes every value between m and M, so it takes the average value too.
Continuity matters. A step function that jumps from 0 to 2 at the midpoint of [0, 2] has average value 1, but it never equals 1 anywhere.
Average value vs average rate of change
These two sound alike and are mixed up constantly. Here is the clean distinction:
- Average value of f: \frac{1}{b-a}\int_a^b f(x)\,dx. A typical height. Uses an integral.
- Average rate of change of f: \frac{f(b) - f(a)}{b-a}. A secant slope. Uses only two points.
They connect through the Fundamental Theorem of Calculus. The average value of f' is
which is the average rate of change of f. That is why the integral version of the theorem and the derivative Mean Value Theorem are really the same idea seen from two sides.
Tip: if a question asks for an average of a rate (like average velocity) and gives you the position function, you can skip the integral and just compute \frac{s(b) - s(a)}{b-a}.
Common mistakes with average value
- Forgetting to divide. Reporting \int_a^b f(x)\,dx as the answer. The integral is the total, not the average. In example 1 that would give 9 instead of 3.
- Dividing by the wrong number. Dividing by 2, by b, or by the number of endpoints. Always divide by the length b - a.
- Averaging the endpoints. \frac{f(a) + f(b)}{2} only works for linear functions. For x^2 on [0,3] it gives 4.5, which is wrong.
- Using the average rate of change formula. \frac{f(b)-f(a)}{b-a} answers a different question about f.
- Losing the sign. Treating the integral as total geometric area when part of the graph is below the axis. Average value uses signed area.
- Keeping a c outside the interval. When solving f(c) = f_{\text{avg}}, reject solutions not in [a,b] and keep every solution that is.
Quick reference
| Function | Interval | Integral | Average value |
|---|---|---|---|
| x | [0, b] | \frac{b^2}{2} | \frac{b}{2} |
| x^2 | [0, 3] | 9 | 3 |
| \sin x | [0, \pi] | 2 | \frac{2}{\pi} |
| \sin x | [0, 2\pi] | 0 | 0 |
| \frac{1}{x} | [1, e] | 1 | \frac{1}{e-1} |
| e^x | [0, 1] | e - 1 | e - 1 |
| \lvert x \rvert | [-1, 1] | 1 | \frac{1}{2} |
| Quantity | Formula |
|---|---|
| Average value of f | \frac{1}{b-a}\int_a^b f(x)\,dx |
| Point where f equals its average | solve f(c) = f_{\text{avg}} for c in [a,b] |
| Average rate of change of f | \frac{f(b)-f(a)}{b-a} |
| Average velocity | \frac{1}{b-a}\int_a^b v(t)\,dt = \frac{s(b)-s(a)}{b-a} |
Practice until the formula is automatic
The average value formula is short, which is exactly why it is easy to drop a step under exam pressure: forgetting the \frac{1}{b-a}, averaging endpoints, or missing a second value of c. A few rounds of practice fix that for good. Work through the interactive lesson below, where every problem checks your answer instantly and shows exactly which step went wrong, so the pattern of integrate, divide, then solve for c becomes second nature.