MATH 150 SUPPLEMENTAL NOTES 23
NUMERICAL INTEGRATION
|
Now we will talk about two numerical methods of integration. If you have used the numerical integration function on your calculator, then you have used one of many numerical integration methods. In computer science and mathematics, there is an area of study called numerical analysis. In numerical analysis, these methods are studied for accuracy and efficiency. Let us now talk about two methods of numerical integration. |
THE TRAPEZOIDAL RULE
|
The Trapezoidal Rule approximates the area under the curve with a sequence of trapezoids. This approximation is better in accuracy than the rectangular approximation method. So, here is the method. |
|
FACT: |
THE TRAPEZOIDAL RULE To approximate
use
(for n subintervals of length h = (b - a)/n and y k = f (x k)). |
|
EXAMPLE 1T: |
Using the trapezoidal rule, estimate the integral
with n = 4 steps. |
|
SOLUTION: Let f (x) = 2x - 1, a = 1, and b = 3. Now to find the step size h.
Now I will complete the following table. |
|
x n |
y n |
|
|
x 0 |
1 |
f (1) = 2 - 1 = 1 |
|
x 1 |
1.5 |
f (1.5) = 3 - 1 = 2 |
|
x 2 |
2 |
f (2) = 4 - 1 = 3 |
|
x 3 |
2.5 |
f (2.5) = 5 - 1 = 4 |
|
x 4 |
3 |
f (3) = 6 - 1 = 5 |
|
Now plug the values into the rule.
|
|
EXAMPLE 2T: |
Using the trapezoidal rule, estimate the integral
with n = 4 steps. |
|
SOLUTION: Let f (x) = x 3 + x, a = 0, and b = 2. Now to find the step size.
Now I will complete the following table. |
|
x n |
y n |
|
|
x 0 |
0 |
f (0) = 0 |
|
x 1 |
0.5 |
f (0.5) = 0.625 |
|
x 2 |
1 |
f (1) = 2 |
|
x 3 |
1.5 |
f (1.5) = 4.875 |
|
x 4 |
2 |
f (2) = 10 |
|
Now plug it into the rule.
|
|
EXAMPLE 3T: |
Using the trapezoidal rule, estimate the integral
with n = 4 steps. |
|
SOLUTION: Let f (x) = sin x, a = 0, and b = p . Now find the step size.
Now I will complete the following table. |
|
x n |
y n |
|
|
x 0 |
0 |
f (0) = 0 |
|
x 1 |
p /4 |
|
|
x 2 |
p /2 |
f (p /2) = 1 |
|
x 3 |
3p /4 |
|
|
x 4 |
p |
f (p ) = 0 |
|
Now to plug these values into the rule.
|
SIMPSON'S RULE
|
Simpson's Rule approximates the area under the curve with a sequence of parabolic arcs. This approximation is the best of the three methods of numerical integration that we will discuss. Here is Simpson's rule. |
|
FACT: |
SIMPSON'S RULE To approximate
use
The y's are the values of f at the partition points x 0= a, x 1 = a + h, x 2 = a + 2h, . . . x n - 1 = a + (n - 1)h, x n = b. The number n is even, and h = (b - a)/n. |
|
EXAMPLE 1S: |
Using Simpson's rule, estimate the integral
with n = 4 steps. |
|
SOLUTION: Let f (x) = 2x - 1, a = 1, and b = 3. The step size is 1/2. Using the table from EXAMPLE 1T, I will now plug the values into Simpson's rule.
|
|
EXAMPLE 2S: |
Using Simpson's rule, estimate the integral
with n = 4 steps. |
|
SOLUTION: Let f (x) = x 3 + x, a = 0, and b = 2. The step size is 1/2. Now using the table from EXAMPLE 2T, I will plug these values into Simpson's rule.
|
|
EXAMPLE 3S: |
Using Simpson's rule, estimate the integral
with n = 4 steps. |
|
SOLUTION: Let f (x) = sin x, a = 0, and b = p . The step size is p /4. Using the table from EXAMPLE 3T, I will plug these values into Simpson's rule.
|
Work through these examples. Both of these methods can be programmed into your computer or calculator. It is advisable to do that when you are going to work with large n. You might want to work the three integrals by hand, and then compare the exact answer to the estimated answers. If you have any questions on the examples or methods, please feel free to contact me.
RETURN TO INDEX