For more information, please see full course syllabus of College Calculus: Level II

For more information, please see full course syllabus of College Calculus: Level II

### Simpson's Rule

**Main formula:**

Simpson’s Rule (*n* must be __even__):

**Hints and tips:**

Unlike the formulas for the Trapezoid, Midpoint, and Left and Right Endpoint Rules, this formula is too complicated to derive on the spot, so it is probably worth memorizing.

However, to remember the pattern of the coefficients, it helps to remember that it comes from adding up overlapping sets of the form 1-4-1:

1 - 4 - 1 1 - 4 - 1 1 - 4 - 1, etc.

Simpson’s Rule is

__much__more accurate than any of the Trapezoid, Midpoint, and Left and Right Endpoint Rules, especially for bigger values of*n*. However, it still takes about the same number of function evaluations.

### Simpson's Rule

Lecture Slides are screen-captured images of important points in the lecture. Students can download and print out these lecture slide images to do practice problems as well as take notes while watching the lecture.

- Intro 0:00
- Important Equation 0:03
- Estimating Area
- Difference from Previous Methods
- General Principle
- Lecture Example 1 3:49
- Lecture Example 2 6:32
- Lecture Example 3 9:07
- Additional Example 4
- Additional Example 5

### College Calculus 2 Online Course

I. Advanced Integration Techniques | ||
---|---|---|

Integration by Parts | 24:52 | |

Integration of Trigonometric Functions | 25:30 | |

Trigonometric Substitutions | 30:09 | |

Partial Fractions | 41:22 | |

Integration Tables | 20:00 | |

Trapezoidal Rule, Midpoint Rule, Left/Right Endpoint Rule | 22:36 | |

Simpson's Rule | 21:08 | |

Improper Integration | 44:18 | |

II. Applications of Integrals, part 2 | ||

Arclength | 23:20 | |

Surface Area of Revolution | 28:53 | |

Hydrostatic Pressure | 24:37 | |

Center of Mass | 25:39 | |

III. Parametric Functions | ||

Parametric Curves | 22:26 | |

Polar Coordinates | 30:59 | |

IV. Sequences and Series | ||

Sequences | 31:13 | |

Series | 31:46 | |

Integral Test | 23:26 | |

Comparison Test | 22:44 | |

Alternating Series | 25:26 | |

Ratio Test and Root Test | 33:27 | |

Power Series | 38:36 | |

V. Taylor and Maclaurin Series | ||

Taylor Series and Maclaurin Series | 30:18 | |

Taylor Polynomial Applications | 50:50 |

### Transcription: Simpson's Rule

*We are going to work out a couple more examples on Simpson's Rule.*0000

*We are going to start with the example of the integral from 1 to 2 of x log(x) using Simpson's Rule with n = 4.*0004

*We are integrating from 1 to 2, and we are uisng n=4.*0014

*Remember, for Simpson's Rule, n always has to be even.*0022

*So we break the interval from 1 to 2 into 4 equal pieces.*0026

*So, that means that our breakpoints are 1, 5/4, 3/2, 7/4, and 2.*0030

*Then, that means that δx which is the width of the intervals, is 1/4.*0040

*We are going to invoke Simpson's Rule formula.*0047

*It starts out with x/3, so that is 1/12.*0050

*Then you plug these points into the function you are integrating, in this case x (log(x)).*0059

*Then you attach these coefficients, remember that funny pattern, 1, 4, 2, 4, 2, 4, as many times as you need until the last is 4 and then 1.*0066

*The first point is 1.*0083

*So, 1 × ln(1) + 4 × 5/4 ln(5/4) + 2 × 3/2 ln(3/2) + 4 × 7/4 ln(7/4) + 1 × 2 × ln(2).*0086

*This can be a little simplified, because ln(1) is 0.*0124

*The other values are not common values we know easily.*0139

*This would be something you would plug into a calculator.*0144

*I have already worked it out on my own calculator.*0148

*Here is what you get, 0.6723348708*0150

*To reiterate there, we are estimating an integral as the area under a curve using the Simpson's Rule formula.*0160

*So, that is the answer.*0176

*In our last example today we are going to compare the accuracy of using the midpoint rule and Simpson's Rule,*0000

*Both with n = 4, on the integral from 1 to 2 of x ln(x) dx.*0006

*We just worked out what the answer was using Simpson's Rule.*0015

*The Simpson's Rule gave us the answer 0.6723348708.*0023

*Th midpoint rule is something we did earlier in another lecture.*0037

*I am going to remember what the answer was there.*0046

*That was done as an example in the previous lecture on the trapezoidal rule, the midpoint rule, and the left and right endpoint rules.*0051

*The answer of this integral using n=4 was 0.6344928081.*0056

*Those are the two answers we get using the different estimation rules.*0071

*You can also do this integral directly, the integral from 1 to 2 of x ln(x) dx.*0079

*I am not going to show the details of this but I will tell you how you can figure it out.*0091

*You can use integration by parts,*0095

*And the way you would break it down using integration by parts,*0100

*If you remember the LIATE rule, that was the order in which you look at the functions to use integration by parts.*0106

*LIATE stands for ln, inverse functions, algebraic functions, trigonometric functions, exponential functions.*0110

*Very first on that list is natural log.*0120

*Remember LIATE means you try to make whatever function comes first be the u.*0124

*For integration by parts on this, we see a ln(x), so a good choice is to make u be ln(x), and dv be x dx.*0130

*Then you can work out this integral using integration by parts.*0144

*It takes a couple steps so I will not show the details.*0147

*What you get as the final answer is -x ^{2}/4 + x^{2}/2 × ln(x).*0151

*All of that evaluated from x = 1 to x = 2.*0164

*Then if you plug in those values, you get -3/4 + ln(4).*0170

*If you plug that into a calculator, you get 0.6362943611.*0182

*That is as close as we can come to the true value of the integral.*0196

*Let us see how accurate our two approximation techniques were.*0202

*Let us start with our midpoint approximation.*0205

*If we look at the midpoint - the true value of the integral, remember this was the true value over here.*0210

*If we do the midpoint approximation - the true value, we get - 0.001801553.*0221

*That looks very accurate, because our error here, if we subtract the true value from the midpoint rule approximation.*0235

*Our error is just 0.001.*0245

*Let us look at Simpson's Rule though.*0252

*If we do the Simpson's Rule approximation minus the true value, we get 0.000015469.*0257

*That error is really tiny, very small error using Simpson's Rule.*0272

*In fact, when we calculated the integral using Simpson's Rule, we did not have to do anymore work than the midpoint rule.*0283

*We still were just plugging in those values at 1, 5/4, 3/2, 7/4 and 2.*0292

*So, it was about the same amount of work, but Simpson's Rule is much more accurate.*0300

*Using about the same amount of work.*0310

*So, the moral of the story there is that we have various approximation techniques.*0325

*The trapezoid rule, the midpoint rule, the left and right endpoint rules, and the Simpson's Rule.*0337

*However, by far the most powerful of all of these is the Simpson's Rule.*0340

*It gives us extremely accurate results.*0346

*So that is the end of this lecture.*0350

*Today we are going to talk about Simpson's Rule.*0000

*Simpson's Rule is a way of estimating the value of an integral when you cannot solve it by traditional integration techniques.*0005

*We already learned a few of those, the trapezoidal rule, the midpoint rule, and the left and right endpoint rules.*0011

*Simpson's Rule is based on the same kinds of ideas but it is a little more sophisticated.*0017

*We will see later on that the answers it gives are a lot more accurate.*0023

*The idea here is that we are trying to estimate the area under a curve, y = f(x).*0029

*Just as we did with the previous rules, what we are going to do is divide the input into partitions.*0039

*An important difference between Simpson's Rule and the previous ones is that we have to use an even number of partitions.*0050

*Just as before, we have an x _{0}, x_{1}, x_{2}, up to x_{n}, but remember n has to be even now.*0058

*The principle of Simpson's Rule is that you look at those partitions two at a time.*0072

*Let me draw an expanded version of that.*0073

*So you look at two partitions here, and you have got the function above there.*0078

*What you do is look at the three values on the boundaries of those partitions and you draw a parabola through it, through those three values.*0084

*Then you find the area under that parabola and you add up those areas.*0109

*So, you find this area and you add all those up and that gives you your approximation of the value of the integral.*0116

*Finding the formulas to calculate that area would be a little bit tedious if you had to do it every time, so I will just give you the answer.*0124

*The answer turns out to be, for the area under one parabola, δx/3, remember δx is the width of one of these three partitions,*0133

*Times the value of f(x) at these three points multiplied by certain coefficients.*0145

*The coefficients are 1, 4, 1, which is kind of strange but that is just the way the math works out.*0153

*And then you go through, and you do this over each set of partitions, over the entire area.*0160

*What you end up doing is you end up adding 1, 4, 1, and then 1, 4, 1, for the next one but that overlaps here *0168

*Because remember the last endpoint of one set of partitions is the first endpoint of the next set.*0179

*And then 1, 4, 1 and so on for however many double partitions you have.*0186

*Then you add up those coefficients and you got 1, 4, 2, 4, 2, 4, 1.*0193

*You get this funny pattern 1, 4, 2, 4, and that keeps alternating until the final coefficient is 1.*0202

*So that is where we get the final formula for Simpson's Rule. *0210

*This δx/3 and then the coefficients 1, 4, 2, 4, 2, 4, 1, for however many partitions you have.*0215

*Let us try that out with some examples and you will see how it works.*0225

*The first example we are going to do is the integral of sin(x) as x goes from 1 to 2.*0229

*That is an integral that you could do without using Simpson's Rule.*0236

*Certainly we know what the integral of sin(x) is, but it is an easy function to practice using Simpson's Rule on.*0239

*What we are going to do is look at the interval from 1 to 2, and it says to use n = 4, so we are going to divide that into 4 sub-intervals.*0248

*That means that δx is (b - a)/4, so δx is 1/4*0265

*Our points that we are going to check are x _{0} = 1, x_{1} = 5/4 because we are going over by 1/4 each time, x_{2} = 3/2, x_{3} = 7/4, and x_{4} = 2.*0276

*The Simpson's Rule formula, so δx/3, so that is 1/12, times f(left endpoint), *0302

*So that is sin(1) + 4sin(5/4) + 2sin(3/2) + 4sin(7/4) and remember that the last coefficient is 1, so we get + sin(2).*0310

*That is our approximation for the area.*0340

*Now it is just a matter of plugging those values into a calculator.*0347

*Take your calculator and plug these values in and I have already actually worked it out on my calculator, and it turned out to be 0.9564700541.*0352

*That is our guess for this area using Simpson's Rule*0383

*So let us try that out on a slightly more complicated example.*0391

*It is the same integral, but now we are going to use n = 8, so we have a much finer partition there.*0393

*Now δx is 1/8 and our partition points are x _{0} = 1, x_{1} = 9/8, x_{2} = 5/4, all the way up to x_{8} = 2.*0406

*So, our Simpson's rule formula says we do δx/3, *0434

*So, that is 1/8/3, so 1/24 × (sin(1) + 4sin(9/8) + 2sin(5/4) + 4sin(11/8) + 2sin(3/2) + 4sin(13/8) + 2sin(7/4) + 4sin(15/8) + 1sin(2)).*0436

*Again, that is a complicated expression but it is easy enough if you just plug it into your calculator.*0511

*I already have worked it out and what I got was 0.9564504421.*0519

*That is what we get using Simpson's Rule, using more partitions, n=8 instead of n=4.*0536

*Remember n has to be even every time in order for this formula to work.*0543

*Our next example is to look back at the two previous examples and compare the accuracy of using n = 4 and n = 8.*0548

*Now, in order to do this, to say how accurate they are, we really need to know the true value of this integral.*0558

*This is an easy integral to solve using calculus 1 techniques.*0564

*The true value is the integral from 1 to 2 of sin(x) dx, which is, well the integral of sin is -cos.*0569

*Evaluated from x = 1 to x = 2, so -cos(2) + cos(1)*0587

*Again if you plug that into a calculator, you will get 0.9564491424.*0600

*That is the true value of the integral, but we are interested in figuring out how accurate our approximations using Simpson's Rules were.*0617

*Let us look at the n = 4 values, remember that was 0.9564700541, and if we subtract the true value from that, what you get is 0.000020912.*0624

*That is extremely accurate.*0661

*We get 4 decimal places of accuracy using n = 4.*0665

*But let us try n = 8.*0671

*The value we had was 0.9564504421, and if we subtract the true value from that, what you end up with is 0.000001300, *0674

*Which is much smaller than what we got with n = 4.*0706

*The point of that is that using n = 8 gave us a much more accurate result than using n = 4 did.*0715

*The conclusion there is that n = 8 is much more accurate.*0723

*OK, that finishes this section on Simpson's Rule.*0739

1 answer

Last reply by: Dr. William Murray

Wed Apr 3, 2013 11:45 AM

Post by Philip Studler on February 7, 2013

I meant example 4

1 answer

Last reply by: Dr. William Murray

Tue Apr 2, 2013 12:37 PM

Post by Philip Studler on February 7, 2013

Whenever did Example 1 I got .6313098298 instead of .6723348708

2 answers

Last reply by: Dr. William Murray

Tue Apr 2, 2013 12:45 PM

Post by Edward Xavier on January 3, 2013

based on the results you got in Example 5...how do you say that Simpson's Rule is more accurate?, because I see that you have made a mistake while subtracting the TRUE value from the value you got using Simpson's Rule.