Simpson’s Rule Explained Step by Step: Everything You Need to Know

Simpson’s Rule Explained Step by Step: Everything You Need to Know

Simpson’s Rule explained step by step is one of the best ways to understand how this numerical integration method works. In calculus, we often encounter definite integrals that are difficult or impossible to evaluate analytically. Numerical integration provides an alternative by approximating a definite integral using a finite number of calculations. Simpson’s Rule is particularly useful because it can produce highly accurate approximations when the function being integrated is smooth.

In this article, we will examine Simpson’s Rule from both a conceptual and practical perspective. We will begin by introducing the formula and explaining what each part means. Then, we will explore why Simpson’s Rule works and the mathematical ideas behind its accuracy. We will discuss the conditions under which the method succeeds or fails, examine how to calculate an error bound, and walk through the complete Simpson’s Rule procedure. Finally, we will work through several examples.

By the end of this guide, you should not only know how to use Simpson’s Rule, but also understand why it works, and when Simpson’s Rule is an appropriate numerical integration method.

If you need a review of integration before beginning, please refer to the article Basic Integration Problems for Beginners.

What Is Simpson’s Rule?

Simpson’s Rule, like the midpoint rule and trapezoid rule, is a numerical integration method used to approximate a definite integral. Instead of evaluating an integral exactly, Simpson’s Rule estimates the area under a curve by approximating the function with quadratic polynomials. This makes it particularly useful when an antiderivative is difficult or impossible to find.

For a review of the midpoint and the trapezoid rule, please refer to the respective articles How to Use the Midpoint Rule to Approximate Definite Integrals and Trapezoid Rule Examples with Solutions for Beginners.

Suppose we want to approximate the definite integral

$$\int_a^b f(x) dx.$$

Simpson’s Rule divides the interval from \( a \) to \( b \) into an even number of equally sized subintervals. The function is then approximated over pairs of subintervals using parabolic curves.

Before continuing, you may find it helpful to review the article Interpolation Using Lagrange Polynomials in Numerical Analysis: A Complete Tutorial.

The Basic Idea Behind Simpson’s Rule

Consider three consecutive points on the graph of a function:

$$(x_0, f(x_0)), (x_1, f(x_1)), (x_2, f(x_2)).$$

Instead of approximating the curve between these points with straight lines, Simpson’s Rule fits a quadratic polynomial through the three points. The area under this parabola approximates the area under the original function.

This is repeated across the entire interval. Each group of two subintervals is approximated by a parabola, and the resulting areas are added together.

Simpson’s Rule Formula

For a single pair of subintervals, Simpson’s Rule can be written as

$$\int_{x_0}^{x_2} f(x) dx \approx \frac{h}{3}(f(x_0) + 4f(x_1) + f(x_2)),$$

where \( h \) is the width of each subinterval:

$$h = x_1 – x_0 = x_2 – x_1.$$

Notice the coefficients \( 1 \), \( 4 \), and \( 1 \). The middle point receives a weight of \( 4 \), while the two endpoints receive a weight of \( 1 \).

Composite Simpson’s Rule

For larger intervals, we generally use composite Simpson’s Rule. Instead of approximating the entire interval with one parabola, we divide the interval into several smaller subintervals.

Suppose the interval \( [a,b] \) is divided into \( n \) subintervals, where \( n \) must be even. The step size is

$$h = \frac{b – a}{n}.$$

The resulting \( x \)-values are

$$x_0 =a, x_1 = a + h, x_2 = a + 2h, \ldots, x_n = b.$$

The composite Simpson’s Rule formula is

$$\int_a^b f(x) dx \approx \frac{h}{3}(f(x_0) + 4\sum_{i = 1}^{\frac{n}{2}} f(x_{2i – 1}) + 2\sum_{i = 1}^{\frac{n}{2} – 1} f(x_{2i}) + f(x_n).$$

The pattern of coefficients is important: The endpoints receive a coefficient of \( 1 \). The interior points alternate between coefficients of \( 4 \) and \( 2 \), beginning and ending with \( 4 \).

Why Must the Number of Subintervals Be Even?

One of the most important requirements of Simpson’s Rule is that \( n \) must be even.

This requirement comes directly from the way Simpson’s Rule works. Each parabola is constructed using three consecutive points, which cover two subintervals. Therefore, the interval must contain an even number of subintervals so that all of them can be grouped into pairs.

Simpson’s Rule in Geometric Terms

It can help to think of Simpson’s Rule as a method for approximating the area beneath a curve.

The Trapezoidal Rule approximates the curve using straight-line segments. Simpson’s Rule uses parabolic arcs instead. Because many functions have curvature, the parabolic approximation can often follow the curve more closely.

This is one reason Simpson’s Rule is generally more accurate than the Trapezoidal Rule for smooth functions.

However, Simpson’s Rule is not automatically accurate for every function or every situation. Its performance depends on properties of the function and the size of the subintervals. Understanding why Simpson’s Rule works and when it can fail is therefore just as important as knowing its formula.

In the next section, we will examine the mathematical reasoning behind Simpson’s Rule and see why approximating a function with parabolas can produce such accurate results.

Why Does Simpson’s Rule Work?

Simpson’s Rule works because a smooth curve can often be approximated very closely by a quadratic polynomial over a small interval. Instead of finding the exact area under a complicated curve, Simpson’s Rule replaces the curve with a simpler parabola whose area can be calculated exactly. By repeating this process over many small intervals, we can obtain an accurate approximation of the original definite integral.

For a refresher on smooth functions, please refer to the articles Newton’s Method Explained for Beginners and The Ultimate Resource for Understanding the Secant Method.

Approximating a Curve with a Parabola

To understand Simpson’s Rule, consider three equally spaced points on a function:

$$(x_0, f(x_0)), (x_1, f(x_1)), (x_2,f(x_2)).$$

There is exactly one quadratic polynomial of the form

$$p(x) = Ax^2 + Bx + C$$

that passes through these three points.

Simpson’s Rule uses this quadratic polynomial as an approximation to \( f(x) \) between \( x_0 \) and \( x_2 \). Instead of calculating

$$\int_{x_0}^{x_2} f(x),dx,$$

we approximate the integral by calculating

$$\int_{x_0}^{x_2} p(x),dx.$$

Because \( p(x) \) is a quadratic polynomial, its integral can be found exactly.

The important idea is that when \( f(x) \) is sufficiently smooth, the quadratic polynomial passing through three nearby points can provide an excellent approximation to the original function.

Why the Middle Point Gets a Weight of 4

One of the most noticeable features of Simpson’s Rule is the coefficient pattern

$$1, 4, 1.$$

At first, these coefficients may seem unusual. Why should the middle function value count four times as much as either endpoint?

The answer comes from the geometry of the parabola and the mathematics of integrating the quadratic interpolating polynomial. The middle point plays an important role in determining the curvature of the parabola, so its value receives a larger weight.

When the quadratic polynomial is integrated, the resulting expression naturally produces the weights \( 1 \), \( 4 \), and \( 1 \).

For multiple pairs of subintervals, this pattern expands into

$$1, 4, 2, 4, 2, 4, \ldots, 2, 4, 1.$$

The \( 4 \) ‘s correspond to the odd-indexed interior points, while the \( 2 \) ‘s correspond to the even-indexed interior points.

Simpson’s Rule Is Exact for Cubic Polynomials

One of the most important properties of Simpson’s Rule is that it is exact for every polynomial of degree three or less.

At first, this might seem surprising because Simpson’s Rule uses a quadratic approximation. Why can a method based on quadratic interpolation exactly integrate a cubic function?

The error associated with Simpson’s Rule has a special structure. Although the interpolation itself is quadratic, the symmetry of the three-point approximation causes certain error terms to cancel when the quadratic is integrated. As a result, Simpson’s Rule exactly integrates polynomials through degree three.

The Importance of Smoothness

The accuracy of Simpson’s Rule depends heavily on how smoothly the function behaves.

If a function changes gradually and has continuous derivatives, a quadratic polynomial can often approximate it very well over a small interval. As the subintervals become smaller, the parabolic approximations generally become increasingly accurate.

On the other hand, if a function has abrupt changes or discontinuities, a parabola may provide a poor representation of the function.

This is why Simpson’s Rule is particularly effective for smooth, continuous functions.

For a review of continuous functions, please refer to the articles A Complete Introduction to the Bisection Method with Worked Examples and Solutions and How to Solve Equations Using Fixed Point Iteration: A Step-by-Step Guide.

The mathematical error formula makes this idea more precise. Under appropriate conditions, the error depends on the fourth derivative of the function. We will examine this error formula in greater detail later in the article.

Why Increasing the Number of Subintervals Helps

Suppose we divide the interval \( [a, b] \) into a small number of relatively large subintervals. Each parabola must approximate the function over a larger region, so the approximation may not capture every detail of the curve.

Now suppose we increase the number of subintervals. The value of \( h \) becomes smaller: Each parabola is now approximating the function over a smaller region. For a smooth function, the local parabolic approximation becomes increasingly accurate.

In the next section, we will look more closely at when Simpson’s Rule succeeds.

When Does Simpson’s Rule Succeed?

A numerical method does not need to produce an exact answer to be successful. In most applications, success means that the approximation is sufficiently close to the true value of the integral for the purpose at hand. Simpson’s Rule can often achieve this with relatively few subintervals when the function has the right characteristics.

Smooth and Continuous Functions

If \( f(x) \) is continuous and changes smoothly throughout \( [a, b] \), the parabolic approximations used by Simpson’s Rule can generally follow the function quite closely. The smoother the function, the more reasonable it is to expect a local quadratic approximation to represent the function.

Simpson’s Rule Is Exact for Cubic Polynomials

One of the strongest examples of Simpson’s Rule succeeding occurs with polynomials of degree three or less. Simpson’s Rule integrates these functions exactly, provided the method’s standard requirements are satisfied.

When the Subintervals Are Small

Even a smooth function may not be approximated particularly well if the subintervals are too large.

Suppose we want to approximate

$$\int_a^b f(x),dx.$$

The step size is

$$h = \frac{b – a}{n}.$$

As \( n \) increases, \( h \) decreases. This means each parabolic approximation covers a smaller portion of the curve, making the approximation more accurate.

When the Number of Subintervals Is Even

The number of subintervals must be even. This requirement exists because Simpson’s Rule applies one parabola across each pair of subintervals. Therefore, even if a function is smooth, Simpson’s Rule cannot be applied correctly with an odd number of subintervals.

When Does Simpson’s Rule Fail?

Although Simpson’s Rule is a very accurate numerical integration method, it is not appropriate for every problem. In some situations, the standard Simpson’s Rule formula cannot be applied at all. In other situations, it can be applied mathematically but may produce a poor approximation unless the interval is handled carefully.

Understanding when Simpson’s Rule fails is just as important as knowing when it succeeds. A numerical integration method is not simply a formula to memorize. You also need to recognize whether the assumptions behind the formula are satisfied.

An Odd Number of Subintervals

The composite Simpson’s Rule formula requires an even number of subintervals because each parabola covers two subintervals. Therefore, if a problem specifies an odd number of subintervals, then the composite Simpson’s Rule formula cannot be applied.

Discontinuous Functions

A single parabolic approximation over an interval with a discontinuity cannot accurately represent the behavior of the function. If possible, split the integral at the discontinuity, as we did in the article Examples of Improper Integrals with Solutions: A Beginner’s Guide.

Large Subintervals

Suppose the function changes significantly between the points used by Simpson’s Rule. A single parabola may not capture all of the function’s behavior over a large interval.

For example, consider a function with substantial curvature over a long interval. Using only two subintervals might provide a rough estimate, while using ten or twenty subintervals could produce a much more accurate result.

Next, we will examine how to compute the error in Simpson’s Rule.

Error Computation

Understanding error is an important part of numerical integration. It allows us to determine whether an approximation is sufficiently accurate for a particular problem and, in some cases, to determine how many subintervals are needed to achieve a desired level of accuracy.

Absolute Error

Suppose the exact value of a definite integral is

$$I = \int_a^b f(x) dx$$

and Simpson’s Rule produces the approximation

$$S_n.$$

The absolute error is the absolute value of the difference between the exact value and the approximation:

$$E = |I – S_n|.$$

The smaller the absolute error, the more accurate the approximation.

In many practical problems, however, we do not know the exact value of the integral. If we already knew one, there would often be little reason to use numerical integration in the first place.

Fortunately, Simpson’s Rule provides a way to estimate or bound the error without knowing the exact value of the integral.

Simpson’s Rule Error Bound

For the composite Simpson’s Rule, the error bound is

$$\epsilon \leq \frac{(b – a)^5}{180n^4}\max_{a \leq x \leq b}|f^{(4)}(x)|,$$

Where \( a \) and \( b \) are the endpoints of the interval, \( n \) is the numbers of subintervals, and \( f^{(4)}(x) \) is the fourth derivative of \( f(x) \).

If you need a refresher on derivatives, please refer to the article How to Differentiate a Function Step by Step: A Beginner’s Guide.

Why Does the Fourth Derivative Appear?

Recall that Simpson’s Rule is exact for every polynomial of degree three or less. Therefore, the first terms that contribute to the approximation error are associated with higher-order behavior of the function.

The fourth derivative measures how the function deviates from the lower-degree polynomial behavior that Simpson’s Rule integrates exactly.

Now that we understand what Simpson’s Rule is, why it works, when it succeeds or fails, and how to estimate its error, we are ready to put everything together. In the next section, we will walk through the procedure for applying Simpson’s Rule step by step.

Step-by-Step Procedure

Now that we understand what Simpson’s Rule is, why it works, when it succeeds or fails, and how to estimate its error, we can put everything together into a practical procedure.

Step 1: Identify the Interval of Integration

First, identify the lower and upper limits of integration.

For the integral

$$\int_a^b f(x) dx,$$

the lower endpoint is \( a \), and the upper endpoint is \( b \).

Step 2: Choose an Even Number of Subintervals

Next, choose the number of subintervals \( n \). Remember that the composite Simpson’s Rule requires \( n \) to be even:

Step 3: Calculate the Step Size

Once \( a \), \( b \), and \( n \) are known, calculate the width of each subinterval using

$$h = \frac{b – a}{n}.$$

The value of \( h \) is called the step size.

Step 4: Find the \( x \)-Values

Next, determine the \( x \)-values at which the function will be evaluated.

Starting with

$$x_0 = a,$$

each subsequent point is obtained by adding \( h \):

$$x_i = a + ih.$$

The complete set of points is

$$x_0, x_1, x_2, \ldots, x_n.$$

Step 5: Evaluate the Function at Each Point

Now calculate the value of \( f(x) \) at every \( x \)-value.

Step 6: Apply the Simpson’s Rule Formula

Now substitute the function values into

$$\int_a^b f(x) dx \approx \frac{h}{3}(f(x_0) + 4\sum_{i = 1}^{\frac{n}{2}} f(x_{2i – 1}) + 2\sum_{i = 1}^{\frac{n}{2} – 1} f(x_{2i}) + f(x_n).$$

In the next section, we will put this procedure into practice with two worked examples of Simpson’s Rule.

Worked Out Examples

The first example shows how to use Simpson’s Rule.

Example 1: Use Simpson’s Rule to approximate \( \int_0^4 x^2 dx \). Use 4 subintervals and find the absolute error.

Solution: The width of each subinterval is

$$h = \frac{4 – 0}{4}.$$

Subtracting gives

$$h = \frac{4}{4}.$$

Dividing we obtain

$$h = 1.$$

The x-values are then

$$0, 1, 2, 3, 4.$$

Consider the function

$$f(x) = x^2.$$

Evaluating the function at \( x_0 = 0 \) we obtain

$$f(0) = 0^2.$$

Squaring we find

$$f(0) = 0.$$

Evaluating the function at \( x_1 = 1 \) we obtain

$$f(1) = 1^2.$$

Squaring we find

$$f(1) = 1.$$

Evaluating the function at \( x_2 = 2 \) we obtain

$$f(2) = 2^2.$$

Squaring we find

$$f(2) = 4.$$

Evaluating the function at \( x_3 = 3 \) we obtain

$$f(3) = 3^2.$$

Squaring we find

$$f(3) = 9.$$

Evaluating the function at \( x_4 = 4 \) we obtain

$$f(4) = 4^2.$$

Squaring we find

$$f(4) = 16.$$

By Simpson’s Rule, our approximation is then

$$S_4 = \frac{1}{3}(0 + 4(1) + 2(4) + 4(9) + 16).$$

Multiplying gives

$$S_4 = \frac{1}{3}(0 + 4 + 8 + 36 + 16).$$

Adding we get

$$S_4 = \frac{1}{3}(64).$$

Dividing we find

$$S_4 = 0.333333(64).$$

Multiplying, we arrive at

$$S_4 = 21.333333.$$

Integrating gives

$$\frac{x^3}{3}|_0^4.$$

Applying the Fundamental Theorem of Calculus, we obtain

$$\frac{4^3}{3} – \frac{0^3}{3}.$$

Cubing we get

$$\frac{64}{3} – \frac{0}{3}.$$

Dividing this is

$$21.333333 – 0.$$

Subtracting gives

$$21.333333.$$

The absolute error is then

$$\epsilon = |21.333333 – 21.333333|.$$

Subtracting gives

$$\epsilon = |0|.$$

Taking the absolute value, we arrive at a final answer of

$$\epsilon = 0.$$

The next example illustrates one of the primary applications of numerical analysis, namely solving definite integrals without an elementary antiderivative. In this example, we will be using techniques covered in the article How to Find Intervals of Increase and Decrease: A Step-by-Step Guide.

Example 2: Use Simpson’s Rule to approximate \( \int_0^2 e^{x^2} dx \). Use 4 subintervals and find the error bound.

Solution: The width of each subinterval is

$$h = \frac{2 – 0}{4}.$$

Subtracting gives

$$h = \frac{2}{4}.$$

Dividing we obtain

$$h = 0.5.$$

The x-values are then

$$0, 0.5, 1, 1.5, 2.$$

Consider the function

$$f(x) = e^{x^2}.$$

Evaluating the function at \( x_0 = 0 \) we obtain

$$f(0) = e^{0^2}.$$

Squaring we find

$$f(0) = e^0.$$

Exponentiating gives

$$f(0) = 1.$$

Evaluating the function at \( x_1 = 0.5 \) we obtain

$$f(0.5) = e^{0.5^2}.$$

Squaring we find

$$f(0.5) = e^{0.25}.$$

Exponentiating gives

$$f(0.5) = 1.284025.$$

Evaluating the function at \( x_2 = 1 \) we obtain

$$f(1) = e^{1^2}.$$

Squaring we find

$$f(1) = e^1.$$

Exponentiating gives

$$f(1) = 2.718281.$$

Evaluating the function at \( x_3 = 1.5 \) we obtain

$$f(1.5) = e^{1.5^2}.$$

Squaring we find

$$f(1.5) = e^{2.25}.$$

Exponentiating gives

$$f(1.5) = 9.487735.$$

Evaluating the function at \( x_2 = 2 \) we obtain

$$f(2) = e^{2^2}.$$

Squaring we find

$$f(2) = e^4.$$

Exponentiating gives

$$f(2) = 54.598150.$$

By Simpson’s Rule, our approximation is then

$$S_4 = \frac{0.5}{3}(1 + 4(1.284025) + 2(2.718281) + 4(9.487735) + 54.598150).$$

Multiplying gives

$$S_4 = \frac{0.5}{3}(1 + 5.136101 + 5.436563 + 37.950943 + 54.598150).$$

Adding we get

$$S_4 = \frac{0.5}{3}(104.121758).$$

Dividing we find

$$S_4 = 0.166666(104.121758).$$

Multiplying, we arrive at

$$S_4 = 17.353626.$$

Taking the derivative, we get

$$f'(x) = (e^{x^2})’.$$

Using the chain rule, this is

$$f'(x) = (x^2)’e^{x^2}.$$

Taking the derivative, we get

$$f'(x) = 2xe^{x^2}.$$

Taking the derivative again, we get

$$f”(x) = (2xe^{x^2})’.$$

Using the product rule, this is

$$f”(x) = (2x)’e^{x^2} + 2x(e^{x^2})’.$$

Using the chain rule gives

$$f”(x) = (2x)’e^{x^2} + 2x(x^2)’e^{x^2}.$$

Taking the derivatives, we get

$$f”(x) = 2e^{x^2} + 2x(2x)e^{x^2}.$$

Distributing gives

$$f”(x) = 2e^{x^2} + 4x^2e^{x^2}.$$

Factoring out \( e^{x^2} \) this is

$$f”(x) = (2 + 4x^2)e^{x^2}.$$

Taking the derivative once again, we get

$$f”‘(x) = ((2 + 4x^2)e^{x^2})’.$$

Using the product rule, this is

$$f”‘(x) = (2 + 4x^2)’e^{x^2} + (2 + 4x^2)(e^{x^2})’.$$

Using the sum rule and chain rule gives

$$f”‘(x) = ((2)’ + (4x^2)’)e^{x^2} + (2 + 4x^2)(x^2)’e^{x^2}.$$

Taking the derivatives, we get

$$f”‘(x) = (0 + 8x)e^{x^2} + (2 + 4x^2)(2x)e^{x^2}.$$

Adding gives

$$f”‘(x) = 8xe^{x^2} + (2 + 4x^2)(2x)e^{x^2}.$$

Factoring out \( e^{x^2} \) this is

$$f”‘(x) = (8x + (2 + 4x^2)(2x))e^{x^2}.$$

Distributing gives

$$f”‘(x) = (8x + 4x + 8x^3)e^{x^2}.$$

Simplifying gives

$$f”‘(x) = (12x + 8x^3)e^{x^2}.$$

Taking the fourth derivative, we get

$$f^{(4)}(x) = ((12x + 8x^3)e^{x^2})’.$$

Using the product rule, this is

$$f^{(4)}(x) = (12x + 8x^3)’e^{x^2} + (12x + 8x^3)(e^{x^2})’.$$

Using the sum rule and chain rule gives

$$ f^{(4)}(x) = ((12x)’ + (8x^3)’)e^{x^2} + (12x + 8x^3)(x^2)’e^{x^2}.$$

Taking the derivatives, we get

$$ f^{(4)}(x) = (12 + 24x^2)e^{x^2} + (12x + 8x^3)(2x)e^{x^2}.$$

Factoring out \( e^{x^2} \) this is

$$ f^{(4)}(x) = (12 + 24x^2 + (12x + 8x^3)(2x))e^{x^2}.$$

Distributing gives

$$ f^{(4)}(x) = (12 + 24x^2 + 24x^2 + 16x^4)e^{x^2}.$$

Simplifying gives

$$ f^{(4)}(x) = (12 + 48x^2 + 16x^4)e^{x^2}.$$

Taking the fifth derivative, we get

$$ f^{(5)}(x) = ((12 + 48x^2 + 16x^4)e^{x^2})’.$$

Using the product rule, this is

$$f^{(5)}(x) = (12 + 48x^2 + 16x^4)’e^{x^2} + (12 + 48x^2 + 16x^4)(e^{x^2})’.$$

Using the sum rule and chain rule gives

$$ f^{(5)}(x) = ((12)’ + (48x^2)’ + (16x^4)’)e^{x^2} + (12 + 48x^2 + 16x^4)(x^2)’e^{x^2}.$$

Taking the derivatives, we get

$$ f^{(5)}(x) = (0 + 96x + 64x^3)e^{x^2} + (12 + 48x^2 + 16x^4)(2x)e^{x^2}.$$

Adding gives

$$ f^{(5)}(x) = (96x + 64x^3)e^{x^2} + (12 + 48x^2 + 16x^4)(2x)e^{x^2}.$$

Factoring out \( e^{x^2} \) this is

$$ f^{(5)}(x) = ((96x + 64x^3) + (12 + 48x^2 + 16x^4)(2x))e^{x^2}.$$

Factoring 4 from the first factor in the second term, we obtain

$$ f^{(5)}(x) = ((96x + 64x^3) + 4(3 + 12x^2 + 4x^4)(2x))e^{x^2}.$$

This is equivalent to

$$ f^{(5)}(x) = ((96x + 64x^3) + 8x(3 + 12x^2 + 4x^4))e^{x^2}.$$

Factoring out \( 8xe^{x^2} \) this is

$$ f^{(5)}(x) = 8x(12 + 8x^2 + 3 + 12x^2 + 4x^4)e^{x^2}.$$

Simplifying gives

$$ f^{(5)}(x) = 8x(15 + 20x^2 + 4x^4)e^{x^2}.$$

Setting the fifth derivative equal to 0, we obtain

$$0 = 8x(15 + 20x^2 + 4x^4)e^{x^2}.$$

Since \( 8(15 + 20x^2 + 4x^4)e^{x^2} \) is nonzero for all real x we can divide by it to get

$$0 = x.$$

Evaluating the fourth derivative at \( x = 0 \) we obtain

$$ f^{(4)}(0) = (12 + 48(0)^2 + 16(0)^4)e^{0^2}.$$

Squaring and evaluating the fourth power, we find

$$ f^{(4)}(0) = (12 + 48(0) + 16(0))e^0.$$

Exponentiating gives

$$ f^{(4)}(0) = (12 + 48(0) + 16(0))1.$$

Multiplying we get

$$ f^{(4)}(0) = (12 + 0 + 0)1.$$

Adding we obtain

$$ f^{(4)}(0) = (12)1.$$

Multiplying this is

$$ f^{(4)}(0) = 12.$$

Evaluating the fourth derivative at \( x = 2 \) we obtain

$$ f^{(4)}(2) = (12 + 48(2)^2 + 16(2)^4)e^{2^2}.$$

Squaring and evaluating the fourth power, we find

$$ f^{(4)}(2) = (12 + 48(4) + 16(16))e^4.$$

Exponentiating gives

$$ f^{(4)}(2) = (12 + 48(4) + 16(16))54.598150.$$

Multiplying we get

$$ f^{(4)}(2) = (12 + 192 + 256)54.598150.$$

Adding we obtain

$$ f^{(4)}(2) = (460)54.598150.$$

Multiplying this is

$$ f^{(4)}(2) = 25115.149015.$$

The error bound is then

$$\epsilon \leq \frac{(2 – 0)^5}{180(4)^4} (25115.149015).$$

Subtracting gives

$$\epsilon \leq \frac{2^5}{180(4)^4} (25115.149015).$$

Evaluating the fourth and fifth powers, we find

$$\epsilon \leq \frac{32}{180(256)} (25115.149015).$$

Multiplying we get

$$\epsilon \leq \frac{32}{46080} (25115.149015).$$

Dividing we find

$$\epsilon \leq 0.000694(25115.149015).$$

Multiplying, we arrive at a final answer of

$$\epsilon \leq 17.441075.$$

Conclusion

Simpson’s Rule is one of the most useful numerical integration techniques for approximating definite integrals. Instead of representing a curve with straight-line segments, it uses quadratic approximations to capture the function’s curvature. When the function is smooth, this approach can produce very accurate results with few subintervals. In this guide, we have explored Simpson’s Rule explained step by step, from the basic formula to the reasoning behind the method.

Further Reading

The Ultimate Step by Step Guide to Solving Integrals Using Substitution  – Integrals with infinite bounds require a substitution before numerical techniques can be applied. This guide shows how to evaluate integrals using substitution.

Frequently Asked Questions

Simpson’s Rule is particularly useful when you need to approximate a definite integral and the function is sufficiently smooth. It is often more accurate than the Midpoint Rule and Trapezoidal Rule for smooth functions.

If an error tolerance is given, you can use the Simpson’s Rule error bound to determine an appropriate value of \( n \). Otherwise, calculating the approximation with progressively larger even values of \( n \) can help determine whether the result is stabilizing.