Simpson's Rule Notes
These Simpson's Rule Notes explain how to estimate the value of a definite integral when an exact antiderivative is hard or impossible to find, with the working shown line by line. The interval is cut into an even number of equal strips, and a parabola is fitted through each pair of strips. Adding the areas under those parabolas gives a weighted sum of function values. Simpson's rule is usually far more accurate than the trapezium rule with the same number of strips.
Step-by-step method
- Set up the problem.
- Write the formula.
- Work out the strip width.
- Work out the function values.
- Add the weighted values.
- Multiply by h over 3.
Formula: Simpson's Rule
With h the width of one strip, the end values get weight 1 and the inside values alternate between 4 and 2.
Useful Tips to Remember
The number of strips \(n\) must be even, because the strips are used in pairs. More strips give a better estimate, and doubling \(n\) makes the error roughly 16 times smaller. Simpson's rule is exact for any polynomial up to \(x^{3}\). The function must be defined at every point in the table, so check the ends of the interval first.
Required knowledge
- What a definite integral means, covered in the Definite Integral Calculator.
- How to evaluate a function at a point, covered in the Function Evaluator Calculator.
Where Is Simpson's Rule Used?
Many integrals that appear in real problems have no antiderivative that can be written down, so they are estimated with numerical rules like Simpson's. Engineers use it to find areas and volumes from measured data. In physics it gives the work done from a force measured at equal intervals, and the length of a curve often needs it too. Statistics uses it to find probabilities under the normal curve.
- Arc lengths that cannot be integrated exactly
- Areas and volumes from survey measurements
- Work done from a measured force
- Probabilities under the normal distribution
- Numerical simulations in science and engineering
Simpson's Rule Practice Problems
Example 1 estimates \(\int_{0}^{1} \sqrt{1 + x^{2}} \, dx\) with 4 strips, and Example 2 estimates \(\int_{0}^{1} e^{-x^{2}} \, dx\) with 6 strips. Examples 3 and 4 give you two more of the same kind to try, \(\int_{1}^{2} \frac{1}{x} \, dx,\; n = 4\) and \(\int_{0}^{2} x^{3} \, dx,\; n = 4\). Build the table, add the weighted values and multiply by \(\frac{h}{3}\).
The worked examples below go through the same pattern from start to finish, so you can compare every step with your own working. Try each problem on paper first, then open the example and check your working one step at a time, so you can see exactly which step went wrong if your answer does not match. Use them to check your answers and to understand why each step works.
See Example 1 Hide Example 1
Problem
Approach
Step-by-step method
- Set up the problem.
- Write the formula.
- Work out the strip width.
- Work out the function values.
- Add the weighted values.
- Multiply by h over 3.
Formula
Formula: Simpson's Rule
With h the width of one strip, the end values get weight 1 and the inside values alternate between 4 and 2.
Step 1
Step 1 - Set up the problem.
In this problem: We are approximating \(\int_{0}^{1} \sqrt{x^{2} + 1} \, dx\) with Simpson's rule using \(n = 4\) strips.
Step 2
Step 2 - Write the formula.
In this problem: Simpson's rule fits a parabola through each pair of strips, which is far more accurate than straight lines. The end values are counted once, and the inside values alternate between 4 and 2.
Step 3
Step 3 - Work out the strip width.
In this problem: Dividing the interval into 4 equal strips gives \(h = \frac{1 - 0}{4} = \frac{1}{4}\).
Step 4
Step 4 - Work out the function values.
In this problem: The points start at \(x_{0} = 0\) and go up in steps of \(\frac{1}{4}\). Working out f at each point, rounded to 4 decimal places, gives the table.
Step 5
Step 5 - Add the weighted values.
In this problem: Multiplying each value by its weight and adding gives \(1 + 4 \times 1.0308 + 2 \times 1.118 + 4 \times 1.25 + 1.4142 = 13.7734\).
Step 6
Step 6 - Multiply by h over 3.
In this problem: Multiplying the sum by \(\frac{h}{3}\) gives \(\frac{1}{3} \times \frac{1}{4} \times 13.7734 = \frac{1}{12} \times 13.7734 \approx 1.1478\).
Final Answer
See Example 2 Hide Example 2
Problem
Approach
Step-by-step method
- Set up the problem.
- Write the formula.
- Work out the strip width.
- Work out the function values.
- Add the weighted values.
- Multiply by h over 3.
Formula
Formula: Simpson's Rule
With h the width of one strip, the end values get weight 1 and the inside values alternate between 4 and 2.
Step 1
Step 1 - Set up the problem.
In this problem: We are approximating \(\int_{0}^{1} e^{- x^{2}} \, dx\) with Simpson's rule using \(n = 6\) strips.
Step 2
Step 2 - Write the formula.
In this problem: Simpson's rule fits a parabola through each pair of strips, which is far more accurate than straight lines. The end values are counted once, and the inside values alternate between 4 and 2.
Step 3
Step 3 - Work out the strip width.
In this problem: Dividing the interval into 6 equal strips gives \(h = \frac{1 - 0}{6} = \frac{1}{6}\).
Step 4
Step 4 - Work out the function values.
In this problem: The points start at \(x_{0} = 0\) and go up in steps of \(\frac{1}{6}\). Working out f at each point, rounded to 4 decimal places, gives the table.
Step 5
Step 5 - Add the weighted values.
In this problem: Multiplying each value by its weight and adding gives \(1 + 4 \times 0.9726 + 2 \times 0.8948 + 4 \times 0.7788 + 2 \times 0.6412 + 4 \times 0.4994 + 0.3679 = 13.4429\).
Step 6
Step 6 - Multiply by h over 3.
In this problem: Multiplying the sum by \(\frac{h}{3}\) gives \(\frac{1}{3} \times \frac{1}{6} \times 13.4429 = \frac{1}{18} \times 13.4429 \approx 0.7468\).
Final Answer
See Example 3 Hide Example 3
Problem
Approach
Step-by-step method
- Set up the problem.
- Write the formula.
- Work out the strip width.
- Work out the function values.
- Add the weighted values.
- Multiply by h over 3.
Formula
Formula: Simpson's Rule
With h the width of one strip, the end values get weight 1 and the inside values alternate between 4 and 2.
Step 1
Step 1 - Set up the problem.
In this problem: We are approximating \(\int_{1}^{2} \frac{1}{x} \, dx\) with Simpson's rule using \(n = 4\) strips.
Step 2
Step 2 - Write the formula.
In this problem: Simpson's rule fits a parabola through each pair of strips, which is far more accurate than straight lines. The end values are counted once, and the inside values alternate between 4 and 2.
Step 3
Step 3 - Work out the strip width.
In this problem: Dividing the interval into 4 equal strips gives \(h = \frac{2 - 1}{4} = \frac{1}{4}\).
Step 4
Step 4 - Work out the function values.
In this problem: The points start at \(x_{0} = 1\) and go up in steps of \(\frac{1}{4}\). Working out f at each point, rounded to 4 decimal places, gives the table.
Step 5
Step 5 - Add the weighted values.
In this problem: Multiplying each value by its weight and adding gives \(1 + 4 \times 0.8 + 2 \times 0.6667 + 4 \times 0.5714 + 0.5 = 8.319\).
Step 6
Step 6 - Multiply by h over 3.
In this problem: Multiplying the sum by \(\frac{h}{3}\) gives \(\frac{1}{3} \times \frac{1}{4} \times 8.319 = \frac{1}{12} \times 8.319 \approx 0.6933\).
Final Answer
See Example 4 Hide Example 4
Problem
Approach
Step-by-step method
- Set up the problem.
- Write the formula.
- Work out the strip width.
- Work out the function values.
- Add the weighted values.
- Multiply by h over 3.
Formula
Formula: Simpson's Rule
With h the width of one strip, the end values get weight 1 and the inside values alternate between 4 and 2.
Step 1
Step 1 - Set up the problem.
In this problem: We are approximating \(\int_{0}^{2} x^{3} \, dx\) with Simpson's rule using \(n = 4\) strips.
Step 2
Step 2 - Write the formula.
In this problem: Simpson's rule fits a parabola through each pair of strips, which is far more accurate than straight lines. The end values are counted once, and the inside values alternate between 4 and 2.
Step 3
Step 3 - Work out the strip width.
In this problem: Dividing the interval into 4 equal strips gives \(h = \frac{2 - 0}{4} = \frac{1}{2}\).
Step 4
Step 4 - Work out the function values.
In this problem: The points start at \(x_{0} = 0\) and go up in steps of \(\frac{1}{2}\). Working out f at each point, rounded to 4 decimal places, gives the table.
Step 5
Step 5 - Add the weighted values.
In this problem: Multiplying each value by its weight and adding gives \(0 + 4 \times 0.125 + 2 \times 1 + 4 \times 3.375 + 8 = 24\).
Step 6
Step 6 - Multiply by h over 3.
In this problem: Multiplying the sum by \(\frac{h}{3}\) gives \(\frac{1}{3} \times \frac{1}{2} \times 24 = \frac{1}{6} \times 24 \approx 4\).
Final Answer
Calculator and Practice Mode
Want to check your own working? The Simpson's Rule Calculator solves any problem you type in and shows every step, so you can compare it line by line with your answer and find exactly where a mistake crept in. When you are ready to test yourself, Simpson's Rule Practice gives you a new problem at Easy, Medium or Hard level, checks your answer and shows the full working whenever you get one wrong. Practice Mode is available on the Plus and Pro plans.