The Area Problem

Sigma Notation

Definition : [Maple Math] = [Maple Math] + [Maple Math] + [Maple Math] + . . . + [Maple Math] + [Maple Math] . Where each [Maple Math] is a Real number. Similarly, [Maple Math] = f(m) + f(m+1) + . . . +f(n) where f is a function and m and n are integers and [Maple Math] .

> Sum(a[i],i=1..7)=sum(a[i],i=1..7);

[Maple Math]

If f(i) = i, then we get the very important sum of the first n integers:

> Sum(i,i=1..n)= `1 + 2 + 3 + . . . + n`;

[Maple Math]

If [Maple Math] then we can write the sum of the first 5 suared integers as (and you should check):

> Sum(i^2,i=1..5)=sum(i^2,i=1..5);

[Maple Math]

problem: Show that [Maple Math] = [Maple Math] - [Maple Math]

> LHS:=Sum(i^2-3*i,i = 2 .. 5);

[Maple Math]

> value(%);

[Maple Math]

> RHS:=Sum(i^2,i=2..5)-3*Sum(i,i=2..5);

[Maple Math]

> value(%);

[Maple Math]

=> They are equal since LHS = RHS.

Properties and Special Sums:

Prove the following very important properties:

1) [Maple Math]

2) [Maple Math] + [Maple Math]

3) Same as 2) except with a minus sign!

Memorize the following special sums :

1) [Maple Math] = n 2) [Maple Math] 3) [Maple Math] 4) [Maple Math] 5) [Maple Math]

problem: Use the above properties and sums to confirm the following:

1)

> Sum(i^2-3*i+4,i=1..9)=sum(i^2-3*i+4,i=1..9);

[Maple Math]

2)

> Sum(i^2-3*i+4,i=1..n);

[Maple Math]

> simplify(value(%));

[Maple Math]

3)

> Sum((i+2)^2,i=1..n);

[Maple Math]

> simplify(value(%));

[Maple Math]

4) Find [Maple Math]

> S:=sum(1*(i/n)^2/n,i = 1 .. n);

[Maple Math]

> simplify(%);

[Maple Math]

> limit(S,n=infinity);

[Maple Math]

Area under f and more

Big Problem: Suppose f(x) > 0 for all x [Maple Math] [a,b]. Find the area between f and the x-axis from x = a to x = b.

Notation: If f is a positive function on [a,b] then the area above is denoted [Maple Math] .

e.g. Find the area under y = 2x + 1 and above [0,4].

1. The Easy Way.

Below is a picture of the area (shaded) to be measured (nevermind the specific commands used for the picture). You can see that we can calculate the area using formulas from geometry i.e. we can split the area into the area of a rectangle + the area of a triangle. You should get:

Area of Rectangle + Area of Triangle = (4)(1) + (1/2)(4)(9 - 1) = 4 + 16 = 20 [Maple Math] .

> with(plots):inequal({y<=2*x+1,x<4,x>0},x=0..6,y=0..10,optionsexcluded=(color=white));

[Maple Plot]

2. The Hard way.

> with(student):f:=x->2*x+1;

[Maple Math]

> rightbox(f(x),x=0..4,4,shading=white,colour=black);

[Maple Plot]

If you calculate the area of the 4 rectangles you will get:

> area4:=rightsum(f(x),x=0..4,4);value(%);

[Maple Math]

[Maple Math]

That not even close to the real area so we try more rectangles:

> rightbox(f(x),x=0..4,8,shading=white,colour=black);

[Maple Plot]

> area8:=rightsum(f(x),x=0..4,8);value(%);

[Maple Math]

[Maple Math]

This is closer to the real answer but still not great. Let's try more rectangles:

> rightbox(f(x),x=0..4,16,shading=white,colour=black);

[Maple Plot]

> area16:=rightsum(f(x),x=0..4,16);value(%);evalf(%);

[Maple Math]

[Maple Math]

[Maple Math]

Better, but still not exact. Let's get a formula for the area of n such rectangles:

> area_n:=simplify(sum(f(0+4*i/n)*4/n,i=1..n));

[Maple Math]

Let's verify the formula for the previous n's:

> subs(n=4,area_n);subs(n=8,area_n);subs(n=16,area_n);

[Maple Math]

[Maple Math]

[Maple Math]

Define the area to be the limit as n -> [Maple Math] :

> Limit(area_n,n=infinity)=limit(area_n,n=infinity);

[Maple Math]

And this is what we got when we did it the easy way!!!

It follows that [Maple Math] = 20 square units.

e.g. Find [Maple Math]

> restart:with(student):f:=x->x^2+2;

[Maple Math]

We do this the same (hard) way: by considering the area of n "approximating" rectangles. Here are some pictures (and the approximations) for increasing numbers of approximating rectangles,

> rightbox(f(x),x=1..2,4,shading=white,colour=black,title=`Four Approximating Rectangles`);rightsum(f(x),x=1..2,4);value(%);evalf(%);

[Maple Plot]

[Maple Math]

[Maple Math]

[Maple Math]

> rightbox(f(x),x=1..2,20,shading=white,colour=black,title=`Twenty Approximating Rectangles`);rightsum(f(x),x=1..2,20);value(%);evalf(%);

[Maple Plot]

[Maple Math]

[Maple Math]

[Maple Math]

> rightbox(f(x),x=1..2,60,shading=white,colour=black,title=`Sixty Approximating Rectangles`);rightsum(f(x),x=1..2,60);value(%);evalf(%);

[Maple Plot]

[Maple Math]

[Maple Math]

[Maple Math]

Here's the formula for the area of n of these rectangles:

> area_n:=Sum(f(1+i/n)*1/n,i=1..n)=sum(f(1+i/n)*1/n,i=1..n);

[Maple Math]

> area_N:=rhs(area_n);

[Maple Math]

> simplify(area_N);

[Maple Math]

> area:=limit(area_N,n=infinity);

[Maple Math]

> evalf(%);

[Maple Math]

More general:

If f is a continuous function on [a,b] then [Maple Math] = [Maple Math] where [a,b] has been divided into n subintervals of equal width [Maple Math] and [Maple Math] is a sample point from the [Maple Math] subinterval. The sum [Maple Math] is a special case of what is called a Reimann Sum.

If f is continuous and positive on [a,b] then [Maple Math] gives the area under f and above [a,b]. If each [Maple Math] is the right end-point of the base of the [Maple Math] approximating rectangle then [Maple Math] and [Maple Math] .

If f is any continuous function on [a,b] then [Maple Math] can be thought of as the sum of areas under f and above the x-axis plus the negative of the areas above f and under the x-axis. Consider the picture below for such a function:

> f:=x->4*x-x^3;

[Maple Math]

> rightbox(f(x),x=0..3,24,shading=white,colour=black);

[Maple Plot]

> Sum(f(3*i/n)*3/n,i=1..n);

[Maple Math]

> S:=simplify(value(%));

[Maple Math]

> Limit(S,n=infinity)=limit(S,n=infinity);

[Maple Math]

Properties of the Definite Integral

Most of the following important properties can be easily proved by the Reimann Sum definition of [Maple Math] and the properties of summation notation. When f is a positive function most can also be seen to have a geometric interpretation in terms of areas.

Basic Must Know Properties:

1) [Maple Math] 2) [Maple Math]

3) [Maple Math] = [Maple Math] 4) [Maple Math] = [Maple Math]

5) Replace "+" by "-" in number (2) 6) [Maple Math] where b is any number (not necessarily between a and c)

Comparison Properties:

7) If [Maple Math] for x in [a,b] then [Maple Math]

8) If [Maple Math] for x in [a,b] then [Maple Math]

9) If f(x) [Maple Math] [m,M] for all x [Maple Math] [a,b] then [Maple Math] [Maple Math] [m(b - a), M(b - a)]

Comparison of 3 different Area Approximations

Consider the area under [Maple Math] between x = 1 and x = 3 and approximate it using 8 rectangles:

i) using right endpoints for the heights

ii) using midpoints

iii) using left endpoints

> restart:with(student):f:=x->x^2+2;

[Maple Math]

> rightbox(f(x),x=1..3,8,shading=white,colour=black,title="Using right endpoints");

[Maple Plot]

> REP:=rightsum(f(x),x=1..3,8);evalf(%);

[Maple Math]

[Maple Math]

> middlebox(f(x),x=1..3,8,shading=white,title="Using midpoints",colour=black);

[Maple Plot]

> MP:=middlesum(f(x),x=1..3,8);evalf(%);

[Maple Math]

[Maple Math]

> leftbox(f(x),x=1..3,8,shading=white,title="Using left endpoints",colour=black);

[Maple Plot]

> LEP:=leftsum(f(x),x=1..3);evalf(%);

[Maple Math]

[Maple Math]

The actual area is:

> Area:=Int(f(x),x=1..3);evalf(Area);

[Maple Math]

[Maple Math]

Notice that LEP < MP < REP and that MP is the best estimate of the area (see below). This is usually true.

> evalf(REP-Area);evalf(MP-Area);evalf(LEP-Area);

[Maple Math]

[Maple Math]

[Maple Math]