Problem
Given a function of one variable, f(x), find the area under the curve (the integral) on the interval [a, b].
Assumptions
We will assume the function is Riemann integrable. For error analysis, We will assume that the function f(x) is continuous and has a continuous derivative.
Tools
We will use sampling and iteration.
Initial Requirements
We start with the single interval [a, b], set h = b - a, and let T0 = ½ (f(a) + f(b))h.
Iteration Process
For n = 1, 2, ..., we divide the interval [a, b] into 2n sub-intervals (and therefore h = (b - a)/2n) and we set
Halting Conditions
There are two conditions which may cause the iteration process to halt:
- We halt if the step between successive iterates is sufficiently small, |Tn - Tn − 1| < εstep
- If we have iterated some maximum number of times, say N, and have not met Condition 1, we halt and indicate that a solution was not found.
If we halt due to Condition 1, we state that Tn is our approximation to the integral.
If we halt due to Condition 2, we may state that a solution may not exist.
Copyright ©2005 by Douglas Wilhelm Harder. All rights reserved.