>   

Area and Riemann Sums

Calculus I Lab -- Fall 2002

prepared by

Douglas B. Meade

Department of Mathematics

University of South Carolina

Columbia, SC 29208

E-mail: meade@math.sc.edu

5 November 2002

>   

Announcement

It is extremely unfortunate that the Election Day holiday coincided with the discussion of area. This might be THE topic that benefits most from the graphical and symbolic features of Maple. This worksheet contains an abreviated lab that is optional - but highly recommended. It is also designed to be very simple to complete. You should be able to complete all work for this lab in well under an hour.

Prepare your lab report as a handwritten summary, a Word document, or a Maple worksheet. Regardless of the format used to prepare your report, your answers MUST appear as complete English sentences. Simply stating the "answer" is not acceptable. This lab is due no later than 5:00p.m. Friday, November 8, 2002. It can be handed to either Wally or Prof. Meade or e-mailed to waltman@sc.edu .

>   

Purpose

The purpose of this week's lab is to provide a coordinated visual and symbolic look at area and Riemann sums. The RiemannSum  command from the Student[Calculus1]  package will be used to create graphical and symbolic approximations to the area under a curve y = f(x)  over an interval [ a , b  ]. The commands introduced in this worksheet can be used to check your work for many of the assigned problems from Sections 5.4 (p. 233) and 5.5 (p. 240).

>   

Example: Area by Inscribed Polygons

>    restart;

>    with( plots ):

>    with( Student[Calculus1] ):

Warning, the name changecoords has been redefined

>   

Consider the region R bounded by the parabola y  = f(x)  = x^2 , the x -axis, and the veritcal line x = 2 .

>    y := x^2:

>    plot( y, x=0..2, filled=true, scaling=constrained );

[Maple Plot]

>   

We refer to R as the region under the curve y = x^2  between x = 0  and x = 2 . Our main aim is to calculate the area of R, A(R) .

Partition the interval [ 0, 2 ] into n  (equal) subintervals, each with length Delta*x  = (2-0)/ n , by means of the n+1  points

  0 = x[0]  < x[1]  < x[2]  < ... < x[n-1]  < x[n]  = 2  

where   x[0]  = 0, x[1]  = Delta*x  = 2/n , x[2]  = 2*Delta*x  = 4/n , ..., x[i]  = i*Delta*x  = 2*i/n , ..., and x[n]  = n*Delta*x  = 2.

Consider the typical rectangle with base [ x[i-1] , x[i]  ] and height f(x[i-1]) = x[i-1]^2 ; its area is f(x[i-1])*Delta*x . For example, the union R[7]  of all 7 rectangles forms the inscribed polygon shown below

>    RiemannSum( y, x=0..2, partition=7, method=lower, output=plot,
            showarea=false, scaling=constrained,
            title="Area under y=x^2, 0<x<2, with 7 inscribed rectangles" );

[Maple Plot]

>   

The area A(R[7])  can be calculated by summing the areas of the 7 rectangles:

>    A_R7 := RiemannSum( y, x=0..2, partition=7, method=left, output=sum );

A_R7 := 2/7*Sum(4/49*i^2,i = 0 .. 6)

The value of this sum,

>    value( A_R7 ) = evalf( A_R7 );

104/49 = 2.122448979

is an approximation to the area of R.

>   

The area A(R[n])  can be calculated by summing the areas of the n  rectangles in R[n] :

>    A_Rn := RiemannSum( y, x=0..2, partition=n, method=left, output=sum );

A_Rn := 2/n*Sum(4*i^2/n^2,i = 0 .. n-1)

The value of this sum is

>    q1 := value( A_Rn ):
q2 := expand( q1 ):
q1 = q2;

2/n*(4/3*n-2+2/3/n) = 8/3-4/n+4/3/n^2

Note that Maple has applied the formula for the sum of squares of integers to obtain this result.

>   

The following animation will help you to visualize what happens as n  gets larger and larger.

>    p1 := RiemannSum( y, x=0..2, partition=7, iterations=6, method=lower, output=animation,
                  scaling=constrained ):

>    p1;

[Maple Plot]

For the purposes of a printed handout, the following command displays the individual frames of the animation.

>    display( op([1],p1) );

[Maple Plot]

>   

Observe that the approximating area appear to be converging to a value slightly larger than 2.6.

>   

The exact value of A(R) is the limit of the approximating areas as n increases without bound:

>    q3 := Limit( q2, n=infinity ):
q3 = value( q3 );
`` = evalf( value(q3) );

Limit(8/3-4/n+4/3/n^2,n = infinity) = 8/3

`` = 2.666666667

>   

Example: Area by Circumscribed Polygons

The careful reader will notice that while the inscribed polygons appear to fill the entire region R, the preceding argument only provides a lower bound on the area of R:   Limit(A(R[n]),n = infinity)  <= A( R ) .

>   

Consider now the union S[n]  of the n  rectangles formed with base [ x[i-1] , x[i]  ] and height f(x[i]) = x[i]^2 . For example, with n = 7 :

>    RiemannSum( y, x=0..2, partition=7, method=upper, output=plot,
            showarea=false, scaling=constrained,
            title="Area under y=x^2, 0<x<2, with 7 circumscribed rectangles" );

[Maple Plot]

>   

The area A(S[7])  can be calculated by summing the areas of the 7 rectangles:

>    A_S7 := RiemannSum( y, x=0..2, partition=7, method=right, output=sum );

A_S7 := 2/7*Sum(4/49*i^2,i = 1 .. 7)

The value of this sum,

>    value( A_S7 ) = evalf( A_S7 );

160/49 = 3.265306123

is an (over) approximation to the area of R.

>   

The area A(S[n])  can be calculated by summing the areas of the n  rectangles in S[n] :

>    A_Sn := RiemannSum( y, x=0..2, partition=n, method=right, output=sum );

A_Sn := 2/n*Sum(4*i^2/n^2,i = 1 .. n)

The value of this sum is

>    q4 := value( A_Sn ):
q5 := expand( q4 ):
q4 = q5;

2/n*(4/3/n^2*(n+1)^3-2*(n+1)^2/n^2+2/3/n^2*(n+1)) = 8/3+4/n+4/3/n^2

>   

The following animation will help you to visualize what happens as n  gets larger and larger.

>    p2 := RiemannSum( y, x=0..2, partition=7, iterations=6, method=upper, output=animation,
                  scaling=constrained ):

>    p2;

[Maple Plot]

For the purposes of a printed handout, the following command displays the individual frames of the animation.

>    plots[display]( op([1],p2) );

[Maple Plot]

>   

Once again, observe that the approximating area appear to be converging to a value slightly larger than 2.6. In fact, as before,

>    q6 := Limit( q5, n=infinity ):
q6 = value( q6 );

Limit(8/3+4/n+4/3/n^2,n = infinity) = 8/3

>   

In conclusion, because each A(R[n])  is an under approximation to A(R)  and each A(S[n])  is an over approximation to A(R)  :

   Limit(A(R[n]),n = infinity)  <= A(R)  <= Limit(A(S[n]),n = infinity)

And, by the Squeeze Theorem for Limits and the fact that each of these limits has the same value, we conclude that A(R) = 8/3 .

>   

Exercise 1

Consider the region R under the curve y = x^2-4*x+6  over the interval [ 1, 9 ]. Let R[n]  and S[n]  denote the unions of rectangles formed with polygons formed using the value of the function at the left and right endpoints of each subinterval. (Note that because the curve is not monotone on this interval, these are NOT  inscribing and circumscribing polygons.)

(a) Use the RiemannSum  command (with method=left ) to obtain the expression for A(R[n])  as the sum of a constant and two negative powers of n .

(b) Use the RiemannSum  command (with method=right ) to obtain the expression for A(S[n])  as the sum of a constant and two negative powers of n .

(c) What is A(R) ?

(d) Bonus Question: What is the smallest number of partitions (with method=left ) needed to approximate the value of A(R)  to one decimal place, i.e., with an error no more than 0.05. (Explain how you know your answer is correct.)

>   

Exercise 2 (# 19, page 234)

In the notation of this problem, A[a]^b  is the area under the curve y = x^2  over the interval [ a , b  ]. For parts (a) and (b) in the text, follow the following steps:

(i) Use the RiemannSum  command to obtain an approximation to A[a]^b  with n  subintervals when the approximating rectangles are formed at the left end of each subinterval.

(ii) Explain how you get from this expression to the exact value for A[0]^b  and A[a]^b  .

>   

>   

>