RIEMANN SUM, TRAPEZOIDAL
RULE, AND SIMPSON’S RULE
Cameron Clary
Riemann Sums, the Trapezoidal Rule, and Simpson’s Rule are
used to find the area of a certain region between or
under curves that usually can
not be integrated by hand.
RIEMANN SUMS Riemann Sums estimate the area under a curve by using the sum of areas of equal width rectangles placed under a curve.
The more rectangles you have, the more accurate the estimated area.
Riemann Sums are placed on a closed integral with the formula:
0 1 2( ) ( ) ( )... ( )n
b af x f x f x f x
n
The interval is [a,b] and n is the number of rectangles used
b a
n
Is also called Δx and refers to the width of the rectangles
0 1 2( ) ( ) ( )... ( )nf x f x f x f x Represents the height of the rectangles
There are three types of Riemann Sums:
Left Riemann, Right Riemann, and Midpoint Riemann
The left, right, and midpoint refer to the corners of the rectangles and how they are placed on the curve in order
to estimate the area.
LEFT RIEMANN Left Riemann Sums place the left corner of the rectangles
used to estimate the area on the curve.
Left Riemann sums are an underestimation of the area under a curve due to the empty space between the rectangles and the curve.
RIGHT RIEMANN Right Riemann sums place the Right corner of the
rectangles on the curve.
Right Riemann Sums are an overestimation of area because of all the
extra space that is not under the curve that is still calculated in the area because it is
inside the rectangles
MIDPOINT RIEMANN Midpoint Riemann Sums place the middle of the
Rectangle on the curve
Midpoint Riemann Sums are the most accurate because the area found in the
part of the rectangle that is over the curve makes up for the area lost in the
space between the curve and the rectangle
LET’S TRY AN EXAMPLE PROBLEM WITH LEFT, RIGHT, AND MIDPOINT RIEMANN SUM
First, find the width of the rectangles or Δx 1 0 1
4 4
b a
n
2( )f x x On the interval [0,1] with n=4
Then, starting with a, the first number on the interval, plug the numbers into the formula, adding Δx each time.2( )f x xSo… 0
1
2
3
4
0
1
41
23
41
x
x
x
x
x
*You should always begin with a and end with b, if not, you plugged in the numbers wrong
Once you have the numbers 1
4
b a
n
0
1
2
3
4
0
1
41
23
41
x
x
x
x
x
and
You can plug them into the formula:1 1 3
(0) ( ) ( ) ( )4 2 4
b af f f f
n
•When doing a Left Riemann, plug all numbers into the formula except for the last number.•When doing a Right Riemann, plug in all numbers into the formula except for the first number.•When doing a Midpoint Riemann, average the numbers and then plug in those values to the formula.
LEFT RIEMANN
Then, plug the 0, ¼, ½, and ¾ into 2( )f x x so you get…
21 1 1 9 70
4 16 4 16 32units
1 1 1 3(0) ( ) ( ) ( )
4 4 2 4f f f f
RIGHT RIEMANN
Then, plug the ¼, ½, ¾, and 1 into 2( )f x x so you get…
1 1 1 3( ) ( ) ( ) (1)
4 4 2 4f f f f
21 1 1 9 151
4 16 4 16 32units
MIDPOINT RIEMANN
Then, plug the ¼, ½, ¾, and 1 into 2( )f x x so you get…
21 1 9 25 49 25( ) ( ) ( ) ( )
4 64 64 64 64 64f f f f units
1 1 3 5 7( ) ( ) ( ) ( )
4 8 8 8 8f f f f
If the area can be found by hand, you can compare your answers from the Riemann Sums to the actual answer to see how accurate your estimation was
In this problem, we can find the area by hand.
The area for this problem is:
12 2
0
1[ ]
3x dx units
Comparing the answers, the area found using the Left Riemann was under the amount of the actual area, the Right Riemann was over the amount of the actual area, and the Midpoint Riemann was the closest to the actual answer. None of the Riemann Sum types gave the exact answer, but that is because they are estimations.
TRY THIS PROBLEM!Calculate the Left and Right Riemann Sum for
on [0, π] using 4 rectangles.( ) sinf x x
4
b a
n
0
1
2
3
4
0
4
23
4
x
x
x
x
x
ANSWERS
2
3(0) ( ) ( ) ( )
4 4 2 4
2 2 20 1 1.8961
4 2 2 4
R
R
L f f f f
L units
2
3( ) ( ) ( ) ( )
4 4 2 4
2 2 21 0 1.8961
4 2 2 4
R
R
R f f f f
R units
TRAPEZOIDAL RULE Trapezoidal Rule is very similar to the Riemann Sums, but instead of using rectangles to approximate area, it uses trapezoids. The trapezoidal rule is more accurate than the
Riemann sums.
TRAPEZOIDAL RULEWhen using the Trapezoidal Rule, use the formula:
0 1 2( ) 2 ( ) 2 ( ) ... ( )2 n
b af x f x f x f x
n
The reason all but the first and last functions are multiplied by two is because their sides are shared by two trapezoids.
b a
n
Is still added to each like in the Riemann Sums
numberx
EXAMPLE PROBLEMUse the Trapezoidal Rule to Calculate 2( )f x x
on the interval [0,1] when n=4
Δx=
0 1 2( ) 2 ( ) 2 ( ) ... ( )2 n
b af x f x f x f x
n
1
4
b a
n
1
2 8
b a
n
0
1
2
3
4
0
1
41
23
41
x
x
x
x
x
Once you have all this information, all you
have to do is plug the numbers into the
formula
0 1 2( ) 2 ( ) 2 ( ) ... ( )2 n
b af x f x f x f x
n
1 1 1 3(0) 2 ( ) 2 ( ) 2 ( ) (1)
8 4 2 4T f f f f f
2( )f x x [0,1] n=4
21 1 1 9 110 1
8 8 2 8 32T units
Just like in the Riemann Sums, if the area can be found by hand, you can sue that answer to check to see how close the estimate was to the exact answer. In this particular problem, the exact answer is 1/3units squared or .3333 units squared. Using the Trapezoidal Rule, the estimate
comes out to be .34375 units squared. The estimated answer is very close to the exact answer.
TRY THIS PROBLEM:Calculate the Trapezoidal Rule for
1( )f x
x
on the interval [1,2] when n=5
1
5
b a
n
1
2 10
b a
n
0
1
2
3
4
5
1
6
57
58
59
52
x
x
x
x
x
x
ANSWER
21 5 5 5 5 1 17531 2( ) 2( ) 2( ) 2( ) .6956
10 6 7 8 9 2 2520T units
SIMPSON’S RULESimpson’s Rule is more accurate than both the
Riemann Sums and the Trapezoidal Rule. The Simpson’s Rule uses various figures to fill in the area under a curve in order to estimate the area
The formula for the Simpson’s Rule is:
0 1 2 3( ) 4 ( ) 2 ( ) 4 ( ).... ( )3 n
b af x f x f x f x f x
n
*When using the Simpson’s Rule n can NOT be an odd number
b a
n
Is still added to each just like in the Riemann Sum and in the Trapezoidal Rule
numberx
EXAMPLE PROBLEMCalculate the Simpson’s Rule for
on the interval [0,4] using n=4 ( )f x x
1b a
n
1
3 3
b a
n
0
1
2
3
4
0
1
2
3
4
x
x
x
x
x
Now plug all the information found into the formula
0 1 2 3( ) 4 ( ) 2 ( ) 4 ( ).... ( )3 n
b af x f x f x f x f x
n
2
1(0) 4 (1) 2 (2) 4 (3) (4)
31
[ 4 2 2 4 3 2] 5.25223
S f f f f f
S o units
TRY THIS PROBLEM:Calculate the Simpson’s Rule for 2( ) 9f x x
on [3,5] using n=4
1
2
b a
n
1
3 6
b a
n
0
1
2
3
4
3
7
24
9
25
x
x
x
x
x
ANSWER
2
1 7 9(3) 4 ( ) 2 (4) 4 ( ) (5)
6 2 2
1 440 13 14 45 16
6 3
S f f f f f
S units
CLASSWORK 1. Find the Left Riemann of on [0,2] when
n=6 2. Find the Right Riemann of on [0,2]
when n=6 3. Find the Midpoint Riemann of on [0,2]
when n=6 4. Calculate the Trapezoidal rule for
5. Calculate the Simpson’s Rule for
3( )f x x
3( )f x x
3( )f x x
( ) sinf x x
on [0,π] for n=4
2
1
1 xon [2,4] where n=4
CLASSWORK ANSWERS 1.
2.
3.
4.
5.
21 1 8 64 125 760 1
3 27 27 27 27 27RL units
21 1 1 125 343 27 1331 27531
3 216 27 216 216 8 216 648RM units
21 1 8 64 125 491 8
3 27 27 27 27 9RR units
22 20 2 2 2 0 2.1063
8 2 2T units
21 1 4 1 4 14( ) 4( ) .2187
6 5 29 5 53 17S units
BIBLIOGRAPHYAn Approximation of the integral of f(x)=x^2 on the interval [0, 100] Using a
Midpoint Riemann Sum. Riemann. Web. 6 Mar. 2011.
Anton, Howard. Calculus A New Horizon. Sixth ed. New York: John Wiley & Sons, Inc., 1999. Print.
Bartkovich, Kevin, John Goebel, Julie Graves, and Daniel Teague. Contemporary Calculus through applications. Chicago, Illinois: Everyday Learning Corporation, 1999. Print.
Beeson, Michael. It is possible to make a Riemann Sum. Riemann Sums, San Jose, California. MathXpert: Learning Mathematics in the 21st Century. Web. 6 Mar. 2011.
Karl. Right Riemann Sum of a Parabola. Section 10: Integrals, Karl's Calc Tutor. http://www.karlscalculus.org/calc10_0.html. Web. 6 Mar. 2011.
"ListenToYouTube.com: Youtube to MP3, get mp3 from youtube video, flv to mp3, extract audio from youtube, youtube mp3." Convert YouTube to MP3, Get MP3 from YouTube video, FLV to MP3, extract audio from YouTube, YouTube MP3 - ListenToYouTube.com.. Web. 6 Mar. 2011. <http://www.listentoyoutube.com/download.php?video=Et8Cjqy9
Trapezoidal Rule. Methods of Calculating Integrals. Spark Notes. Web. 6 Mar. 2011.
©Cameron Clary 2011