Simpson's Rule Calculator
This Simpson's Rule Calculator estimates the value of a definite integral when an exact antiderivative is hard or impossible to find, and shows the working 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. Build the table, add the weighted values and multiply by \(\frac{h}{3}\). For two more free worked examples, check out the Simpson's Rule Notes.
The worked examples below go through the same pattern from start to finish, so you can compare every step with your own working. For more practice, the notes page goes further with extra worked examples and fuller explanations of the ideas behind each step. Use them together 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
Notes and Practice Mode
Want to understand the method more deeply? The Simpson's Rule Notes go through the same pattern with extra worked examples and fuller explanations of the ideas behind each step, so you can see why every step works and not just what to do. 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.
Login and upgrade to Plus to unlock the full step solution.
Example Problems
Click one to load it into the box and solve it.