Integrals 215 problem 01.mws

In first semester calculus, you used Riemann sums to estimate the area under a curve. If an interval [a,b] is divided into n equal parts, and we use left end points to evaluate the function, let us develop a formula for the Riemann sum corresponding to this situation. Recall that the Riemann sum is given by

and for left sums, , where . This allows us to define a formula for left hand sums as follows.

> ls:=n->(b-a)/n*sum(f(a+(i-1)*(b-a)/n),i=1..n);

Let us use this formula to estimate the area under the curve , on the domain [0,1].

First we define the function.

> f:=x->x^2+x+1;

Then we tell Maple the endpoints of the interval.

> a:=0;b:=1;

Let us estimate the area by using .

> ls(100);

Recall that to convert the answer to a decimal approximation, you use the evalf command. The percentage sign means to use the value of the last Maple command output as the input to this command.

> evalf(%);

We can compute the area under the curve by taking a limit in Maple.

> limit(ls(n),n=infinity);

> evalf(%);

The limit is pretty close to the estimate using . But you would not want to evaluate the Riemann sum by hand. We can also evaluate the area using integration and the fundamental theorem of calculus. Maple can compute this integral for us.

> int(f(x),x=0..1);

Submission:

For the arctan function,

(a) Estimate the area under the curve over the interval [0,1] by using left hand sums for n=1000.

(b) Compute the area by using the limit of the left hand sums.

Submission worksheet:

>

This exercise will show you how to approximate the area under a curve by rectangles. To begin, you need to load the package student, by entering the command below:

> with(student);

Look up the syntax for the rightbox command using the help menu. We can use this command to draw the following pictures:

> f:=x->x^2;

> rightbox(f(x),x=0..1,5);

We can increase the number of boxes (rectangles) and draw the following:

> rightbox(f(x),x=0..1,20);

Next, look up the syntax for the rightsum command, and use it to calculate the sums corresponding to the areas of the boxes in our figures.

> rightsum(f(x),x=0..1,5);

Notice that the answer is given as a sum using sigma notation, and not as a number. To get a number for the answer,

you can proceed in various manners. You can use the value command to get a fraction for the answer, the evalf command to obtain a decimal approximation, or simply place the cursor on your result and right click to get a menu

which will allow you to choose the format for the output.

```Error, missing operator or `;`
```

> value(%);

> evalf(%);

Let's do rightsum when .

> rightsum(f(x),x=0..1,20);

> value(%);

> evalf(%);

Finally, use Maple to compute by using the limit command as follows:

> Limit(rightsum(f(x),x=0..1,n),n=infinity);

OK, lets do it again with a lower case l !

> limit(rightsum(f(x),x=0..1,n),n=infinity);

>

Submission:

(a) Repeat this process, but now use leftbox and leftsum, and use the same values for n.

(b) Repeat this process, but now use middlebox and middlesum, and use the same values for n.

(c) You should get different values for the six sums using finite values for n! What happens when you take the limit

in all three cases? Write a paragraph explaining what you see regarding the three limits. Be sure to explain

why all three are the same.

Submission worksheet:

>

Now consider the function over the interval [ ].

Submission:

(a) Repeat the process of activity 1, plotting 9 graphs corresponding to n=10,30,50 with right, middle and left box.

(b) Compute the 9 sums corresponding to each plot.

(c) Compute the three limits corresponding to right, middle and left box.

(d) From the answers you got in (c) and not using any computation what are the areas between the graph of and the x-axis, on the intervals [ ], [ ], [ ], and finally [ ] ?

Submission worksheet:

>

>

>