Skip to content
Tutorials Center
My learning

Topics

Lesson 30 of 39 · Applications of Integration

Average Value of a Function

Compute the average value of a continuous function over an interval with an integral, and learn the mean value theorem for integrals with examples.

What is the average temperature over a day? The average speed over a trip? You already know how to average a list of numbers: add them up and divide by how many there are. But temperature and speed are continuous: there are infinitely many values. Integrals let us average a continuous function.

From a list to a function

Sample a function f at n equally spaced points x₁, x₂, ..., xₙ in [a, b]. The average of the sampled values is

Text
(f(x₁) + f(x₂) + ... + f(xₙ)) / n

The spacing is Δx = (b - a)/n, so 1/n = Δx / (b - a). Then the average equals

Text
(1 / (b - a)) · Σ f(xᵢ) Δx

As n → ∞, the sum becomes a definite integral. This gives the average value of f on [a, b]:

Text
f_avg = (1 / (b - a)) · ∫ from a to b of f(x) dx

In words: total area under the curve, divided by the width of the interval. It is the height of a rectangle with the same base and the same area as the region under the curve.

Example 1: a quadratic

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

Text
f_avg = (1/3) ∫ from 0 to 3 of x² dx = (1/3) · [x³/3] from 0 to 3 = (1/3) · 9 = 3

The average value is 3, although f ranges from 0 to 9.

Example 2: a day's temperature

Suppose the temperature in degrees Celsius during a day is modeled by T(t) = 15 + 8 sin(π (t - 9) / 12) for t hours after midnight, 0 ≤ t ≤ 24. This is a model, not measured data. Its average over 24 hours is

Text
T_avg = (1/24) ∫ from 0 to 24 of [15 + 8 sin(π(t - 9)/12)] dt

The sine term runs through one full period (a full cycle takes 24 hours since the period is 2π / (π/12) = 24), so its integral over a full period is 0. That leaves T_avg = 15 °C. Without calculus you could guess this: the sine wave is balanced around 15.

Python Average value: integral versus sampling

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The mean value theorem for integrals

If f is continuous on [a, b], there is at least one number c in [a, b] where the function takes its average value:

Text
f(c) = f_avg = (1/(b - a)) ∫ from a to b of f(x) dx

The idea is simple. A continuous function cannot stay above its average everywhere, or below it everywhere; it must hit the average at some point. In Example 1, f(c) = c² = 3, so c = √3 ≈ 1.732, which lies inside [0, 3].

Python Find the point where f equals its average

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Average value versus average rate of change

These two ideas sound similar, but they answer different questions.

Idea Formula Meaning
Average value of f (1/(b - a)) ∫ f dx typical height of the graph of f
Average rate of change of f (f(b) - f(a))/(b - a) slope of the secant line

For velocity v(t), the average value of v over [a, b] is the average velocity. Because ∫ v dt is displacement, the average velocity is displacement divided by time. This matches the FTC: the average value of a derivative F' is (F(b) - F(a))/(b - a), the average rate of change of F.

For a symmetric oscillation such as a sine wave over whole periods, the average is the center line. This is why alternating current (which varies like a sine) needs the root-mean-square value to describe its heating power, because the plain average is zero.

Check your understanding

Quick check · 4 questions

of 4 answered You scored / 4 · perfect!

  1. 1. The average value of f on [a, b] is

    Divide the total area under the curve by the width of the interval.
  2. 2. What is the average value of f(x) = 2x on [0, 4]?

    ∫ from 0 to 4 of 2x dx = 16, and 16/4 = 4.
  3. 3. The mean value theorem for integrals says that a continuous function

    A continuous function cannot be above its average everywhere or below it everywhere, so it equals it somewhere.
  4. 4. The average value of sin x over one full period [0, 2π] is

    The integral of sin x over [0, 2π] is 0 because the positive and negative humps cancel.

Summary

  • Average value: f_avg = (1/(b - a)) ∫ from a to b of f(x) dx, the height of a rectangle with equal area.
  • The mean value theorem for integrals guarantees some c with f(c) = f_avg for continuous f.
  • Average value (a typical height) differs from average rate of change (a slope).
  • The average velocity equals displacement divided by elapsed time.

Next: Numerical Integration