Mean Or Average Value Of A Function

The average of finitely many numbers is their sum divided by how many there are. For a continuous function there are infinitely many values, and the sum becomes an integral: f = 1 b a a b f ( x ) d x .

FormulaNameNotes
y = 1 n k = 1 n y k Arithmetic MeanFinitely many values
f = 1 b a a b f ( x ) d x Mean Value of a FunctionAlso written f ave
a b f ( x ) d x = f ( b a ) Rectangle Form f is the height of the equal-area rectangle
a b f ( x ) d x = f ( c ) ( b a ) for some c ( a , b ) Mean Value Theorem for IntegralsRequires f continuous on [ a , b ]
m ( b a ) a b f M ( b a ) Bounding RuleThe step that makes the theorem work

Mean Value of a Function

The arithmetic mean (or arithmetic average) of n numbers y 1 , y 2 , , y n is

y = y 1 + + y n n = 1 n k = 1 n y k .

If the y k 's are the values of a function f , say

y 1 = f ( x 1 ) ,   ,   y n = f ( x n ) ,

then

y = f ( x 1 ) + + f ( x n ) n = 1 n k = 1 n f ( x k ) .

Now the question is: how can we define the mean of a continuous function y = f ( x ) on a x b , where there are infinitely many values to average?

If we divide the interval [ a , b ] into n subintervals of equal width Δ x = ( b a ) / n and choose arbitrary points x 1 , , x n in successive subintervals, then the arithmetic mean of the values f ( x 1 ) , , f ( x n ) is

\begin{aligned} \frac{f(x_{1}^{*})+\cdots+f(x_{n}^{*})}{n} &=\frac{f(x_{1}^{*})+\cdots+f(x_{n}^{*})}{\dfrac{b-a}{\Delta x}}\\ &=\frac{1}{b-a}\left[f(x_{1}^{*})\Delta x+\cdots+f(x_{n}^{*})\Delta x\right]\\ &=\frac{1}{b-a}\sum_{k=1}^{n}f(x_{k}^{*})\Delta x. \end{aligned}

The key step is replacing n by b a Δ x , which turns the plain sum into a Riemann sum. If we let n increase, we compute the mean of more and more values of f ( x ) , and the computed mean better represents the actual "mean" of the function. Because the limiting value is

lim n 1 b a k = 1 n f ( x k ) Δ x = 1 b a a b f ( x ) d x ,

we are led to the following definition.


The mean value (or the average value) of f on the interval [ a , b ] , denoted by f or f ave , is

f = 1 b a a b f ( x ) d x ,

provided that the above integral exists.


Find the mean value (or average value) of f ( x ) = x on the interval [ 1 , 4 ] .

Solution

With a = 1 and b = 4 , the mean value of f is

\begin{aligned} \overline{f} &=\frac{1}{b-a}\int_{a}^{b}f(x)\,dx\\ &=\frac{1}{4-1}\int_{1}^{4}\sqrt{x}\,dx\\ &=\frac{1}{3}\left[\frac{2}{3}x^{3/2}\right]_{1}^{4}\\ &=\frac{2}{9}\left(2^{3}-1^{3}\right)\\ &=\frac{14}{9}\approx1.5556. \end{aligned}

Sanity check: on [ 1 , 4 ] the function runs from 1 = 1 to 4 = 2 , so an average of about 1.56 is plausible. It sits slightly above the average of the two endpoint values, 1.5, which reflects the concavity of the square root: the graph lies above the chord joining its endpoints, so it spends more of the interval near its larger values.

The Averaging Variable Matters

The average value of a quantity y depends on the independent variable with respect to which it is averaged. If the same quantity is averaged with respect to some other variable, the result may be different.

If the positive direction is taken to be downward, and the position s and the velocity v of a freely falling object dropped from the origin are given by

s = 1 2 g t 2 and v = g t ,


(a) find the mean velocity during the time t 1 if the velocity is averaged with respect to the time;

(b) find the mean velocity through the distance s 1 if the velocity is averaged with respect to the distance.

Solution

(a) Since v = g t , the mean velocity equals

v = 1 t 1 0 0 t 1 g t d t = 1 t 1 g t 1 2 2 = 1 2 g t 1 .

Since the velocity at t = t 1 is g t 1 , the mean velocity is half the final velocity.

(b) It follows from s = g t 2 / 2 and v = g t that v = 2 g s . Therefore, the mean velocity equals

\begin{aligned} \overline{v} &=\frac{1}{s_{1}-0}\int_{0}^{s_{1}}\sqrt{2gs}\,ds\\ &=\frac{\sqrt{2g}}{s_{1}}\cdot\frac{2}{3}s^{3/2}\bigg|_{0}^{s_{1}}\\ &=\frac{2}{3}\sqrt{2gs_{1}}. \end{aligned}

Since the velocity is 2 g s 1 when s = s 1 , the mean velocity is two thirds of the final velocity.

The two answers differ because the object spends relatively little time covering the later, faster part of the fall but that part occupies a large share of the distance. Averaging over distance therefore weights the high speeds more heavily. Whenever you read "the average speed," it is worth asking: averaged over what?

Mean Value Theorem for Definite Integrals

Consider a region $APQB$ under the graph of f from x = a to x = b , where

a b f ( x ) d x = net area of  A P Q B .

The definition of f says that if we construct on the base A B   ( = b a ) a rectangle $ALNB$ whose net (signed) area equals the net area of $APQB$, then the height of this rectangle A L is equal to the mean of f :

f = net area of  A P Q B b a = A L × A B A B = A L .
Region under a curve and a rectangle of the same area on the same base, whose height is the mean value of the function
The mean value f is the height of the rectangle with the same base and the same net area as the region under the curve.

Let m and M be respectively the minimum and maximum values assumed by f ( x ) on the interval [ a , b ] ; in the figure below, A S = m and A H = M . It is clear that

area of  A S T B area of  A L N B area of  A H K B ,

or

A S m × A B A L × A B A H M × A B .

Cancelling the common factor A B leaves m f M . If f is continuous on [ a , b ] , it follows from the Intermediate Value Theorem that f actually attains the value f somewhere: there is at least one value c between a and b such that f ( c ) = A L = f , and therefore

a b f ( x ) d x = f ( c ) ( b a ) .
A curve trapped between horizontal lines at its minimum and maximum, with the corresponding rectangles on the same base
The equal-area rectangle has a height between the minimum and the maximum of f .

So we have the following theorem.


The Mean Value Theorem for Integrals. If f is a continuous function on [ a , b ] , then there exists a number c in the interval ( a , b ) such that

a b f ( x ) d x = f ( c ) ( b a ) .
Proof

Let

F ( x ) = a x f ( t ) d t ( a x b ) .

Then by the Fundamental Theorem of Calculus, F ( x ) is continuous on [ a , b ] and differentiable on ( a , b ) . Therefore, F satisfies the conditions of the Mean Value Theorem for derivatives, and there is a number c between a and b such that

F(b)-F(a)=F'(c)(b-a).

But F'(x)=f(x) and F ( a ) = a a f ( t ) d t = 0 . Therefore,

\underbrace{\int_{a}^{b}f(x)\,dx}_{F(b)}=\underbrace{f(c)}_{F'(c)}(b-a).

Notice that, similar to the Mean Value Theorem for derivatives, the Mean Value Theorem for Integrals does not assert where the point c is located, except that it is somewhere between a and b . In fact, except for special cases, it is often difficult to determine this point.

Consider f ( x ) = x over the interval [ 1 , 4 ] . Find all points in this interval at which the value of f is the same as the mean value of f on this interval.

Solution

In the earlier example we found the mean value of f over this interval: f = 14 9 . Now we want to find c such that

c f ( c ) = 14 9 f     c = 14 2 9 2 ,   c = 196 81 2.4198 .

Since 1 < 2.4198 < 4 , this value of c does lie in the interval, as the theorem promised. Here we could find c explicitly only because x is easy to invert.

Exercises


Find the average value of each function on the given interval:

(a) f ( x ) = x 2 on [ 0 , 3 ]

(b) f ( x ) = sin x on [ 0 , π ]

(c) f ( x ) = 1 x on [ 1 , e ]

Answer

(a) 3    (b) 2 π    (c) 1 e 1

Solution

(a) f = 1 3 0 3 x 2 d x = 1 3 27 3 = 3 .

(b) f = 1 π 0 π sin x d x = 1 π 2 = 2 π 0.6366 . This is the well-known "average of a half sine wave" that appears in electrical engineering.

(c) f = 1 e 1 1 e d x x = ln e ln 1 e 1 = 1 e 1 0.582 .


Find the average value of f ( x ) = 4 x 2 on [ 0 , 2 ] , and find the value of c guaranteed by the Mean Value Theorem for Integrals.

Answer

f = 8 3 and c = 2 3 = 2 3 3 1.155 .

Solution f = 1 2 0 2 ( 4 x 2 ) d x = 1 2 [ 4 x x 3 3 ] 0 2 = 1 2 16 3 = 8 3 .

Now solve f ( c ) = f :

4 c 2 = 8 3     c 2 = 4 3     c = ± 2 3 .

Only the positive root lies in ( 0 , 2 ) , so c = 2 3 3 1.155 .


The temperature in a city over a 12-hour period is modelled by T ( t ) = 20 + 6 sin π t 12 degrees Celsius, for 0 t 12 . Find the average temperature.

Answer

20 + 12 π 23.8 degrees Celsius.

Solution\begin{aligned} \overline{T} &= \frac{1}{12}\int_{0}^{12}\left(20+6\sin\frac{\pi t}{12}\right)dt\\ &= \frac{1}{12}\left[20t-\frac{72}{\pi}\cos\frac{\pi t}{12}\right]_{0}^{12}\\ &= \frac{1}{12}\left[\left(240+\frac{72}{\pi}\right)-\left(0-\frac{72}{\pi}\right)\right]\\ &= 20+\frac{12}{\pi}\approx23.82. \end{aligned}

The antiderivative of 6 sin π t 12 is 6 12 π cos π t 12 = 72 π cos π t 12 , by the linear substitution rule.


Show that the average value of a linear function f ( x ) = m x + k on [ a , b ] equals the value of f at the midpoint of the interval.

Answer

f = f ( a + b 2 ) .

Solution\begin{aligned} \overline{f} &= \frac{1}{b-a}\int_{a}^{b}(mx+k)\,dx = \frac{1}{b-a}\left[\frac{m x^{2}}{2}+kx\right]_{a}^{b}\\ &= \frac{1}{b-a}\left[\frac{m\left(b^{2}-a^{2}\right)}{2}+k(b-a)\right]\\ &= \frac{m(b+a)}{2}+k, \end{aligned}

using b 2 a 2 = ( b a ) ( b + a ) . And indeed

f ( a + b 2 ) = m a + b 2 + k ,

which is the same. The geometric statement is that a trapezoid has the same area as the rectangle on the same base with height equal to the mid-height, which is why the midpoint Riemann sum is exact for linear integrands.


Find the average value of f ( x ) = x 3 on [ 1 , 1 ] , and explain the result.

Answer

0 , because x 3 is odd on a symmetric interval.

Solution

By the Odd Function Rule of the previous section, 1 1 x 3 d x = 0 , so

f = 1 1 ( 1 ) 0 = 0.

The positive values on [ 0 , 1 ] are exactly balanced by the negative values on [ 1 , 0 ] . Note that c = 0 is the point guaranteed by the Mean Value Theorem, since f ( 0 ) = 0 = f .


A car's velocity is v ( t ) = 3 t 2 metres per second for 0 t 4 . Find its average velocity over that interval, and verify that it equals (total distance)/(total time).

Answer

16 m/s.

Solution v = 1 4 0 4 3 t 2 d t = 1 4 [ t 3 ] 0 4 = 64 4 = 16.

The distance travelled is 0 4 3 t 2 d t = 64 metres in 4 seconds, and 64 / 4 = 16 m/s. The two agree by construction: the definition of average value is precisely total accumulation divided by interval length.


Suppose f is continuous on [ 0 , 6 ] with f = 5 on [ 0 , 2 ] and f = 8 on [ 2 , 6 ] . Find the average value of f on [ 0 , 6 ] .

Answer

7

Solution

Convert averages back to integrals: 0 2 f = 5 × 2 = 10 and 2 6 f = 8 × 4 = 32 . By additivity, 0 6 f = 42 , so

f = 42 6 = 7.

Note that the answer is not the plain average 5 + 8 2 = 6.5 : the two subintervals have different lengths, so the overall average is a weighted average, with weights 2 6 and 4 6 . Indeed 1 3 ( 5 ) + 2 3 ( 8 ) = 7 .


Show that the Mean Value Theorem for Integrals can fail if f is not continuous, by considering

f(x)=\begin{cases}0 & 0\leq x<1\\ 1 & 1\leq x\leq2\end{cases}

on [ 0 , 2 ] .

Answer

Here f = 1 2 , but f never takes the value 1 2 .

Solution

Splitting at the jump,

0 2 f ( x ) d x = 0 1 0 d x + 1 2 1 d x = 0 + 1 = 1 ,

so f = 1 2 .

But f takes only the values 0 and 1, so there is no c in ( 0 , 2 ) with f ( c ) = 1 2 . The conclusion of the theorem fails.

The reason is that the proof relies on the Intermediate Value Theorem, which requires continuity. Without it, a function can skip over its own average value. Note that the average value itself is still perfectly well defined; it is only the existence of the point c that is lost.


Find a number b > 0 such that the average value of f ( x ) = 2 + 6 x 3 x 2 on [ 0 , b ] is equal to 3 .

Answer

b = 3 5 2 0.382 or b = 3 + 5 2 2.618 .

Solution f = 1 b 0 b ( 2 + 6 x 3 x 2 ) d x = 1 b [ 2 x + 3 x 2 x 3 ] 0 b = 2 + 3 b b 2 .

Setting this equal to 3 gives

b 2 3 b + 1 = 0     b = 3 ± 5 2 .

Both roots are positive, b 0.382 and b 2.618 , so there are two answers. (A quick check: at b = 0.382 , 2 + 3 ( 0.382 ) ( 0.382 ) 2 3.00 .)


Let f be continuous on [ a , b ] and define F ( x ) = a x f ( t ) d t . Show that the average value of f on [ a , b ] equals the average rate of change of F on [ a , b ] , and explain how this makes the Mean Value Theorem for Integrals a restatement of the Mean Value Theorem for derivatives.

Answer

Both equal F ( b ) F ( a ) b a .

Solution

By the Fundamental Theorem, F ( b ) F ( a ) = a b f ( t ) d t . Dividing by b a ,

F ( b ) F ( a ) b a = 1 b a a b f ( t ) d t = f .

The left side is by definition the average rate of change of F over [ a , b ] .

Now the Mean Value Theorem for derivatives, applied to F , says there is a c in ( a , b ) with

F'(c)=\frac{F(b)-F(a)}{b-a}.

Since F'(c)=f(c) and the right-hand side is f , this reads f ( c ) = f , which is exactly the Mean Value Theorem for Integrals. The two theorems are the same statement seen through the Fundamental Theorem: "the average of the rate" and "the rate at some instant" are connected in precisely the same way whether we phrase it in terms of F or of f .