Average Value of a Function

The average value of a function f on an interval [a, b] is the height of the rectangle that has the same area as the region under f. To find it, integrate f over the interval and divide by the interval’s length: f_{\text{avg}} = \dfrac{1}{b - a}\int_a^b f(x)\,dx.

Before this lesson: Fundamental Theorem of Calculus, Part 2, Definite Integrals and Mean Value Theorem

What average value means

To average a list of numbers, you add them and divide by how many there are. A function on an interval has infinitely many values, so you can’t list them all. Instead, the integral adds up the values, and the length b − a plays the role of “how many.”

Here is a picture of the idea. Flatten the region under the curve into a rectangle with the same base. The rectangle’s height is the average value, because height times width must equal the area.

Graph of y = x squared from x = 0 to 3 with the area under it shaded. A dashed rectangle from x = 0 to 3 with height 3 has the same area, 9. The curve reaches height 3 at x = c, about 1.73.
The area under y = x² from 0 to 3 is 9. A rectangle with base 3 and the same area has height 3, so the average value is 3.

The curve is below the average on part of the interval and above it on the rest. Because f is continuous, it must cross the average somewhere in between. That crossing point is the c in the theorem below.

Average value of a function formula

If f is continuous on [a, b], its average value on [a, b] is:

f_{\text{avg}} = \dfrac{1}{b - a}\int_a^b f(x)\,dx

Mean value theorem for integrals: if f is continuous on [a, b], there is at least one number c in [a, b] with f(c) = f_{\text{avg}}. In other words, the function actually reaches its average value somewhere on the interval.

How to find the average value:

  1. Find the length of the interval, b − a.
  2. Evaluate the definite integral of f from a to b.
  3. Divide the integral by b − a.
  4. If the problem asks for c, set f(c) equal to the average and solve. Keep only answers inside [a, b].

Average value examples

Example 1: A parabola

Find the average value of f(x) = x^2 on [0, 3].

f_{\text{avg}} = \dfrac{1}{3 - 0}\int_0^3 x^2\,dx

Use the formula with a = 0 and b = 3.

\int_0^3 x^2\,dx = \Big[\dfrac{x^3}{3}\Big]_0^3

Find an antiderivative (see fundamental theorem of calculus, part 2).

= \dfrac{27}{3} - 0 = 9

Plug in the limits and subtract.

f_{\text{avg}} = \dfrac{1}{3}(9) = 3

Divide the integral by the length 3.

Answer: the average value is 3. This is the rectangle height in the graph above.

Example 2: Finding c

Find the average value of f(x) = 3x^2 - 2x on [0, 2]. Then find every c in [0, 2] with f(c) equal to the average.

\int_0^2 (3x^2 - 2x)\,dx = \Big[x^3 - x^2\Big]_0^2

Antidifferentiate each term.

= (8 - 4) - 0 = 4

Plug in the limits and subtract.

f_{\text{avg}} = \dfrac{4}{2 - 0} = 2

Divide by the length 2.

3c^2 - 2c = 2

Set f(c) equal to the average.

3c^2 - 2c - 2 = 0

Subtract 2 from both sides.

c = \dfrac{2 \pm \sqrt{(-2)^2 - 4(3)(-2)}}{2(3)}

Use the quadratic formula with a = 3, b = −2, c = −2.

c = \dfrac{2 \pm \sqrt{28}}{6}

Simplify under the root: 4 + 24 = 28.

c = \dfrac{2 \pm 2\sqrt{7}}{6} = \dfrac{1 \pm \sqrt{7}}{3}

Write √28 as 2√7 (see simplifying square roots), then divide each term by 2.

c = \dfrac{1 + \sqrt{7}}{3} \approx 1.22

Keep the + root; the − root, about −0.55, is outside [0, 2].

Answer: the average value is 2, reached at c = \dfrac{1 + \sqrt{7}}{3} \approx 1.22.

Example 3: Sine over one hump

Find the average value of f(x) = \sin x on [0, π].

\int_0^{\pi} \sin x\,dx = \Big[-\cos x\Big]_0^{\pi}

An antiderivative of sin x is −cos x.

= -\cos\pi - (-\cos 0)

Plug in the limits and subtract.

= 1 + 1 = 2

cos π = −1 and cos 0 = 1 (see unit circle).

f_{\text{avg}} = \dfrac{2}{\pi - 0} = \dfrac{2}{\pi}

Divide by the length π.

\dfrac{2}{\pi} \approx 0.637

Use π ≈ 3.14159.

Answer: \dfrac{2}{\pi}, about 0.637. The sine curve peaks at 1, but on average it is a little under two-thirds of that height.

Example 4: A reciprocal power

Find the average value of f(x) = \dfrac{6}{x^2} on [1, 3], and find c.

\int_1^3 6x^{-2}\,dx = \Big[-\dfrac{6}{x}\Big]_1^3

Write 6/x² as 6x⁻²; the power rule gives −6x⁻¹.

= -\dfrac{6}{3} - \left(-\dfrac{6}{1}\right)

Plug in the limits and subtract.

= -2 + 6 = 4

Simplify.

f_{\text{avg}} = \dfrac{4}{3 - 1} = 2

Divide by the length 2.

\dfrac{6}{c^2} = 2

Set f(c) equal to the average.

6 = 2c^2

Multiply both sides by c².

c^2 = 3

Divide both sides by 2.

c = \sqrt{3} \approx 1.73

Take the positive square root, since c must be in [1, 3].

Answer: the average value is 2, at c = \sqrt{3}.

Example 5: Average temperature

The temperature in a town is T(t) = 50 + 6t - 0.5t^2 degrees Fahrenheit, where t is hours after 6 a.m. Find the average temperature from 6 a.m. to 6 p.m. Then find when the temperature equals that average.

\int_0^{12} (50 + 6t - 0.5t^2)\,dt = \Big[50t + 3t^2 - \dfrac{t^3}{6}\Big]_0^{12}

6 a.m. to 6 p.m. is t = 0 to t = 12; antidifferentiate each term.

= 50(12) + 3(144) - \dfrac{1728}{6}

Plug in 12; every term is 0 at t = 0.

= 600 + 432 - 288 = 744

Multiply, divide and combine.

T_{\text{avg}} = \dfrac{744}{12} = 62

Divide by the length 12.

50 + 6t - 0.5t^2 = 62

Set T(t) equal to the average.

-0.5t^2 + 6t - 12 = 0

Subtract 62 from both sides.

t^2 - 12t + 24 = 0

Multiply both sides by −2.

t = \dfrac{12 \pm \sqrt{144 - 96}}{2}

Quadratic formula.

t = 6 \pm 2\sqrt{3}

√48 = 4√3; divide each term by 2.

t \approx 2.54 \text{ or } t \approx 9.46

Both are inside [0, 12].

Answer: the average temperature is 62°F. The temperature equals 62°F about 2.54 hours after 6 a.m. (about 8:32 a.m.) and about 9.46 hours after 6 a.m. (about 3:28 p.m.).

Common mistakes

MistakeExample of the errorFix
Forgetting to divide by the lengthAverage of x² on [0, 3] given as 9Divide the integral by b − a: \dfrac{9}{3} = 3.
Dividing by b instead of b − aOn [1, 3]: \dfrac{4}{3}The length is 3 − 1 = 2, so the average is \dfrac{4}{2} = 2.
Averaging only the endpointsFor x² on [0, 3]: \dfrac{f(0) + f(3)}{2} = 4.5That only works for straight lines. Use the integral: the average is 3.
Mixing up average value and average rate of changeAverage value of x² on [0, 3] as \dfrac{f(3) - f(0)}{3} = 3Average rate of change uses f(b) − f(a). Average value integrates f. Here both happen to be 3, but usually they differ.
Keeping a c outside the intervalc = \dfrac{1 - \sqrt{7}}{3} for [0, 2]The theorem only promises a c in [a, b]. Check each answer.

Related methods

Average value vs. average rate of change

The average rate of change of F on [a, b] is \dfrac{F(b) - F(a)}{b - a}. By the fundamental theorem, this equals the average value of F′ on [a, b]. So the average of a rate is the average rate of change of the amount.

Average velocity

If v(t) is velocity, the average value of v on [a, b] is the displacement divided by the time. This links average value to position, velocity and acceleration.

Average from a graph

When the graph makes simple shapes, find the integral with geometry (see properties of definite integrals), then divide by the length. Area below the axis counts as negative, so an average value can be negative.

Practice problems

  1. Find the average value of f(x) = 4x on [0, 5].
  2. Find the average value of f(x) = x^2 + 1 on [0, 3].
  3. Find the average value of f(x) = x^3 on [0, 2].
  4. Find the average value of f(x) = \sqrt{x} on [0, 9].
  5. Find the average value of f(x) = \cos x on \left[0, \dfrac{\pi}{2}\right].
  6. Find the average value of f(x) = e^x on [0, 2].
  7. Find the average value of f(x) = \dfrac{1}{x} on [1, 4].
  8. Find the average value of f(x) = 6 - 2x on [0, 4].
  9. For f(x) = x^2 on [0, 6], find the average value and the number c with f(c) equal to it.
  10. Water flows into a tank at r(t) = 20 + 4t gallons per minute. Find the average flow rate from t = 0 to t = 10 minutes.
Show answers

1.

\int_0^5 4x\,dx = \Big[2x^2\Big]_0^5

Antidifferentiate.

= 2(25) - 0 = 50

Plug in the limits and subtract.

f_{\text{avg}} = \dfrac{50}{5} = 10

Divide by the length 5.

Answer: 10

2.

\int_0^3 (x^2 + 1)\,dx = \Big[\dfrac{x^3}{3} + x\Big]_0^3

Antidifferentiate each term.

= (9 + 3) - 0 = 12

Plug in the limits and subtract.

f_{\text{avg}} = \dfrac{12}{3} = 4

Divide by the length 3.

Answer: 4

3.

\int_0^2 x^3\,dx = \Big[\dfrac{x^4}{4}\Big]_0^2

Power rule.

= \dfrac{16}{4} - 0 = 4

Plug in the limits and subtract.

f_{\text{avg}} = \dfrac{4}{2} = 2

Divide by the length 2.

Answer: 2

4.

\int_0^9 x^{1/2}\,dx = \Big[\dfrac{2}{3}x^{3/2}\Big]_0^9

Write √x as x^(1/2) and use the power rule.

= \dfrac{2}{3}(27) - 0 = 18

9 to the 3/2 is 3³ = 27.

f_{\text{avg}} = \dfrac{18}{9} = 2

Divide by the length 9.

Answer: 2

5.

\int_0^{\pi/2} \cos x\,dx = \Big[\sin x\Big]_0^{\pi/2}

An antiderivative of cos x is sin x.

= 1 - 0 = 1

sin(π/2) = 1 and sin 0 = 0.

f_{\text{avg}} = \dfrac{1}{\pi/2} = \dfrac{2}{\pi}

Divide by the length π/2.

Answer: \dfrac{2}{\pi} \approx 0.637

6.

\int_0^2 e^x\,dx = \Big[e^x\Big]_0^2

e to the x is its own antiderivative.

= e^2 - 1

Plug in the limits; e⁰ = 1.

f_{\text{avg}} = \dfrac{e^2 - 1}{2}

Divide by the length 2.

\dfrac{e^2 - 1}{2} \approx 3.195

Use e² ≈ 7.389.

Answer: \dfrac{e^2 - 1}{2} \approx 3.195

7.

\int_1^4 \dfrac{1}{x}\,dx = \Big[\ln x\Big]_1^4

An antiderivative of 1/x is ln x for positive x.

= \ln 4 - \ln 1 = \ln 4

ln 1 = 0.

f_{\text{avg}} = \dfrac{\ln 4}{3}

Divide by the length 3.

\dfrac{\ln 4}{3} \approx 0.462

Use ln 4 ≈ 1.386.

Answer: \dfrac{\ln 4}{3} \approx 0.462

8.

\int_0^4 (6 - 2x)\,dx = \Big[6x - x^2\Big]_0^4

Antidifferentiate each term.

= (24 - 16) - 0 = 8

Plug in the limits and subtract.

f_{\text{avg}} = \dfrac{8}{4} = 2

Divide by the length 4.

Answer: 2. The line is below the axis after x = 3, and that part counts as negative.

9.

\int_0^6 x^2\,dx = \Big[\dfrac{x^3}{3}\Big]_0^6 = \dfrac{216}{3} = 72

Power rule; plug in the limits.

f_{\text{avg}} = \dfrac{72}{6} = 12

Divide by the length 6.

c^2 = 12

Set f(c) equal to the average.

c = \sqrt{12} = 2\sqrt{3} \approx 3.46

Take the positive root, since c is in [0, 6].

Answer: average value 12 at c = 2\sqrt{3}

10.

\int_0^{10} (20 + 4t)\,dt = \Big[20t + 2t^2\Big]_0^{10}

Antidifferentiate each term.

= 200 + 200 - 0 = 400

Plug in the limits and subtract.

r_{\text{avg}} = \dfrac{400}{10} = 40

Divide by the length 10.

Answer: 40 gallons per minute. In 10 minutes, 400 gallons flow in.

Average value of a function FAQ

What is the formula for the average value of a function?

The average value of f on [a, b] is \dfrac{1}{b - a}\int_a^b f(x)\,dx. Integrate the function, then divide by the length of the interval.

What is the mean value theorem for integrals?

If f is continuous on [a, b], then f equals its average value at least once on the interval. There is a c in [a, b] with f(c) = \dfrac{1}{b - a}\int_a^b f(x)\,dx.

What is the difference between average value and average rate of change?

Average value is the average height of f, found with an integral. Average rate of change is the slope between two points, \dfrac{f(b) - f(a)}{b - a}.

Can the average value of a function be negative?

Yes. If more of the area is below the x-axis than above it, the integral is negative, so the average value is negative too.

Summary

  • Average value: f_{\text{avg}} = \dfrac{1}{b - a}\int_a^b f(x)\,dx.
  • It is the height of a rectangle with the same base and the same area as the region under f.
  • Divide by the length b − a, not by b.
  • The mean value theorem for integrals says f(c) equals the average for some c in [a, b].
  • To find c, set f(c) equal to the average, solve, and keep answers inside the interval.
  • The average value of a rate is the average rate of change of the amount.

Previous lesson: Fundamental Theorem of Calculus, Part 2

Next lesson: Displacement and Total Distance

Back to the Calculus 1 Index