We have seen that in situations where it is impossible to know the
function governing some phenomenon exactly, it is still possible to
derive a reasonable estimate for the integral of the function based on
data points. The idea is to choose a model function going through the
data points and integrate the model function. The definition of
an integral as a limit of Reimann sums
shows that if you chose enough data points, the integral
of the model function converges to the integral of the unkown
function, so theoretically, numerical integration is on solid
We have also seen that there are many practical factors that influence
how well numerical integration works. Simple model functions may not
emulate the behavior of the unkown function well. Complicated model
functions are hard to work with. Problems with the number of data
points, or the way in which the data was collected can have a major
impact, and while we have explored some simple ways of estimating how
accurate a particular numerical integral will be, this can be quite
complicated in general.
Nonetheless, by using common sense, together with a solid grasp of
what the integral means and how it is related to the geometry of the
function being integrated, a creative scientist, mathematician or
engineer can accomplish a great deal with numerical integration.
All of the methods for modeling functions that we've considered so far
correspond to fitting elementary functions through successive data
points. We've looked at constant functions, linear functions, cubic
functions and trigonometric functions. However, you are not limited
to these options. In practice, you should use the type of model
function that seems best for the job.
To conclude this introduction to numerical integration, we will
consider what goes into coming up with a new kind of model function.
One of the most elementary type functions not yet considered are
- Each quadratic function is completely determined by 3
points. So our quadratic model will string together parabolas
end-to-end, each through 3 data points. That is, the first
parabola passes through points 1,2,3; the second
parabola passes through points 3,4,5, and so on.
Verify using a sketch that we
need an odd number of points if every point is going to belong to a
- We can integrate under each parabola exactly, if we know the
formula for the parabola. If the 3 points through which we are
fitting have equally-spaced x-coordinates a, b, and
c, the exact value
of the integral over [a,c] is
h/3 ( f(a) + 4 f(b) + f(c) )
where h=b-a=c-b. Verify that this is true for the quadratic
functions f(x)=1, f(x)=x, and
f(x)=x². (Hint: b=(a+c)/2.)
Argue why this must imply the result for arbitrary quadratic functions
f(x)=Ax² + Bx + C.
- Construct a numerical integration scheme based on the above
For this entire lab, we have assumed that you are given
experimental data points, and want to integrate an unknown function.
There is another way that numerical integration is useful:
to numerically approximate definite integrals of functions for which
an explicit antiderivative does not exist.
Recall that exp(x)
is the function "ee-to-the-x."
In the study of statistics, it is necessary to solve integrals for
which the integrand is exp(x²). Unfortunately, this
function has no antiderivative in terms of elementary functions. The
back of most statistics books, however, tabulate integrals for
functions like this. This is accomplished by numerical integration.
Question 17 (Bonus): Really Do-it-yourself
You may have been thinking to yourself, "If only they would do thus
and such, they'd have a really good integration scheme." You
may not have. In any event, come up with your own method of numerical
integration! This could be some combination of methods we've already
studied, or something completely different. Be creative! Is there
some underlying model for the data that is associated with your
method? Illustrate your method with pictures when appropriate, keeping
in mind the pictures you've seen illustrating the other methods. What
are the advantages and disadvantages to your scheme? For example, is
the "error" small? Is the method easy to compute with?
Previous:Analysis of the Integrated
The Geometry Center Calculus Development Team
A portion of this lab is based on a problem appearing in
the Harvard Consortium Calculus book, Hughes-Hallet, et al,
1994, p. 174
Last modified: Wed Jan 17 15:52:18 1996