Skip to main content

Section 7.6 Average Value of a Function

The weighted average technique discussed in (7.1.2) are a fine for averaging several discrete values, but what do we do if we need to find the average of an infinite number of values or values which change continuously?

Consider a function \(y=f(x)\) over some interval from \(a\) to \(b\text{.}\) How can we find the average value \(\bar{y}\) of the function over that interval? To understand what is meant by the average value of a function, look at the interactive below. There, the function \(f(x)\) is the red curve, and which you can change if you like. The blue dots \(a\) and \(b\) mark the beginning and end of the interval and are also adjustable.

The area under this curve between \(a\) and \(b\) is shaded with gray, and we can find it using a definite integral

\begin{equation*} \int_a^b f(x)\ dx \end{equation*}

The blue hatched rectangle has the same area as the gray shaded region, and because the areas are the same, the height of the rectangle \(\bar{y}\text{,}\) is the average value of \(f(x)\text{.}\)

Figure 7.6.1. The average value of a function between \(a\) and \(b\text{.}\)

With this in mind, we can calculate the average value of \(f(x)\) by equating the area under the curve with the area of the rectangle and solving for \(\bar{y}\text{.}\)

\begin{align*} \int_a^b \amp f(x)\ dx = \bar{y} (b-a)\\ \bar{y} \amp = \dfrac{\int_a^b f(x)\ dx}{(b-a)} \amp \text{and since} \int_a^b dx \amp = (b-a)\\ \bar{y} \amp = \dfrac{\int_a^b f(x)\ dx}{\int_b^a dx} \end{align*}

This is a weighted average like (7.1.2) but instead of summing \(n\) discrete values, we integrate of an infinite number of infinitesimal values. \(f(x)\) is the value being averaged and the weighting function is \(dx\text{.}\)

This approach is true for any choice of weighting function. To find \(\bar{x}\) for a two dimensional area, the value to be averaged is \(x\) and the weighting function is \(dA\text{,}\) so replacing \(dx\) with \(dA\) and \(x_i\) with \(x\text{,}\)

\begin{align*} \bar{x}\amp = \frac{\sum \bar{x}_{i} A_i}{\sum A_i} \amp \amp \Rightarrow \amp \bar{x}\amp = \frac{\int x dA}{\int dA} \end{align*}

In other words, to transform a discrete summation to an equivalent continuous integral form you:

  1. Replace the summation with integration, \(\Sigma \Rightarrow \smallint\text{.}\)

  2. Replace the discrete weighting factor with the corresponding differential element,

    \begin{equation*} \begin{cases}A_i \amp \Rightarrow dA \\ V_i \amp \Rightarrow dV \qquad \text{ etc.}\\ W_i \amp \Rightarrow dW\end{cases} \end{equation*}
  3. Rename the value being averaged to eliminate the index \(i\text{.}\) We often use \(el\) as a subscript when referring to a differential element.

The two-dimensional centroid equations (7.5.1) become,

\begin{align*} \bar{x} \amp= \frac{ \sum {\bar{x}_i}\ A_i}{\sum A_i} \Rightarrow \frac{ \int \bar{x}_{\text{el}}\ dA}{\int dA} \amp \bar{y} \amp = \frac{ \sum {\bar{y}_i}\ A_i}{\sum A_i} \Rightarrow \frac{ \int \bar{y}_{\text{el}}\ dA}{\int dA}\text{,} \end{align*}

and in the same way the center of gravity equations become

\begin{align*} \bar{x} \amp = \frac{ \int \bar{x}_{\text{el}}\ dW}{\int dW} \amp \bar{y} \amp = \frac{ \int \bar{y}_{\text{el}}\ dW}{\int dW} \amp \bar{z} \amp = \frac{ \int \bar{z}_{\text{el}}\ dW}{\int dW}\text{.} \end{align*}
Question 7.6.2.

How far is it from the earth to the sun?


92,958,412 miles


Siri says that “The average distance from the earth to the sun is 92,958,412 miles.”

That’s a pretty exact answer. What does it mean, exactly? From what point on the earth to what point on the sun?

If the earth and sun were perfect spheres, we could use the distance between their centroids. With more information about shape and density, we could find their centers of mass and measure between those points.

The bigger problem is that this distance changes continuously as the earth revolves around the sun. How can we find an average value for something which is continuously changing?

We need to use the methods described here, integrating the distance as a function of time over the course of a year.