|
IntroductionProblem: Let be a positive valued (bounded) function on a closed (finite) interval of the real numbers. Compute the area of the region in the plane bounded by the graph of , the -axis and the straight lines . EXAMPLE 1.1.
For ``general'' functions this looks like a hard problem. However, for some types of special functions (e.g. linear functions) the problem is easy. Let us look at stepfunctions. A stepfunction on is given by a subdivision of , i.e. a finite sequence of numbers and function values such that for all such that for all , whereas for all and . Since stepfunctions play an important role we introduce the procedure stepfunction to produce them. It has two arguments, a subdivision and a list of function values . With the notations above and . EXAMPLE 1.2.
For positive stepfunctions the solution to the area problem
is immediate and given by the formula
Note that this formula makes sense for general stepfunctions: the resulting number represents the area above the -axis minus the area below the -axis. The procedure int_step yields the above sum for given and . EXAMPLE 1.3. For the stepfunction in Example 1.2. the area under the graph of is
Now back to the problem for general functions. The idea is to approximate such a function by stepfunctions. E.g., a continuous function can be well approximated with constant on sufficiently small intervals. Let us look at the function of Example 1.1. EXAMPLE 1.4. Take a regular subdivision of , i.e. a subdivision into subintervals of equal length.
For the value of the stepfunction on we choose . Hence
This plot shows the function and its approximating stepfunction . Some daemon (in fact Maple's procedure int) tells us that the area under the graph of equals to whereas the area under the graph of is given by
which can be rounded to . Neither very good nor totally bad as an approximation. We can get a better approximation by increasing the number of subintervals:
rounded to , a much better approximation. Exercise 1.1.
Consider the function
The region under the graph of between is a degree circle sector. Hence the area equals to . Use the above method of approximation by regular stepfunctions to find an approximation of . How many subintervals are needed to approximate with an error less then or equal to ? The Maple package ``student'' contains the functions leftsum and rightsum, which are in case of regular subdivision the same as the function int_step. I.e., the function leftsum (rightsum) computes a numerical approximation to a definite integral using rectangles. The height of each rectangle is determined by the value of the function at the left (right) side of each subinterval. A graph of the approximation can be obtained by the Maple procedure leftbox (rightbox). Exercise 1.2.
Approximate the function
on the intarval by regular stepfunctions using the procedure
|
|