Average values of a function


Average velocity

We have seen in our discussion of velocities and displacements that

\[ 
\int_{T_1}^{T_2}~~v(t) ~dt= ~x(T_2)~-~x(T_1) 
\]

As you may remember, we called this the displacement.
We also discussed average velocities as a motivation for an eventual definition of the derivative (and "instantaneous rates"), and you hopefully remember that

\[ 
v_{avg} =\frac{\rm distance ~travelled}{\rm time~taken} = 
\frac{ ~x(T_2)~-~x(T_1)}{T_2~-~T_1} 
\]

Putting these two ideas together leads to the conclusion that

\[ 
v_{avg} = 
\frac{1}{T_2~-~T_1} \int_{T_1}^{T_2}~~v(t) ~dt 
\]


Average value of a function
In general, following much the same idea as above, we will define the average value of a function $ f $ on an interval $ [a,b] $ as:


\[ 
{\bar f} =f_{avg} = 
\frac{1}{b~-~a} \int_{a}^{b}~~f(x) ~dx 
\]


What is the meaning of this expression, and why does it correspond to our intuitive idea of what the average value of a function means? To understand this, note that the average of n numbers, $  y_1, y_2,... y_n $ is


\[ 
{\bar y} = \frac{1}{n} \sum_{k=1}^{n} y_k 
\]


To make some sense of the expression for the average value of the function f, suppose we sample values that it takes at a few equally spaced points in the interval [a,b], $  x_1, x_2,... x_n $ . Then the spacing of the points is $  \Delta x = (b-a)/n $ and


\[ 
{\bar f} = \frac{1}{n} \sum_{k=1}^{n} f(x_k) 
\]


From the spacing between the values of x, we notice that


\[ 
\frac{1}{n} = \frac{\Delta x}{b-a} 
\]


We thus conclude that


\[ 
{\bar f} = \frac{\Delta x}{b-a} \sum_{k=1}^{n} f(x_k) 
= \frac{1}{b-a} \sum_{k=1}^{n} f(x_k) \Delta x 
\]


As the number of sample points gets larger ( $  n \to \infty $ ), this sum approaches the definite integral, so that, in this limit,


\[ 
{\bar f}  = 
\frac{1}{b~-~a} \int_{a}^{b}~~f(x) ~dx 
\]



Example 1: Average Day length

The length of a day varies over the seasons, with some very short and some very long days. This is a cyclic phenomenon, which repeats itself year in and year out. We can describe day length approximately by a simple formula involving the periodic function sin(t). We can then use this formula to determine average day length over a given period of time, for example, over a month, a season, or over part of the year.
Suppose that at $ t $ days after a Spring Equinox, the length of time from sunrise to sunset (in hours) is:

\[ 
l(t) = 12 + 4 \sin (\frac{\pi t}{182}) 
\]

We will use this expression to determine the average length of the day during the spring and summer. Before doing so, let us see why this expression is a reasonable description of day length.


For your consideration:

  1. What is the length of the shortest day, according to this expression and when does it occur ? (i.e. for what value of t?)

  2. What is the length of the longest day, and when does it occur?

  3. What is the day length when $ t=0 $ ? Why is this day called the Equinox ?

  4. For what value of t does the cyclic pattern of day length start to repeat itself?


We can now determine the average length of a day during the spring and summer. Assuming that spring and summer are half a year, i.e 365/2 = 182 days, we are to calculate the following integral:


\[ 
{\bar l}  = 
 \frac{1}{182} \int_{0}^{182}~~l(t) ~dt 
\]


Using the expression for $ l(t) $ in this integral, we find that


\[ 
{\bar l}  = 
 \frac{1}{182} \int_{0}^{182}~~(12+ 4 \sin (\frac{\pi t}{182}) ~dt 
\]



\[ 
{\bar l}  = 
 \frac{1}{182} [12t- 4 \frac{182}{\pi}\cos(\frac{\pi t}{182}]|^{182}_0 
=12 + \frac{8}{\pi} 
\]


For your consideration:

  1. Verify the final step by expanding and performing the necessary calculation.

  2. What would be the average day length over one month (i.e. over 1/12 of a year)?



Example 2: Average Power in an Electric Circuit

In an AC ("alternating current") electric circuit, the current is oscillatory, i.e. it is given by the expression

\[ 
I(t) = A \cos(\omega t) 
\]

where A is the amplitude and $ \omega $ the frequency. Most common household currents are 60 cycles per second. We will use this to determine how the average power over one cycle is related to the amplitude of the current.

Power in a circuit is defined as follows:

\[ 
P(t) = I^2(t) 
\]

So, using the above formula

\[ 
P(t) = A^2 \cos^2(\omega t) 
\]


For your consideration:

  1. Sketch the current as a function of time for several cycles. Show when the maximal and minimal values of the current occur.

  2. Sketch the power as a function of time for several cycles. Hint: Can the power ever be negative ? At what times is the power zero ? What is the maximal value of the power ?

  3. If the frequency of the oscillation is $ \omega $ , how long is one cycle?

  4. Calculate the average value of the current over one cycle. Show that you get zero.

  5. Now explain WHY the average of the current over one cycle is zero. Use your sketch in (1) and a geometric argument, if you like.

  6. Do you expect that the average power over one cycle will also be zero ? Why or why not? Explain, again using your sketch in part (2).


We will now compute the average power over one cycle, i.e for $  [0, 2 \pi /\omega] $ . To do so, we compute the following integral:


\[ 
{\bar P}  = 
\frac{\omega}{2 \pi} \int_{0}^{2 \pi/\omega}~~ A^2 \cos^2(\omega t) dt 
\]


This integral involves the square of trigonometric function, for which no antiderivative exists as is, but we can use the following

Trick: $  \cos^2(\omega t) = 
\frac{1}{2}(1 + \cos(2 \omega t)) $

Plugging this in, we find that


\[ 
{\bar P}  = 
\frac{\omega}{2 \pi} \int_{0}^{2 \pi/\omega}~~ 
A^2 (1 + \cos(2 \omega t)) dt 
\]



\[ 
{\bar P}  = 
\frac{\omega}{2 \pi} 
[A^2 t + \frac{1}{2 \omega}\sin(2 \omega t)] |^{2 \pi/\omega}_0 
\]



\[ 
{\bar P}  = 
\frac{\omega}{2 \pi} 
[A^2 \frac{2 \pi}{\omega}  + \frac{1}{2 \omega}(\sin(2 \pi) - \sin(0))] 
\]


Simplifying the above algebraically, we arrive at

\[ 
{\bar P}  = \frac{A^2}{2} 
\]