Hello everyone, I am professor “YYY”
and today I am going to explain trapezoidal rule to calculate the area under a
curve. Before going to calculate, I will explain the Riemann Sum Review first.
Riemann
Sum Review
Let's consider the ramp shown in figure which is characterized by the equation y = x^2 + 1. The area under this curve resembles how much dirt can be remove if someone go from 0 to 2 with a mop. In order to find out how much dirt is going to be removed underneath this ramp, Riemann sum should be used. It considers only one slice along this curve. According to Riemann sum, at first the height somewhere along this curve is measured, and that height is multiplied by 2 meters. That's the distance in x. The height times the width here would the cross-sectional area and tell about how much dirt would be removed.
If a measurement has been made at
the far left side, it is a left-side Riemann sum, it gives an area of 2 because
the height on the left side is 1 multiplied by the width, which is 2. If a
midpoint Riemann sum is considered, area would be estimated at 4. If a
right-side Riemann sum is used, the cross-sectional area would be estimated to
be 10. This sounds absolutely fantastic, but none of these projections look
right.
Area of a trapezoid flipped on its side
|
So, rather than taking multiple
slices and doing a Riemann sum with two different areas, it is not wise to use
rectangles and instead estimate this area with a trapezoid.
Using Trapezoids
to Estimate Area
The
area of a trapezoid is equal to the height of the trapezoid times the average
of the two parallel sides.
Area = (Height) * (w sub 1 + w sub 2)
/ 2
Where,
w sub 1 is the length of short edge, and w sub 2 is the long
side. Even flipping trapezoid sides still gives the same area, but the height is
going along horizontally and w sub 1 on the left side of the trapezoid
and w sub 2 on the right side of the trapezoid. Well, this is the
function to calculate area.
Therefore, a trapezoid outline is going
between the left side, 0, and the right side, 2.
In this case, w sub 1 is the
height on the left side, w sub 2 is the height on the right side, and the
height is actually the distance between 0 and 2 on the x-axis. If these
points are plugged into the area formula, the area equals the value of the
function on the left side plus the value of function on the right side all
divided by 2 times my delta x. That's the difference between the
left-side value of x and the right-side value of x. So in this
case, it's 2 - 0.
It can be even better estimated by
dividing this into two slices, and take the trapezoid area of two different
slices and add them up to get the total sum.
In this way, the first area goes
from f(0) to f(1), so the delta x is 1 - 0, and the second
area goes from f(1) to f(2), so the delta x is 2 - 1. If the
values are plugged in for f(0), f(1) and f(2), the area
under the curve is estimated to be 9 / 2.
Similarity, the area can be
estimated more accurately if number of the segments becomes higher.
Theoretically, the infinite number of segments can give the actual area under
the curve.
good job and great analysis !
ReplyDeleteI really enjoyed reading over your lesson plan professor YYY. Using the trapezoidal rule to calculate the area under a curve can be tricky, but you had very clear step by step instructions. Well done!
ReplyDeleteashah,
ReplyDeletenice lesson on the trapezoid rule. we didn't cover this in class, but you did a good job with it. for your first example, it would have been good to show how you calculated the riemann sums. i know you explained it in words, but also showing the algorithms would reinforce the calculations.
overall a good lesson.
professor little