Professional Documents
Culture Documents
If the function is constant, that area just the product of (B-A)(B−A) (the length of
the interval) with the constant value of ff, because the figure whose are we are
computing is a rectangle, with sides at x = Ax=A and x = Bx=B, top at y = fy=f,
and bottom at y = 0y=0.
There are three very simple ways to do this. One way is to use f(s)f(s), and another
to use f(s+d)f(s+d) and another is to use their average.
These ways of estimating have names! They are, the left hand rule, the right
hand rule and the trapezoid rule. The contribution to area from each sliver will
be this estimate multiplied by dd.
Happily, the only difference between these in the answer you get for the area in
question comes from the contributions f(A)df(A)d and f(B)df(B)d. All other
intermediate points contribute the same amount no matter which of these "rules" is
used.
This happens because the end of one sliver is the beginning of the next, and the
contribution to the sum from point ss is f(s)df(s)d no matter which of these
methods is used. If you use the value of ff on the left side of intervals, then you
get f(s)df(s)d from the interval starting at xx; if you use the right side value
of ff you get the same thing coming from the interval ending at xx; and if you use
their average, you get half from either interval.
This means the only difference comes from the first and last intervals. With the
"left rule", you get f(A)df(A)d but not f(B)df(B)d vice versa for the "right rule",
and \frac{(f(A)+f(B))d}{2}2(f(A)+f(B))d from the average or "Trapezoid Rule". In
other words, in the trapezoid rule you get f(s)df(s)d for every interior sliver except
the end ones, and only \frac{f(A)d}{2}2f(A)d and \frac{f(B)d}{2}2f(B)d at the
endpoints AA and BB. The trapezoid rule turns out to be the best of the three.
This will compute the left hand rule estimate for areas in column C. By putting
=C5-(B$5+B5)/2 in D5, we convert the left hand rule to the trapezoid rule which
will be displayed at each intermediate point by what is in column D. The -B$5/2
takes away half of the contribution at x = Ax=A, and the other subtraction takes
away the contribution at the other end.
We start by putting the choice for d in B2; putting the starting value for xx, AA, in
B3.
You can set this up starting at the fifth row by putting =B3 in A5. Then set A6 to
=A5+B$2, and copy A6 down column A. That will be the value of your variable.
If you do this, you can change d just by inserting a different value for it in B2.
You can change the starting point by entering the new one in B3. You can
change the function you want to integrate by replacing sin(A5) by your new
f(A5) and copying =B$2*f(A5) down column B.
The estimate of the area starting at A5 and ending at at x=A5+kd using the Left
Hand Rule will appear in column C at row whose a value is B5+(k-1)d. (This box
will have the sum of kk terms of the form \sin(x)dsin(x)d.)
The entries in column D convert the left hand rule to the Trapezoid rule. Thus what
appears in the row with A value B4+kd will be the trapezoid rule estimate of the
area between the x-axis, the sine curve and the lines x=B4 and x=B4+kd.
This is an estimate to the area; we can do better and will, later on.
Now select columns A and B from A5 to B105, and insert an xy scatter chart.
What do you see?