Simpson's Rule

In The Trapezoidal Rule article, we discussed the method of adding up areas of trapezoids to approximate areas under a function. In most cases, using trapezoids results in less error than using rectangles. But, could there be an even more accurate method than the trapezoidal rule? The answer is yes!  Like the Trapezoidal Rule, Simpson's Rule is another numerical integration technique used to approximate an integral that may be too difficult to compute directly. Unlike the Trapezoidal Rule, Simpson's Rule uses quadratic polynomial approximation, making it a more accurate integral estimation technique. Let's take a deeper look as to what we mean!

Get started

Review generated flashcards

Sign up for free
You have reached the daily AI limit

Start learning or create your own AI flashcards

StudySmarter Editorial Team

Team Simpson's Rule Teachers

  • 9 minutes reading time
  • Checked by StudySmarter Editorial Team
Save Article Save Article
Contents
Contents

Jump to a key chapter

    Simpson's Rule Definition and Formula for Area

    Before we get into how this technique is used in practice, let's define this rule!

    Simpson's Rule is an integral approximation technique that divides the area under the curve into smaller curves. The area under each smaller curve is added together to obtain an approximation for the total area under the curve.

    Simpson's Rule Derivation

    Simpson's Rule uses the simple fact that we can build a quadratic equation from any three points. Like the Trapezoidal Rule, Simpson's Rule creates n subintervals. For each pair of consecutive subintervals xi-1, xi and xi, xi+1, Simpson's Rule builds a quadratic equation of the form y=ax2+bx+c through the three points (xi-1, f(xi-1)), (xi, f(xi)), (xi+1, f(xi+1)).

    Using the equation for a quadratic curve, we can find the area under the curve that passes through the points (xi-1, f(xi-1)), (xi, f(xi)), (xi+1, f(xi+1)). Letting xi-1=-h, xi=0, and xi+1=h and integrating over the interval -h, h we have

    area=-hhax2+bx+c dx =a(h3)3+b(h)22+c(h)-a(-h3)3+b(-h)22+c(-h) =2ah33+2ch =h32ah2+6c

    Simpson's Rule derivation using parabolic curve StudySmarterSimpson's Rule builds subintervals of quadratic curves between three points - StudySmarter Originals

    Since the points xi-1=-h, xi=0, and xi+1=h are all on the parabola, we can say

    f(-h)=ah2-bh+cf(0)=cf(h)=ah2+bh+c

    Note that

    2ah2+6c=f(-h)+4f(0)+f(h) =ah2-bh+c+4c+ah2+bh+c =2ah2+6c

    So, we can say that the area under the parabola is

    area=h3f(-h)+4f(0)+f(h)

    However, when applying Simpson's Rule, we usually use more than just one parabolic curve. Essentially, we end up "integrating" a piecewise quadratic function. So, our area equation becomes

    areax3f(xi-1)+4f(xi)+f(xi+1)+x3(f(xi+2)+f(xi+3)+f(xi+4)+...+x3(f(xn-2)+f(xn-1)+f(xn))

    where x is the distance between each xi

    Simpson's Rule derivation using parabolic curves StudySmarterSimpson's Rule builds a parabola from a group of three points and sums the area under each parabolic curve to approximate the total area under the curve - StudySmarter Originals

    Simplifying this equation, we get an approximation for the definite integral of a function f(x) called Simpson's Rule, which states

    abf(x)dxx3f(x0)+4f(x1)+2f(x2)+4f(x3)+2f(x4)+...+2f(xn-2)+4f(xn-1)+f(xn)

    where n is the number of subintervals, x=b-an, andxi=a+ix.

    Just like in the Trapezoidal Rule, increasing n will also increase the accuracy of the integral approximation.

    Simpson's Rule Error

    Unlike the Trapezoidal Rule, where we can determine whether our approximation is an over or underestimate based on the curve's concavity, there are no clear indicators for over or underestimation using Simpson's Rule. However, we can use the relative and absolute errors to find out more about how our estimation compares to the actual value.

    Relative error

    We compute the error of a Simpson's Rule computation by using the relative error formula:

    Relative error=approximation-actualactual×100%=Sn-abf(x)dxabf(x)dx

    where Sn is the Simpson's Rule approximation of the integral.

    Absolute error

    In addition to relative error, the absolute error of our approximation using Simpson's rule can be calculated using the formula for absolute error:

    Absolute error = approximation-actual=Sn-abf(x)dx

    However, as mentioned in The Trapezoidal Rule article, the integral cannot always be computed exactly.

    Error Bounds for Simpson's Rule

    Like the Trapezoidal Rule, Simpson's Rule has an error-bound formula, which describes the maximum possible error of our approximation. For Simpson's Rule, the error-bound formula is

    ESK(b-a)5180n4 for f(IV)(x)K

    where ES is the exact error for Simpson's Rule and f(IV)(x) is the fourth derivative of f(x). K is the fourth derivative's maximum value on the interval [a,b].

    The use of the error bound will make more sense once we work through some examples.

    Advantages and Limitations of Simpson's Rule

    Advantages

    • Simpson's Rule is more accurate than the Trapezoidal Rule

    • Simpson's Rule is exact for cubic functions (of the form y=ax3+bx2+cx+d), quadratic functions, and linear functions

    Why is the Simpson's Rule exact for functions of order 3 and less? The fourth derivative of a function of order 3 and less is 0!

    Limitations

    • As three points are required to make a quadratic curve, Simpson's Rule requires an even number of subintervals n

    • Simpson's Rule performs with low accuracy for highly oscillating functions

    Examples of Using Simpson's Rule to Estimate the Integral

    Example 1

    Use Simpson's Rule to estimate the integral 1411+xdx with n = 6. Then, find the minimum number of subintervals n to ensure a maximum error of 0.001.

    Luckily, the process of Simpson's Rule is very similar to the Trapezoidal Rule.

    Step 1: Find x

    Plugging in our given interval and even number of n subregions:

    x=4-16=12

    Step 2: Plug in known values to Simpson's Rule

    All we need to do from here is plug our known values into the Simpson's Rule formula. Since our interval is [1, 4] and the problem asks us to use n = 6 subregions, xi=0+i12 meaning each subregion has a width of 12 units.

    id="2859391" role="math" 1411+xdx123f(1)+4f(1.5)+2f(2)+4f(2.5)+2f(3)+4f(3.5)+f(4)1612+42.5+23+43.5+24+44.5+150.9164 units2

    Notice how the pattern of the coefficients is 1, 4, 2, 4, 2, ..., 2, 4, 1.

    Step 3: Consider the maximum error bound

    Let's use our error bound formula to see exactly how much of an overestimate our approximation is.

    In the error bound formula ES, our only unknown value is K. However, we can use the fourth derivative of f(x) to find K:

    f(x)=11+x, f'(x)=-1(1+x)2, f''(x)=2(1+x)3, f'''(x)=-6(1+x)4, f(IV)(x)=24(1+x)5

    To find K, we have to consider where f(IV)(x)=24(x+1)5 will reach its maximum value on the interval [1, 4]. We can graph f(IV)(x) to find the maximum value on the interval.

    Simpson's Rule 4th derivative error bound calculation example StudySmarterThe 4th derivative of f(x) = 1/(1+x) attains a maximum at f(1) on the interval [1, 4] - StudySmarter Original

    We can see that the fourth derivative reaches its largest value at f(IV)(1) = 24(1+1)5=34. Now that all the values ofESare known, we can plug in to find our bound.

    ES34(4-1)5180(6)4112800.00078

    At most, the error of our estimation is 0.00078.

    Step 5: Find a minimum n such that the error is at most 0.001.

    Clearly our error for n = 6 is less than 0.001. However, let's find the minimum n necessary to achieve an error of at most 0.001.

    We let n be out unknown in our error bound.

    34(3)5180n40.0011012.5n41012.54n5.641n or -5.641 n

    We can disregard the second solution, -5.641n , in this situation because we cannot have a negative amount of subregions. So, to ensure that our error is at most 0.001, we must use at least 6 subregions.

    If you end up with an odd number of subregions, you must round up to an even number, as required for the Simpson's rule.

    Example 2

    Use Simpson's Rule to approximate the area under the curve of f(x) given in the table below with n = 4.

    x-10123
    f(x)108941

    Step 1: Find x

    Plugging in our given interval and even number of n subregions:

    x=3-(-1)4=1

    Step 2: Plug in known values to Simpson's Rule

    From here, all we need to do is plug our known values into the Simpson's Rule formula. Since our interval is [-1, 3] and the problem asks us to use n = 4 subregions, xi=-1+i meaning each subregion has a width of 1 unit.

    -13f(x)dx13f(-1)+4f(0)+2f(1)+4f(2)+f(3)=1310+32+18+16+1=773 units2

    Simpson's Rule - Key takeaways

    • Simpson's Rule is an integral approximation technique that divides the area under the curve into smaller curves and sums the area under each smaller curve to approximate the total area under the curve
    • For approximating the definite integral of a function f(x), Simpson's Rule states

      abf(x)dxx3f(x0)+4f(x1)+2f(x2)+4f(x3)+2f(x4)+...+2f(xn-2)+4f(xn-1)+f(xn)

      where n is the number of subintervals, x=b-an, and xi=a+ix

    • Simpson's Rule builds a quadratic curve out of each sequential subinterval

    • We can use an error-bound formula to tell us the maximum possible error of our approximation
      • For Simpson's Rule, the error-bound formula is

        ESK(b-a)5180n4for f(IV)(x)K

        where ES is the exact error of Simpson's Rule and f(IV)(x) is the fourth derivative of f(x)

    • While Simpson's Rule is more accurate than the Trapezoidal Rule, Simpson's Rule requires an even number of n subregions
    Frequently Asked Questions about Simpson's Rule

    What is meant by Simpson's rule?

    Simpson's Rule is an integral approximation technique that divides the area under the curve into smaller curves. The area under each smaller curve is added together to obtain an approximation for the total area under the curve.

    What is Simpson's rule example and formula?

    Simpson's Rule estimates the integral of f(x) on the interval [a, b] is (3((b - a)/n))(f(x0) + 4f(x1) + 2f(x2) + 4f(x3) + 2f(x4) + ... + 2f(xn-2) + 4f(xn-1) + f(xn))

    How to find n in simpson's rule?

    In Simpson's Rule, is an even number that represents the number of subintervals used to approximate the integral. If is not specified, use the error bound formula to find the minimum number of subintervals to ensure a low error.

    Why is simpson's rule more accurate?

    Simpson's Rule is more accurate than the Trapezoidal Rule because it uses quadratic equations rather than linear equations to estimate the area of the subinterval.

    What is Simpson's rule in calculus?

    Simpson's Rule is an integral approximation technique that divides the area under the curve into smaller curves. The area under each smaller curve is added together to obtain an approximation for the total area under the curve.

    Save Article

    Discover learning materials with the free StudySmarter app

    Sign up for free
    1
    About StudySmarter

    StudySmarter is a globally recognized educational technology company, offering a holistic learning platform designed for students of all ages and educational levels. Our platform provides learning support for a wide range of subjects, including STEM, Social Sciences, and Languages and also helps students to successfully master various tests and exams worldwide, such as GCSE, A Level, SAT, ACT, Abitur, and more. We offer an extensive library of learning materials, including interactive flashcards, comprehensive textbook solutions, and detailed explanations. The cutting-edge technology and tools we provide help students create their own learning materials. StudySmarter’s content is not only expert-verified but also regularly updated to ensure accuracy and relevance.

    Learn more
    StudySmarter Editorial Team

    Team Math Teachers

    • 9 minutes reading time
    • Checked by StudySmarter Editorial Team
    Save Explanation Save Explanation

    Study anywhere. Anytime.Across all devices.

    Sign-up for free

    Sign up to highlight and take notes. It’s 100% free.

    Join over 22 million students in learning with our StudySmarter App

    The first learning app that truly has everything you need to ace your exams in one place

    • Flashcards & Quizzes
    • AI Study Assistant
    • Study Planner
    • Mock-Exams
    • Smart Note-Taking
    Join over 22 million students in learning with our StudySmarter App
    Sign up with Email