Difference Between Simpsons Rule and 3/8 rule
So, I was studying Numerical Integration from Hildebrand where I came across Simpson's Rule and 3/8 rule. Now, Simpson's rule has an error of order 5 and degree of precision 3, which is same as 3/8 rule. The difference lies in the Lagrange polynomials we use to interpolate.
In 3/8 rule we need an extra computation point, hence I feel it's computationally insufficient as compared to Simpson's rule. Or if we restate Simpson's rule is better. My question lies, does 3/8 rule have any advantage?
Simpson's Rule: $\int_a^b f(x) dx\approx \frac{b-a}{6}\Big{[}f(a)+4f(\frac{a+b}{2})+f(b)\Big{]}$ with error as $\frac{1}{90}\Big{(}\frac{b-a}{2}\Big{)}^5|f^{4}(z)|$
3/8 Rule: $\int_a^b f(x)dx\approx \frac{(b-a)}{8}\Big{[}f(a)+3f(\frac{2a+b}{3})+3f(\frac{a+2b}{3})+f(b)\Big{]}$ with error as $\Big{|}\frac{(b-a)^5}{6480}f^4(z)\Big{|}$
Reference: Wikipedia for Formula
$\endgroup$ 42 Answers
$\begingroup$There are two advantages of the 3/8ths rule: First, the error term is smaller than Simpson's rule.
The second more important use of the 3/8ths rule is for uniformly sampled function integration. Suppose you have a function known at equally spaced points. If the number of points is odd, then the composite Simpson's rule works just fine. If the number of points is even, then you have a problem at the end. One solution is to use the 3/8ths rule. For example, if the user passed 6 samples, then you use Simpson's for the first three points, and 3/8ths for the last 4 (the middle point is common to both). This preserves the order of accuracy without putting an arbitrary constraint on the number of samples.
$\endgroup$ 1 $\begingroup$For Newton-Cotes formulas, when 'n' is an even integer the degree of precision is n+1 and when n is odd degree of precision is'n'(Ref. Numerical Analysis by Burden). Could someone explain how?
$\endgroup$