5.5 Numerical Integration. concave down concave up concave down concave up concave down

Embed Size (px)

DESCRIPTION

Using integrals to find area works extremely well as long as we can find the antiderivative of the function. Sometimes, the function is too complicated to find the antiderivative. At other times, we don’t even have a function, but only measurements taken from real life. What we need is an efficient method to estimate area when we can not find the antiderivative.

Citation preview

5.5 Numerical Integration concave down concave up concave down concave up concave down Using integrals to find area works extremely well as long as we can find the antiderivative of the function. Sometimes, the function is too complicated to find the antiderivative. At other times, we dont even have a function, but only measurements taken from real life. What we need is an efficient method to estimate area when we can not find the antiderivative. Approximation of Area Under a Curve Trapezoidal Rule: ( h = width of subinterval ) This gives us a better approximation than either left or right rectangles. The table below records the outside temperature every hour from noon until midnight. What was the average temperature for the 12-hour period? Actual area under curve: Left-hand rectangular approximation: Approximate area: (too low) Approximate area: Right-hand rectangular approximation: (too high) Averaging the two: 1.25% error (too high) Averaging right and left rectangles gives us trapezoids: (still too high) Compare this with the Midpoint Rule: Approximate area: (too low)0.625% error The midpoint rule gives a closer approximation than the trapezoidal rule, but in the opposite direction. Midpoint Rule: (too low)0.625% error Trapezoidal Rule: 1.25% error (too high) Notice that the trapezoidal rule gives us an answer that has twice as much error as the midpoint rule, but in the opposite direction. If we use a weighted average: This is the exact answer! Oooh! Ahhh! Wow! This weighted approximation gives us a closer approximation than the midpoint or trapezoidal rules. Midpoint: Trapezoidal: twice midpointtrapezoidal Simpsons Rule: ( h = width of subinterval, n must be even ) Example: Simpsons rule can also be interpreted as fitting parabolas to sections of the curve, which is why this example came out exactly. Simpsons rule will usually give a very good approximation with relatively few subintervals. It is especially useful when we have no equation and the data points are determined experimentally. Example: Use Simpsons Rule with n=4 to approximate the value of. What is the error? No error!! For most functions, Simpsons Rule gives a better approximation to an integral than the Trapezoidal Rule for a given value of n. Sketch the graph of a function on a closed interval for which the Trapezoidal Rule obviously gives a better approximation than Simpsons Rule for n = 4. Activity