6.4 Average Value of a Function

Mathematica script by Chris Parrish,
   cparrish@sewanee.edu

Sources and references for some of these problems include
    James Stewart, "Calculus: Concepts and Contexts," Second Edition, Brooks/Cole, 2001
    Deborah Hughes-Hallett, Andrew M. Gleason, et. al., "Calculus," Second Edition, John Wiley & Sons, 1998
    Robert Fraga, ed., "Calculus Problems for a New Century," The Mathematical Association of America, 1993

Average Value of the Sin over the Interval [0,π]

What do we mean by the "average value of the Sin" over the interval [0,π]?

In[338]:=

<<Graphics`Colors` <<Graphics`FilledPlot`

In[340]:=

Clear[f, x]  f[x_] := Sin[x]  Plot[f[x], {x, 0, π}, PlotStyle CinnabarGreen, Background->Moccasin] ;

[Graphics:HTMLFiles/6.4_averageValue_3.gif]

In order to estimate the average value of the Sin over the interval [0,π] ,we divide the interval [0,π] into n equal subintervals, and average the values of the Sin at those points.

In[343]:=

approx[n_] = Underoverscript[∑, i = 1, arg3] Sin[π i/n]/n ;

These estimates of the average value of the Sin over the interval [0,π] should improve as n gets larger and larger.
Now calculate the limit of the above expression as n goes to infinity.

In[344]:=

Limit[approx[n], n∞]

Out[344]=

Limit[If[1/(2 n) ∈Integers,  n, Cot[π/(2 n)]]/n, n∞]

Hmm. Mathematica needs a little help here.

In[345]:=

Limit[Cot[π/(2 n)]/n, n∞]

Out[345]=

2/π

With just a little symbolic manipulation, we can recognize the above limit as an integral.
Since Δx = (b - a)/n with a = 0 and b = π, we replace n with (b - a)/Δx in the expression for approx[n].

In[346]:=

Δx = π/n ;  newApprox[n_] = Underoverscript[∑, i = 1, arg3] Sin[π i/n]/(π - 0) Δx ;

This last expression is a Riemann Sum , and its limit as n goes to infinity is the following integral.

In[348]:=

1/π∫_0^πSin[x] x

Out[348]=

2/π

All of this leads to our taking the following expression as the definition of the average value of the Sin over the interval [0,π].

In[349]:=

ave = 1/π∫_0^πSin[x] x

Out[349]=

2/π

Is the following illustration at all persuasive?
If the region under the green curve were ice, and it melted, would the new water level be at the red line?

In[350]:=

Clear[f, x]  f[x_] := Sin[x]  Plot[{f[x], ave}, {x, 0, π}, PlotStyle {CinnabarGreen, Red}, Background->Moccasin] ;

[Graphics:HTMLFiles/6.4_averageValue_15.gif]


Created by Mathematica  (April 22, 2004)