Euler Hall — free maths guides

The average value of a function

Compute the average value of a function on an interval. The idea in plain words, a worked example, and a check with the answers shown — part of the free Calculus II guides.

The total divided by the width

Averaging finitely many numbers is a sum divided by a count. A function on an interval takes infinitely many values, so the sum becomes an integral and the count becomes the interval's length: favg=1b−a∫abf(x) dx.f_{\text{avg}} = \frac{1}{b-a}\int_a^b f(x)\,dx.

Why that is the right definition, in one line. Approximatingff bynn equally spaced samples, the average of the samples is1n∑f(xi)\frac{1}{n}\sum f(x_i). Sincen=b−aΔxn=\frac{b-a}{\Delta x}, that is 1b−a∑f(xi)Δx,\frac{1}{b-a}\sum f(x_i)\Delta x, and the sum is a Riemann sum. The limit is the formula above. Nothing is being invented; it is the finite average carried to the limit.

What it is not. It is not the midpoint value, and it is not the average of the endpoints. Both of those agree with the true average only for a linear function — which is the same fact as the trapezoidal rule being exact on lines, and it is worth connecting the two in your head.

A worked comparison that shows the difference. On[0,3][0,3],f(x)=x2f(x)=x^2 has average13∫03x2 dx=13⋅9=3\frac13\int_0^3x^2\,dx = \frac13\cdot9=3. The midpoint value isf(1.5)=2.25f(1.5)=2.25 and the endpoints average to0+92=4.5\frac{0+9}{2}=4.5. Both are wrong, in opposite directions, and the true average sits between them.

The units check.∫f\int f has units of (value × length), so dividing by a length gives back a value. An average temperature, an average speed and an average cost are all this formula.

Why the width divides, and not something else

The integral is a total: ifff is measured in units ofuu andxx in units ofLL, then∫f\int f is inu⋅Lu\cdot L. An average must be in units ofuu, so it needs division by exactly one power ofLL.

The width is the only length available. Dividing by(b−a)(b-a) gives the right units and, more importantly, the right behaviour: a constant function has average equal to its constant, and doubling the interval without changing the function leaves the average alone. Both are requirements no other normalisation satisfies.

The rectangle picture, which is the definition in disguise. The rectangle of widthb−ab-a and heightfavgf_{\text{avg}} has area(b−a)favg=∫abf(b-a)f_{\text{avg}}=\int_a^b f — the same as the region under the curve. So the average is the height of the rectangle that has the same area and the same width. The next skill makes that picture into a theorem.

Why the answer can lie outside the endpoint values. It cannot lie outside the function's range, but it can easily lie outside the range of the two ENDPOINTS — asx2x^2 on[0,3][0,3] shows, with average 3 above the upper endpoint... no, below it (9). It lies between the function's minimum and maximum, which is the theorem.

Worked example: an average with a nonzero lower limit

Find the average value off(x)=3x2−2xf(x)=3x^2-2x on[1,4][1,4].

Integrate. ∫14(3x2−2x)dx=[x3−x2]14=(64−16)−(1−1)=48.\int_1^4\left(3x^2-2x\right)dx = \left[x^3-x^2\right]_1^4 = (64-16)-(1-1)=48.

Divide by the width, which is 3: favg=483=16.f_{\text{avg}}=\frac{48}{3}=16.

Checks. The endpoint values aref(1)=1f(1)=1 andf(4)=40f(4)=40; the average 16 lies between them ✓, as it must since the function is increasing there. The midpoint value isf(2.5)=18.75−5=13.75f(2.5)=18.75-5=13.75, which is not the average — the function is not linear.

The commonest error here is dividing by the upper limit (4) instead of the width (3), giving 12. The units check catches it: the width is what normalises the integral.

A second route, as a sanity check. The function is3x2−2x3x^2-2x; the average ofx2x^2 on[1,4][1,4] is13⋅64−13=213=7\frac{1}{3}\cdot\frac{64-1}{3}=\frac{21}{3}=7, and the average ofxx is13⋅16−12=2.5\frac{1}{3}\cdot\frac{16-1}{2}=2.5. So the average of3x2−2x3x^2-2x is3(7)−2(2.5)=21−5=163(7)-2(2.5)=21-5=16 ✓ — linearity of the average, which is worth knowing: the average of a sum is the sum of the averages.

By the end you can
  • Compute the average value of a function on an interval
  • Explain why the integral is divided by the interval's width
  • Distinguish the average from the midpoint and endpoint values
Check yourself
  1. 1. Average ofxx on[1,5][1,5].
  2. 2. Average ofx3x^3 on[0,2][0,2].
  3. 3. Average of2x+52x+5 on[0,4][0,4], and why the midpoint check works there.
Answers

1.14∫15x dx=14⋅12=3\frac{1}{4}\int_1^5x\,dx=\frac14\cdot12=3, which is the midpoint value ✓ sincexx is linear. 2.12∫02x3 dx=12⋅4=2\frac12\int_0^2x^3\,dx=\frac12\cdot4=2. 3.14∫04(2x+5) dx=14(16+20)=9\frac14\int_0^4(2x+5)\,dx=\frac14(16+20)=9; the midpoint value isf(2)=9f(2)=9 ✓, which works because the function is linear.

Work out where to start — free, no accountAnswer six real questions — free, no account