Numerical Integration Review of Left and Right Sums
We first encourage you to review left and right sums in class. For more information
click here The Midpoint Approximation
To get a better approximation of , for example, Notice that the first midpoint is at 2.25 and each rectangle width
5 - 2
The new numbers are as follows:
2.25 + 0(.5),
2.25 + 1(.5), 2.25 + 2(.5), 2.25 + 3(.5), 2.25 + 4(.5), 2.25 + 5(.5) (2.25 + 0(.5))2, (2.25 + 1(.5))2, (2.25 + 2(.5))2, (2.25 + 3(.5))2, (2.25 + 4(.5))2, (2.25 + 5(.5))2 We see that the ith rectangle has y-coordinate: height = (2.25 + i(.5))2 To get the area of the ith rectangle we multiply the height by the base: (2.25 + i(.5))2(.5) Finally to get the total area we add the terms up:
S(2.25 +
i(.5))2(.5) = 38.9975
This approximation is called the midpoint approximation
and is given in general by
The Trapezoidal Approximation A fourth method involves the trapezoidal rule which geometrically calculates the area of the trapezoid with base on the x-axis and heights f(xi) and f(xi+1) The area of the trapezoid is
Dx
Use the trapezoidal approximation with three trapezoids to approximate the integral
Solution The picture is shown below.
The x values of interest are x0 = 0, x1 = 4, x2 = 8, x3 = 12 Plugging in these values into the function gives f(0) = 0, f(4) = 0.6154, f(8) = 0.8649, f(12) = 0.9351 The trapezoid approximation formula gives
12 - 0 = 7.7914 We can compare this with the true answer of 7.8475.
Exercise Use the Trapezoidal Approximation with 5 trap to approximate the integral
Error The error in approximating an integral can be found by subtracting the true value from the estimated value. The graphs show that the error is directly inked to the concavity of the integrand. Without proof, bounds for the errors using the midpoint and trapezoid approximations are:
B(b - a)3
B(b - a)3
Where
Example:
so we find 7864 < .001(24n2) n2 < 327667
Taking square roots of both sides gives Simpson's Estimate We saw that the Trapezoidal and Midpoint estimates
provided better accuracy than the Left and Right endpoint estimates. It
turns out that a certain combination of the Trapezoid and Midpoint estimates is
even better.
Let n be even then using the even subscripted x values for the
trapezoidal estimate and the midpoint estimate, gives Notice the Example Use Simpson's Approximation with n = 6 to
approximate Solution The key values of x are x0 = 1, x1 = 1.5, x2 = 2, x3 = 2.5, x4 = 3, x5 = 3.5, x6 = 4 and the function values are f(x0) = .5, f(x1) = .2286, f(x2) = .1111, f(x3) = .0602, f(x4) = .0357, f(x5) = .0228, f(x6) = .0154 Now we can put these numbers into the Simpson's approximation formula.
4 - 1 = .3426
Exercise Use Simpson's approximation with n = 4 to approximate
Without proof, we state Let
M(b - a)5
Example Taking
fourth roots gives
Exercise If you want to approximate
with n = 5, determine the maximum errors that occur using the midpoint, the trapezoidal, and Simpson's approximation.
|