 Hello. Welcome to the GVSU Calculus Screencasts. Today, we're going to talk about Simpson's Rule. Simpson's Rule is a method for approximating definite integrals. We've seen in the past how we can use left, right, and midpoint sums to approximate definite integrals. But in this screencast, we'll talk about Simpson's Rule. We'll explain where it comes from and investigate its accuracy as an approximation technique. All the approximation techniques we've used so far, left sums, right sums, middle sums, trapezoid sums, use line segments to approximate our integrand. Simpson's Rule, however, uses quadratics to approximate our function on the subintervals rather than linear functions. So let's look at Simpson's Rule through an example. Consider the integral from negative 1 to 2 of f of x dx, where we'll use f of x equals 1 plus x over 1 plus x squared. To use Simpson's Rule, like every other integral approximation technique, we start by partitioning the integral negative 1 to 2. In this case, let's do it into two subintervals of equal length. Some notation. We'll let x sub 0 be the left endpoint, negative 1. x sub 1, the midpoint of this interval, and x sub 2, the right endpoint, 2. Now what we do is we fit a quadratic polynomial, q of x, into these three points, x0, f of x0, x1, f of x1, and x2, f of x2. Here we see the graph of f in blue and the graph of q in red. And you can see that q is a quadratic that passes through the three points that we've selected. In the previous slide, we could see that the one quadratic approximation to our function f wasn't very good. But of course, if we use more partition points and more quadratics, we'll get better approximations. On the left in this picture, we see that we have an approximation using two quadratics. In the middle, we have an approximation using three quadratics. And on the right, we have an approximation using four quadratics. And you can see that this approximation using four quadratics almost lies entirely right on top of the graph of f. So we should expect to get a really good approximation that way. Now let's go back and examine this situation a little bit using that one quadratic approximation that we saw earlier. If we were to do some algebra, which we're not going to do here, we would see that if we integrated from negative one to two that quadratic q of x dx, we'd end up with the expression one-third times f of x0 plus four f of x1 plus f of x2 times delta x over two, where delta x here is x2 minus x0. And the reason for the delta x over two is that remember we had to choose that midpoint of the subinterval to get a third point to fit our quadratic through. Now if we did a little more algebra, that expression on the right at the top could be written as two-thirds times f of x1 delta x plus one-third times the average of f of x0 plus f of x2 over two times delta x. Now you may recognize the blue and the red, in fact that blue expression is just the midpoint sum using one subinterval and that red expression is the trapezoid sum using one subinterval. So we can actually view this Simpson's approximation, this approximation with quadratics, as a weighted average of the midpoint sum and the trapezoid sum. So in general, we'll define the Simpson sum, s sub n, as that weighted average, two-thirds of the midpoint sum plus one-third of the trapezoid sum. So now we'll use Simpson's rule to approximate this integral we started with, integral from negative one to two, one plus x over one plus x squared dx. Now to calculate a Simpson's sum, we have to calculate the middle sum and the trapezoid sum and take a weighted average. And remember the trapezoid sum is just the average of the left and the right sums. So if we calculate the middle sum, the left sum and the right sums, then we can get the trapezoid sum and then the Simpson's sum. I used geogibra to get the left, right and midpoint sums for this integral using 10, 20, 30, 40 and 50 subintervals. And the results are shown in this table. Now to get the trapezoid sum, we'll just average the left and the right sums. And then to get the Simpson's sum, we take the weighted average two-thirds of the middle sum plus one-third of the trapezoid sum. And we'll summarize the results on the next slide. So here we can see the trapezoid sums using the average of the left and right sums and the Simpson's sums using this weighted average of the middle sums and the trapezoid sums. One thing to note about the Simpson's sums is that they all agree to five decimal places. Now to put these approximations in context, we can actually calculate the exact value of this integral of one plus x over one plus x squared dx from negative one to two. So pause the video for a moment and do this calculation and then return when you're ready. We can split up the integrand into one over one plus x squared plus x over one plus x squared. One of those pieces integrates as an arc tangent. The other one we can do with a substitution. So we can see that an antiderivative for one plus x over one plus x squared is one-half ln x squared plus one plus the arc tangent of x. That makes the value of the definite integral of negative one to two of one plus x over one plus x squared dx approximately 2.35069. Returning back to the table of approximations we made, we can see that the Simpson's rule approximation is accurate to five decimal places, even using as few as ten sub-intervals. We should also note that the Simpson's sum approximation is much more accurate than either the trapezoid or the middle sum approximations using the same value then. One of the reasons that the Simpson's sum approximation is better than the trapezoids or the middle sums is that we're using quadratics to approximate the integrand rather than the line segments. And it's generally much better to approximate a curve with another curve than with a line. Also, with the Simpson's sum approximation, we have to split each sub-interval in half to find that quadratic. So that effectively doubles the number of sub-intervals we use when calculating a Simpson's sum approximation. So in the end, we obtain a much better approximation with the Simpson's sum than with our other approximations, and it only involves just a little bit of extra work. Well, that concludes our screencast on Simpson's rule, and we hope to see you back here again soon.