Presentation is loading. Please wait.

Presentation is loading. Please wait.

Approximate Integration: The Trapezoidal Rule Claus Schubert May 25, 2000.

Similar presentations


Presentation on theme: "Approximate Integration: The Trapezoidal Rule Claus Schubert May 25, 2000."— Presentation transcript:

1 Approximate Integration: The Trapezoidal Rule Claus Schubert May 25, 2000

2 Why Approximate Integration? zCan’t always find an antiderivative Example: zDon’t always know the function

3 First Approach: Riemann Sums zUse left or right Riemann sums to approximate the integral. zLeft Riemann sum:  x : length of the n subintervals x i :endpoints of the subintervals

4 x0x0 x1x1 x2x2 x3x3 Left Riemann Sums By refining the partition, we obtain better approximations. L n is the sum of all the inscribed rectangles starting at the left endpoints. It is called a left endpoint approximation. y x xx f(x0)f(x0) xx f(x1)f(x1) xx f(x2)f(x2)

5 x0x0 x1x1 x2x2 x3x3 Right Riemann Sums y x R n is the sum of all the inscribed rectangles starting at the right endpoints. It is called a right endpoint approximation.

6  If L n underestimates, then R n overestimates, and vice versa Left and Right Endpoint Approximations zObservations:  Approximations get better if we increase n yTake the average of both approximations zIdea for improvement:

7 Trapezoidal Approximation a b h

8 LnLn RnRn x0x0 x1x1 x2x2 x3x3 y x TnTn

9 x0x0 x1x1 x2x2 x3x3 y x TnTn

10

11 An Example As an example, let us look at.

12 An Example

13 Error bounds zQuestion: How accurate is the trapezoidal approximation? zAnswer: where K is an upper bound for | f”(x) |.

14 Error bounds: An Example In our previous example, how large should n be so that the error is less than 0.00001 ?

15 Error bounds: An Example

16 Let’s Wrap Up zApproximations are useful if the function cannot be integrated or no function is given to begin with. zLeft and right endpoint approximations are too inaccurate, so take their average. zThe trapezoidal approximation is much more accurate than the left/right approximations, but better approximations exist (midpoint, Simpson’s etc.)  You need a computer to find approximations with large n - or you need to get a life!!!


Download ppt "Approximate Integration: The Trapezoidal Rule Claus Schubert May 25, 2000."

Similar presentations


Ads by Google