Presentation is loading. Please wait.

Presentation is loading. Please wait.

MTH1170 Numeric Integration

Similar presentations


Presentation on theme: "MTH1170 Numeric Integration"— Presentation transcript:

1 MTH1170 Numeric Integration

2 Preliminary Numerical Integration allows us to approximate definite integrals that we can not solve using standard methods.  We will learn two methods to approximate definite integrals: 1. Trapezoidal Rule 2. Simpson’s Rule

3 Preliminary Both of these methods are based on the concept of a Riemann Sum. We take n rectangles that fit underneath of a function and add up their area. Because of the shape of these rectangles there will be some error involved.

4 Preliminary One way we could reduce this error would be to change the shape of the rectangles. The two methods we will learn use either trapezoids, or parabolas to approximate area.

5 Trapezoidal Rule Instead of using rectangles the trapezoidal rule uses trapezoids to approximate area.

6 Trapezoidal Rule What we need to know:
How many trapezoids we are to use. How wide the trapezoids are.

7 Trapezoidal Rule The Trapezoidal Rule Formula:

8 How to Use The Trapezoidal Rule
Define the function f(x). This will be the function within the integration. Calculate delta-x using the limits of integration and the number of trapezoids (n) that you will be using to approximate the area. Determine all of the xi values. The first xi value will always be a, the last will always be b, and we can find the other values of xi by using the given formula and incrementing i until you reach i = n. Note that we will always have one more xi term than the number of trapezoids we are using. Plug everything into The Trapezoidal Rule formula paying close attention to the pattern.  Complete the computation and solve.

9 Trapezoidal Rule - Example
Approximate the following integral using the trapezoidal rule with n = 10.

10 Trapezoidal Rule - Example
First we define the function f(x):

11 Trapezoidal Rule - Example
Next, we calculate delta-x:

12 Trapezoidal Rule - Example
Next, we calculate all of the xi terms:

13 Trapezoidal Rule - Example
We now have everything that we need to plug into The Trapezoid Rule formula and solve:

14 Trapezoidal Rule - Example
How close are we to the actual value?

15 Trapezoidal Rule - Example
Use The Trapezoidal Rule to approximate the following integral with n = 5.

16 Simpson’s Rule Simpson’s Rule is very similar to The Trapezoidal Rule, except instead of using trapezoids to approximate the area, it uses parabolas to approximate the area.

17 Simpson’s Rule Formula

18 How to Use Simpson’s Rule
Define the function f(x). This will be the function within the integration. Calculate delta-x using the limits of integration and the number of rectangles (n) that you will be using to approximate the area. Ensure that n is even, otherwise Simpson’s Rule will not work. Determine all of the xi values. The first xi value will always be a, the last will always be b, and we can find the other values of xi by using the given formula and incrementing i until you get to i = n. Note that we will always have one more xi term than the number of rectangles we are using. Plug everything into the Simpson's Rule formula paying close attention to the pattern.  Complete the computation and solve.

19 Simpson’s Rule Example
Approximate the following integral using Simpson’s Rule with n = 6.

20 Simpson’s Rule Example
Approximate the following integral using Simpson’s Rule with n = 6.


Download ppt "MTH1170 Numeric Integration"

Similar presentations


Ads by Google