from a handpicked tutor in LIVE 1to1 classes
Simpson's Rule
Simpson's rule is one of the formulas used to find the approximate value of a definite integral. A definite integral is an integral with lower and upper limits. Usually, to evaluate a definite integral, we first integrate (using the integration techniques) and then we use the fundamental theorem of calculus to apply the limits. But sometimes, we cannot apply any integration technique to solve an integral, and sometimes, we do not have a specific function to integrate, instead, we have some observed values (in case of experiments) of the function. In such cases, Simpson's rule helps in approximating the value of the definite integral.
Let us learn this Simpson's Rule and its formula along with its derivation and a few solved examples in the upcoming sections.
1.  What is Simpson's Rule? 
2.  Simpson's Rule Formula 
3.  Simpson's 1/3 Rule Derivation 
4.  How to Apply Simpson's Rule? 
5.  FAQs on Simpson's Rule 
What is Simpson's Rule?
Simpson's rule is used to find the estimated value of a definite integral (that is of the form ^{b}∫ₐ f(x) dx) by approximating the area under the graph of the function f(x). While using the Riemann sum, we calculate the area under a curve (a definite integral) by dividing the area under the curve into rectangles whereas while using Simpson's rule, we evaluate the area under a curve is by dividing the total area into parabolas.
There are 2 variations of Simpson's rule called (i) Simpson's 1/3 rule and (ii) Simpson's 3/8 rule which are as follows:
 Simpson's 1/3 Rule: ^{b}∫_{a} f(x) d x ≈ (h/3) [f(x_{0})+4 f(x_{1})+2 f(x_{2})+ … +2 f(x_{n2})+4 f(x_{n1})+f(x_{n})]
 Simpson's 3/8 Rule: ^{b}∫_{a} f(x) d x ≈ (3h/8) [f(x_{0})+3 f(x_{1})+3 f(x_{2})+2 f(x_{3})+3 f(x_{4})+ 3 f(x_{5})+ … +2 f(x_{n1})+f(x_{n})]
Simpson's rule in general is Simpson's 1/3 rule (which is pronounced as Simpson's onethird rule). We are going to study more about this rule in this page.
Simpson's Rule Formula
We have several numerical methods to approximate an integral, such as Riemann's left sum, Riemann's right sum, midpoint rule, trapezoidal rule, Simpson's 1/3 rule, etc. But among these, Simpson's rule gives the more accurate approximation of a definite integral. If we have f(x) = y, which is equally spaced between [a,b], the Simpson's rule formula is:
 ^{b}∫_{a} f(x) d x ≈ (h/3) [f(x_{0})+4 f(x_{1})+2 f(x_{2})+ ... +2 f(x_{n2})+4 f(x_{n1})+f(x_{n})]
Here,
 n is an even number which is the number of subintervals that the interval [a, b] should be divided into.
(n is usually mentioned in the problem)  x_{0} = a and x_{n} = b
 h = [ (b  a) / n]
 x_{0}, x_{1}, ...., x_{n} are the ends of the n subintervals.
Simpson's Rule Error Bound
Simpson's rule gives just an approximate value of the integral, not the exact value. So there is always an error that can be calculated using the following formula.
 Error bound in Simpson's rule = \(\dfrac{M(ba)^{5}}{180 n^{4}}\),
where \(\leftf^{(4)}(x)\right \leq M\)
Simpson's 1/3 Rule Derivation
Let us derive Simpson's 1/3 rule where we are going to approximate the value of the definite integral ^{b}∫ₐ f(x) dx by dividing the area under the curve f(x) into parabolas. For this let us divide the interval [a, b] into n subintervals [x_{0}, x_{1}], [x_{1}, x_{2}], [x_{2}, x_{3}], ..., [x_{n2}, x_{n1}], [x_{n1}, x_{n}] each of width 'h', where x_{0} = a and xₙ = b.
Now let us approximate the area under the curve by considering every 3 successive points to lie on a parabola. Let us approximate the area under the curve lying between x_{0} and x_{2} by drawing a parabola through the points x_{0}, x_{1} and x_{2}. Of course, all three may not come on a single parabola. But let us try to draw an approximate parabola through these three points.
Let us make this parabola symmetric about the yaxis. Then it becomes something like this:
Let us assume that the equation of the parabola be y = ax^{2} + bx + c. Then the area between x_{0} and x_{2} is approximated by the definite integral:
Area between x_{0} and x_{2} ≈ _{h}∫^{h} (ax^{2} + bx + c) dx
= (ax^{3}/3 + bx^{2}/2 + cx) _{h}^{h}
= (2ah^{3}/3 + 0 + 2ch)
= h/3 (2ah^{2} + 6c) ... (1)
Let us have another observation from the above figure.
 f(x_{0}) = a(h)^{2} + b(h) + c = ah^{2}  bh + c
 f(x_{1}) = a(0)^{2} + b(0) + c = c
 f(x_{2}) = a(h)^{2} + b(h) + c = ah^{2} + bh + c
Now, f(x_{0}) + 4f(x_{1}) + f(x_{2}) = (ah^{2}  bh + c) + 4c + (ah^{2} + bh + c) = 2ah^{2} + 6c.
Substitute this in (1):
Area between x_{0} and x_{2} ≈ h/3 (f(x_{0}) + 4f(x_{1}) + f(x_{2}))
Similarly, we can see that:
Area between x_{2} and x_{4} ≈ h/3 (f(x_{2}) + 4f(x_{3}) + f(x_{4}))
Calculating the other areas in a similar way, we get
^{b}∫ₐ f(x) dx
= h/3 (f(x_{0}) + 4f(x_{1}) + f(x_{2}))
+ h/3 (f(x_{2}) + 4f(x_{3}) + f(x_{4}))
+ ...
+ h/3 (f(x_{n2}) + 4f(x_{n1}) + f(x_{n}))
≈ (h/3) [f(x_{0})+4 f(x_{1})+2 f(x_{2})+ ... +2 f(x_{n2})+4 f(x_{n1})+f(x_{n})]
The like terms are combined here.
Hence we have derived Simpson's formula.
How to Apply Simpson's Rule?
Simpson's 1/3 rule gives a more accurate approximation. Here are the steps that explain how to apply Simpson's rule for approximating the integral ^{b}∫ₐ f(x) dx.
 Step 1: Identify the values of 'a' and 'b' from the interval [a, b], and identify the value of 'n' which is the number of subintervals.
 Step 2: Use the formula h = (b  a)/n to calculate the width of each subinterval.
 Step 3: Divide the interval [a, b] into 'n' subintervals [x_{0}, x_{1}], [x_{1}, x_{2}], [x_{2}, x_{3}], ..., [x_{n2}, x_{n1}], [x_{n1}, x_{n}] using the interval width 'h'.
 Step 4: Substitute all these values in Simpson's rule formula and simplify.
^{b}∫ₐ f(x) dx ≈ (h/3) [f(x_{0})+4 f(x_{1})+2 f(x_{2})+ ... +2 f(x_{n2})+4 f(x_{n1})+f(x_{n})]
Important Notes on Simpson's Rule:
 While applying Simpson's rule, we divide the interval into an even number of subintervals always.
i.e., 'n' must be even always.  Subintervals must be of equal width.
 By Simpson's 1/3 rule:
^{b}∫_{a} f(x) d x ≈ (h/3) [f(x_{0})+4 f(x_{1})+2 f(x_{2})+ ... +2 f(x_{n2})+4 f(x_{n1})+f(x_{n})]
☛Related Topics:
Simpson's Rule Examples

Example 1: Estimate the integral ^{2}∫_{1} e^{x³} d x using Simpson's method by taking n = 4.
Solution:
^{2}∫_{1} e^{x³} d x = ^{b}∫_{a} f(x) d x
Comparing both integrals,
[a, b] = [1, 2] and f(x) = e^{x³}
h = [ (b  a) / n]= (21)/4 = 0.25
So the 4 subintervals are [1, 1.25], [1.25, 1.5], [1.5, 1.75], and [1.75, 2].
By Simpson's 1/3 rule formula,
^{2}∫_{1} f(x) d x ≈ (0.25 / 3) [f(1)+4 f(1.25)+2 f(1.5)+4f(1.75)+f(2)]
= (0.25 / 3)(2.71828182845905 + 28.2027463392796 + 58.4485675624699 + 850.36813958881 + 2980.95798704173)
= 326.724643530062
Answer: ^{2}∫_{1} e^{x³} d x ≈ 326.724643530062.

Example 2: Approximate the integral ^{2}∫_{0} sin √ x d x using Simpson's 1/3 rule formula when n = 8.
Solution:
^{2}∫_{0} sin √ x d x = ^{b}∫_{a} f(x) d x
Comparing both integrals,
[a, b] = [0, 2] and f(x) = sin √ x
h = [ (b  a) / n]= (20)/8 = 0.25
So the 4 subintervals are [0, 0.25], [0.25, 0.5], [0.5, 0.75], [0.75, 1], [1, 1.25], [1.25, 1.5], [1.5, 1.75], and [1.75, 2].
By Simpson's rule,
^{2}∫_{0} f(x) d x ≈ (0.25 / 3) [f(0) + 4 f(0.25)+ 2 f(0.5)+...+ 4f(1.75) + f(2)]
= (0.25 / 3) (0 + 1.91770215441681 + 1.29927387816012 + 3.04703992566516 + 1.68294196961579 + 3.59696858641514 + 1.88143866748289 + 3.87769904361669 + 0.987765945992735)
= 1.52423584761378
Answer: ^{2}∫_{0} sin √ x d x ≈ 1.52423584761378.

Example 3: Find the approximate value of the integral ^{2}∫_{0} √(1 + e^{ x}) dx for n = 4 by applying Simpson's method.
Solution:
^{2}∫_{0} √(1 + e^{ x}) d x = ^{b}∫_{a} f(x) d x
Comparing both integrals,
[a, b] = [0, 2] and f(x) = √(1 + e^{ x})
h = [ (b  a) / n]= (20)/4 = 0.5
So the 4 subintervals are [0, 0.5], [0.5, 1], [1, 1.5], and [1.5, 2].
By Simpson's formula,
^{2}∫_{0} √(1 + e^{ x}) d x ≈ (0.5 / 3) [f(0)+4 f(0.5)+2 f(1)+4f(1.5)+f(2)]
= (0.5 / 3)(1.414213562 + 6.509957014 + 3.85656937 + 9.36520288 + 2.896386731)
= 4.0070549278
Answer: ^{2}∫_{0} √(1 + e^{ x}) d x ≈ 4.0070549278.
FAQs on Simpson's Rule
What is Simpson's Rule?
Simpson's rule is a rule that is used to approximate the complex definite integrals. It says ^{b}∫_{a} f(x) d x ≈ (h/3) [f(x_{0})+4 f(x_{1})+2 f(x_{2})+ ... +2 f(x_{n2})+4 f(x_{n1})+f(x_{n})] . Here the interval [a, b] is divided into n subintervals and x_{0}, x_{1}, x_{2}, ... x_{n} are the ends of the intervals.
How to Apply Simpson's Rule?
To apply Simpson's rule for approximating the integral ^{b}∫ₐ f(x) dx:
 Find the width of each subinterval using h = (b  a)/n.
 Divide the interval [a, b] into 'n' subintervals [x_{0}, x_{1}], [x_{1}, x_{2}], [x_{2}, x_{3}], ..., [x_{n2}, x_{n1}], [x_{n1}, x_{n}] each of width 'h'.
 Substitute these values in Simpson's rule that says:
^{b}∫ₐ f(x) dx ≈ (h/3) [f(x_{0})+4 f(x_{1})+2 f(x_{2})+ ... +2 f(x_{n2})+4 f(x_{n1})+f(x_{n}) ]
How to Derive Simpson's Rule Formula?
To derive Simpson's rule, first, we divide the interval [a, b] into n subintervals each of width h. Then the n intervals would be [x_{0}, x_{1}], [x_{1}, x_{2}], [x_{2}, x_{3}], ..., [x_{n2}, xx_{n1}], [x_{n1}, x_{n}]. Then we draw a parabola that approximately passes through every 3 successive points and approximates the area under the curve with respect to the first and third points. Similarly, we approximate all the areas for every three successive points and add them finally which results in Simpson's method. For more detailed proof, click here.
Why is Simpson's 1/3 Rule Used?
Simpson's 1/3 rule is used to find the approximate value of a definite integral. Usually, we use the fundamental theorem of calculus to evaluate a definite integral. But sometimes, it is not possible to apply any of the integration techniques for the same. In that case, Simpson's 1/3 rule is very useful.
What is the Difference Between Simpson's Rule and the Trapezoidal Rule?
In the Trapezoidal rule, a definite integral is approximated where the area under the curve is divided into trapezoids whereas, in Simpson's method, the area is approximated using the parabolas. Though the Trapezoidal rule and Simpson's rule give approximately the same areas, Simpson's rule gives a more accurate approximation.
What is the Other Name of Simpson's Rule?
Simpson's method is also known as Simpson's 1/3 rule. Another name for Simpson's rule in the German language is the barrel rule.
Can the Number of Intervals in Simpson's Rule be Odd?
No, the interval of the definite integral, while applying Simpson's rule, should be divided into an even number of subintervals always. Simpson's 1/3 rule formula cannot be applied when the number of subintervals is odd.
Is Simpson's 1/3 Rule accurate?
Yes, it is more accurate. Though we have other methods like the midpoint rule, trapezoidal rule, Riemann approximation, etc, we prefer Simpson's formula to approximate a definite integral.
visual curriculum