Approximating the area under a curve using Riemann Sums

57
Approximating the area under a curve using Riemann Sums Riemann Sums -Left, Right, Midpoint, Trapezoid Summations Definite Integration

description

Approximating the area under a curve using Riemann Sums. Riemann Sums -Left, Right, Midpoint, Trapezoid Summations Definite Integration. We want to think about the region contained by a function, the x-axis, and two vertical lines x=a and x=b. . a. b. - PowerPoint PPT Presentation

Transcript of Approximating the area under a curve using Riemann Sums

Page 1: Approximating the area under a curve using Riemann Sums

Approximating the area under a curve using Riemann Sums

Riemann Sums -Left, Right, Midpoint, TrapezoidSummationsDefinite Integration

Page 2: Approximating the area under a curve using Riemann Sums

• We want to think about the region contained by a function, the x-axis, and two vertical lines x=a and x=b.

a bThe goal of this process is to determine the area that is shaded yellow. We will first use geometry and some basic shapes to estimate the area. We will then combine the idea of limits with that of integrals to find the exact area.

Page 3: Approximating the area under a curve using Riemann Sums

• There are two methods that we can use to approximate area. One is creating basic geometry figures and looking at each individual figure, finding its area, and then summing those values. This is not difficult if the number (n) of figures is small.

• If n becomes very large (probably over 10) then this process can become very tedious and we revert to the idea of using summations and creating a ‘sigma notation formula’ that helps evaluate sums when n is large.

Page 4: Approximating the area under a curve using Riemann Sums

• Since we know we will be using rectangles, and we know the formula for the area of a rectangle, we will start with the most basic style of problem.

• When we look at the region under the curve, it will be bounded by two vertical lines and the x axis, in order to find the size of the intervals for a desired number of rectangles we will use this formula :

sizeof interval b axn

Page 5: Approximating the area under a curve using Riemann Sums

• The area of each rectangle will then be the product of the height and width of that rectangle or subinterval. Then we will add up all “n” rectangles.

• What do we use as the height of each rectangle? (later on we will learn that as more and more rectangles are made, this distinction does not matter) but for computational reasons we will talk about 4 methods

Right Sums (using right endpoints, right shoulder of rectangle touches the curve)

Left Sums (using left endpoints, left should of rectangle touches the curve)

Midpoint Sums (using the midpoints of each subinterval, so the segment containing the midpoint of the subinterval is used as the height for that rectangle.

Trapezoid (instead of using rectangles, a better approximation can be made using irregular trapezoids)

Page 6: Approximating the area under a curve using Riemann Sums

A few pictures to make the connection

Right shoulder of rectangle on curve, so right sum

We want to divide it into “n” intervals, for this example let n = 6. So to determine how wide each interval is, we would take (b-a)/n, and that value is ∆x. Then to find the endpoint of the first interval you simply add a+∆x, then keep adding ∆x to the previous endpoint to get the next subinterval’s endpoint until you are done.

Now we’ve simply constructed each rectangle so that each of the six rectangles are touching the curve with their right shoulders.

Page 7: Approximating the area under a curve using Riemann Sums

b axn

f(x)

The area of the second rectangle is A=height*widthSo, R2= f(x)*∆xYou will then do this for each rectangle. Note to find f(x)’s numerical value you simply take the x value of that right endpoint of the rectangle and plug it into f(x) to find the actual numerical height of that rectangle.

Page 8: Approximating the area under a curve using Riemann Sums

• Because all the rectangles go above f(x), the sum of the areas will be larger than the actual area under the curve, so if f(x) is increasing this is an overestimate.

• Any ideas on how to make the green areas smaller?

Page 9: Approximating the area under a curve using Riemann Sums

Left Sum (puts left shoulder on f(x))

Left Shoulder is on the curve, Left Sum

Page 10: Approximating the area under a curve using Riemann Sums

• Find the area of the rectangles in the same fashion as we did with right sums. The blue areas are under the curve, but are not included in your rectangle areas, so if f(x) is increasing the left sum would be an underestimate

Page 11: Approximating the area under a curve using Riemann Sums

Right Sum Left Sum

By the sandwich theorem or squeeze theorem we know that since the Right sum is an overestimate, and the left sum is an

underestimate, then the actual area under the curve is stuck somewhere in between them.

Remember that the right sum will reduce down towards the actual area if we increase the number of rectangles, likewise the left sum will increase towards the actual area when we increase n because

f(x ) is increasing in this graph.

Page 12: Approximating the area under a curve using Riemann Sums

Our goal is to eventually get the ∆x to be infinitely small, so that the overestimate or underestimate is infinitely small.

So if we use the idea of limits then we can approach the actual area under the curve. That is as n approaches infinity we will get an exact

value for the area.

Page 13: Approximating the area under a curve using Riemann Sums

Examples: Find the area under the curve 2( ) 5, 0, 2.f x x between x and x

25

45

65

85

105

2 0 25 5

b axn

Then the first “right endpoint” is a+∆x

Using 5 rectangles

Page 14: Approximating the area under a curve using Riemann Sums

2( ) 5, 0, 2.f x x between x and x Find the area under the curve using 10 rectangles.

Right Sum

Page 15: Approximating the area under a curve using Riemann Sums

• Use Riemann Sums – Right Hand & Left Hand• n=5 [1,4]

2( ) 3 2f x x x

Page 16: Approximating the area under a curve using Riemann Sums

• Use Riemann Sums – Right Hand & Left Hand• 5 rectangles [-1.2,2]

4 31( ) 1.3 42

f x x x

Page 17: Approximating the area under a curve using Riemann Sums

3 21( ) 43

f x x x x

• Use Riemann Sums – Midpoint• 5 rectangles

Page 18: Approximating the area under a curve using Riemann Sums

( ) 6 5f x x • Use Riemann Sums – Midpoint• 6 rectangles [6,12]

Page 19: Approximating the area under a curve using Riemann Sums

25

45

65

85

105

Right Sum

Page 20: Approximating the area under a curve using Riemann Sums

25

45

65

85

105

Left Sum

2( ) 5, 0, 2.f x x between x and x

Page 21: Approximating the area under a curve using Riemann Sums

2( ) 5, 0, 2.f x x between x and x Find the area under the curve using 10 rectangles.

Left Sum

Page 22: Approximating the area under a curve using Riemann Sums

• When the value of “n” is increased, the number of rectangles increases, does the right sum and left

sum squeeze down towards the actual area?

• Which is a better approximation

Page 23: Approximating the area under a curve using Riemann Sums

• Find the area under the curve with n=6,12 Left and Right Sums

( ) 2 3, [0,6]f x x on

Page 24: Approximating the area under a curve using Riemann Sums

2

2( ) 2f xx

Find LS and RS with n=6 on [1,5]

Page 25: Approximating the area under a curve using Riemann Sums

Using Midpoints gives a bit of a better approximation.

• Steps– Still divide everything up into subintervals. – Locate the midpoints of each interval

(endpoint + endpoint/2)– Now use the midpoint as the x value that you plug

into f(x) to find the height of the rectangle.– Then to find the area of each rectangle you still

take the height*∆x– Sum all rectangle areas.

Page 26: Approximating the area under a curve using Riemann Sums

This picture describes the concept of finding the heights of each rectangle at the midpoints of each subinterval. Still broke the interval into congruent sections, but then found the midpoints of those sections, plug that midpoint into f(x) to find the height of the rectangle.

Notice how in each rectangle, the part of the rectangle above the curve is almost equivalent to the part of the rectangle not calculated under the curve, so the overestimate and underestimate almost cancel each other out completely

Page 27: Approximating the area under a curve using Riemann Sums

5334( ) 3f x x x

Use midpoints with a=1 and b=3 and n=10. The exact area is 21.20014476021

Is the midpoint method along with several subintervals very close to this value?

Page 28: Approximating the area under a curve using Riemann Sums

Use midpoints, left s um, and right sum. Which is a better estimate?

f(x)=sin(x) , [0, pi] use 8 rectangles.

Page 29: Approximating the area under a curve using Riemann Sums

Notice after creating trapezoids, the area above or below the curve that is over or under estimated has become so small that coloring it in would be too difficult to do, this is a very good approximation, but the method is more involved and the steps are longer because of the formula for finding area of a trapezoid being more complex than the area of a rectangle.

Trapezoids

Page 30: Approximating the area under a curve using Riemann Sums

• The area of the curve using the trapezoid method is identical to the average of the left and right Riemann Sums.

Page 31: Approximating the area under a curve using Riemann Sums

Trapezoids give even better approximations. Remember the formula for finding a trapezoid is 1/2h*(b1+b2)

25

45

65

85

105

2( ) 5, 0, 2.f x x between x and x Examples: Find the area under the curve using trapezoids.

Page 32: Approximating the area under a curve using Riemann Sums

USE Trapezoids. Which is a better estimate?

f(x)=sin(x) , [0, pi] use 8 subintervals.

Page 33: Approximating the area under a curve using Riemann Sums

[0,2] using 6 trapezoids

4 3( ) .5f x x x x

Page 34: Approximating the area under a curve using Riemann Sums

1

lim ( )n

in i

f x x

Riemann Sums when the number of rectangles or subintervals is very large.

b axn

( )ix a x i

Height of the “ith” rectangle

Width of the “ith” rectangle

Counting tool that allows us to move from the 1st rectangle to the 2nd rectangle to the 3rd … to the ith rectangle

Page 35: Approximating the area under a curve using Riemann Sums

( )ix a x i Counting tool that allows us to move from the 1st rectangle to the 2nd rectangle to the 3rd … to the ith rectangle

If we are interested in going between a=1 and b=3 for example with n rectangles. Δx = (3-1)/n = 2/n

13

1+(2/n)

1+(2/n)2

1+(2/n)3

1+(2/n)4

. . . 1+(2/n)i

1st 2nd

3rd4th ith ith ith

This is for right sums. xi changes when dealing with left sums or with midpoints.

f( ) will be the height of the ith rectangles.

Page 36: Approximating the area under a curve using Riemann Sums

So now lets look at the function 2( ) 1 when a=1 and b=3 with n rectanglesf x x x

1

lim ( )n

in i

f x x

3 1 2b axn n n

2 2( ) 1 1iix a x i i

n n

1

2 2lim 1n

n i

ifn n

Now in order to evaluate this you need to identify compute f(1+2i/n) so plug that in for every x in x2-x+1

Page 37: Approximating the area under a curve using Riemann Sums

• Now simplify the expression and apply your limit rules to see what the limit approaches and that will be the area under the curve between a=1 and b=3.

2

1

2 2 2lim 1 1 1n

ni

i in n n

Page 38: Approximating the area under a curve using Riemann Sums

Combining Riemann Sums with Summation Notation

1

@ ( )n

i

function height a certain height width

left or right height of rectangle b an

We will want to use i as a counting device to move from one rectangle to the next.

Page 39: Approximating the area under a curve using Riemann Sums

• Right Sum

The ∆xi will put us at the right side of the beginning rectangle

1

( ( 1))n

i

f a x i x

The ∆x(i-1) will put us at the left side of the beginning rectangle

• Left Sum

1

( )n

i

f a x i x

Page 40: Approximating the area under a curve using Riemann Sums

2( ) 5, 0, 2.f x x between x and x 2 0 2xn n

1

1

2

1

2

1

2

21

2

21 1

22

1 1

( )

2 20

2 25

2 2 5

2 4 5

2 4 5

2 4 5

n

i

n

i

n

i

n

i

n

i

n n

i i

n n

i i

f a xi x

f in n

in n

in n

in n

in n

in n

2

3 2

2

3 2

2

3 2 3

2

3 2 3

3

3 2

3

2 4 ( 1)(2 1) 56

2 4 2 3 56

2 8 12 4 56

2 8 12 4 306

16 24 8 606

76 24 86

n n n nn n

n n n nn n

n n n nn n

n n n nn n

n n n nn

n n nn

USING RIGHT SUMS

Page 41: Approximating the area under a curve using Riemann Sums

• Take the previous function, graph it, find the area using right sums when n=4.

• Now take the previous slide’s expression and plug in 4 for n.

• What do you notice?• This should always be the case… What happens

when n=100000? What about n=10000000000?

Page 42: Approximating the area under a curve using Riemann Sums

• Do you see how this allows us to bring in the idea of limits and allowing n to go to infinity, with the summation notation we will get the exact area if n approaches infinity.

Page 43: Approximating the area under a curve using Riemann Sums

• Lets use the same function and compute the left sum.

1

( ( 1))n

i

f a x i x

12

1

( ( ))n

i

f a x i x

• The following function is using midpoints.

Page 44: Approximating the area under a curve using Riemann Sums

2( ) 3 ; [3,5]f x x x

56.6666

Complete this using the idea of Riemann sums and the summation formulas. What does the area go

towards when n gets larger?

Page 45: Approximating the area under a curve using Riemann Sums

3 2( ) 2 ; [0,3]f x x x

Page 46: Approximating the area under a curve using Riemann Sums

2( ) 3 4 ; [2,5]f x x x

Page 47: Approximating the area under a curve using Riemann Sums

3 2( ) 4 2 ; [2,6]f x x x

Page 48: Approximating the area under a curve using Riemann Sums

• We could do the same thing with left hand sums but as n get really large both the right hand sum and the left hand sum will converge to the same value.

• Know that when f(x) is increasing on I the right sum will be an overestimate and the left sum will be an underestimate when n is small.

• When f(x) is decreasing on I the right sum will an underestimate and the left sum will be on overestimate.

• But the more and more rectangles we create the better approximations we get, and when n∞ we get an exact value for the area.

Page 49: Approximating the area under a curve using Riemann Sums

• Stop here, homework

Page 50: Approximating the area under a curve using Riemann Sums

• The idea of using summations and the corresponding formulas for i, can be very tedious with just the basic functions we have used so far, the algebra gets even more complicated when you raise something to a higher power or take the square root, it can all still be done using the summation formulas but we have more efficient methods. But it must be understood that these new methods all arose from the foundation of these summation formulas. The more efficient way is called definite integration.

Page 51: Approximating the area under a curve using Riemann Sums

Definition of the Definite Integral

|| || 0 1

lim ( ) ( )n b

i i ai

f c x f x dx

This is called the norm of the partition, it is the width of the largest subinterval. If every subinterval is equal, the partition is regular and the norm is represented by b ax

n

So, as the norm approaches 0, it implies that n approaches infinity (as the subintervals get smaller, there is room for more rectangles)

The number a is called the lower limit of integration and the number b is the upper limit of integration.

Page 52: Approximating the area under a curve using Riemann Sums

Theorem• Continuity Implies Integrability– If a function f is continuous on the closed interval [a,b],

then f is integrable on [a,b].

Page 53: Approximating the area under a curve using Riemann Sums

• With definite integration we will do the same work we did when we integrated in 4.1, but now we will know an “a” and “b” in which the graph will be restricted by and we can then evaluate the integral at those points.

Page 54: Approximating the area under a curve using Riemann Sums

Definitions of Special Definite Integrals

• 1. If f is defined at x=a, then we define

• 2. If f is integrable on [a,b], then we define

( ) 0a

af x dx

( ) ( )a b

b af x dx f x dx

Page 55: Approximating the area under a curve using Riemann Sums

Additive Interval Property

• If f is integrable on the three closed intervals determined by a, b, and c, then

( ) ( ) ( )b c b

a a cf x dx f x dx f x dx

a bc

Page 56: Approximating the area under a curve using Riemann Sums

Properties of Definite Integrals• If f and g are integrable on [a,b] and k is a constant,

then the function of kf and f±g are integrable on [a,b] and

• 1.

• 2.

( ) ( )b b

a akf x dx k f x dx

[ ( ) ( )] ( ) ( )b b b

a a af x g x dx f x dx g x dx

Page 57: Approximating the area under a curve using Riemann Sums

• Homework• Pg. 278 13-18, 33-42