# Approximations

If *x*_{1}, *x*_{2}, ..., *x*_{n}
are all approximations of a value *x*, then the average

is also an approximation of *x*. Less apparent is that, given the same approximations, the sum

Is also an approximation of *x*, so long as the denominator
is not zero. The first approximation is a special case of the
second where *a*_{1} = *a*_{2} = ⋅⋅⋅ = *a*_{n} = 1.

One example of this will be Romberg integration where we find
two approximations R_{0,0} and R_{1,0} and define
a better approximation by evaluating (4 R_{0,0} − R_{1,0})/3.
In this examle, *a*_{1} = 4 and *a*_{2} = -1.

# Average Values

# Definition

The average value of an integrable function f(*x*) on an interval [*a*, *b*] is
given by the formula

If we partition the interval [*a*, *b*] into *n* equal subintervals,
we may therefore approximate this integral by the Riemann sum

where *h* = (*b* - *a*)/*n* and
*x*_{i}^{*} ∈ [*a* + (*i* - 1)*h*, *a* + *ih*].

Now, by noting that *b* - *a* = *nh*, it we may rewrite this
approximation as:

# Example

Consider the average value function f(*x*) = *e*^{-x}sin(*x*) on the
interval [1.2, 1.8]. Using 10 decimal digits of precision, this is equal to 0.2220376327.

Next, partition the interval into two, three, and six subintervals, and in each case
choose the midpoint of each interval to represent *x*_{i}^{*}:

1/2⋅(f(1.35) + f(1.65)) = 0.2221973076

1/3⋅(f(1.3) + f(1.5) + f(1.7)) = 0.2221107594

1/6⋅(f(1.25) + f(1.35) + f(1.45) + f(1.55) + f(1.65) + f(1.75)) = 0.2220562383

A plot of the function and the various partitions is shown in
Figure 1.

Figure 1. The function f(*x*) = *e*^{-x}sin(*x*) on [1.2, 1.8].

Hence, we see that even by averaging the values of just two points on
the interval that we get a reasonable approximation to the mean value.

# Application

In many cases when we are doing error analysis, we will end up
with a sum of the *m*th derivative evaluated at a number of points along an interval. To
simplify our writing of the error term, we will usually use the
approximation

where the average is assumed to be along the appropriate interval.

Copyright ©2005 by Douglas Wilhelm Harder. All rights reserved.