In this lesson, you’ll learn how to approximate the integration of a function using a numerical method called Simpson’s Rule. This method is particularly useful when integration is difficult or even impossible to do using standard techniques.
Integration, or anti-differentiation, is a fascinating math idea. We have methods and rules for integrating that work for most f(x) functions we encounter. There are some functions, however, that are difficult if not impossible to integrate using the usual techniques. One application in the real world is calculating the moment of inertia of a Gaussian shaped part. There is no closed-form solution for the integral of a Gaussian curve between two values (other than -∞ to +∞). So what do we do? We use numerical methods like Simpson’s Rule, named after the English mathematician, Thomas Simpson.
Parabolas & Area
The big picture idea behind Simpson’s Rule is finding the area under a parabola between two points. A parabola is a curve resembling the letter U or an upside-down U.
We start by fitting a parabola to the curve between x = 1 and x = 3
For the area between x = 3 and x = 5, we again fit a parabola to the curve:
Origins of the Rule
Simpson’s Rule is an algorithm for finding area. Taking the mystery out of the algorithm can be fun. We’ll do this step by step:
In this first Simpson equation:
The integral f(x), from xo to x2 equals h over 3 times yo plus 4 times y1 plus y2. But what are all these variables?
First of all, f(x) is a parabola.
The separation between the x values is h. Do you see how
x1 = xo + h
x2 = xo + 2h
It’s time for some algebra:
Here, we substituted for x2 and simplified.
Here’s another algebra challenge:
From the difference of the squares.
We’ll use the previous result for x2 – xo and substitute xo + 2h for x2:
Then, we’ll simplify and factor the 2:
Using the difference of the cubes:
We’ll substitute just as we did before:
and expand the bracketed terms:
Grouping and simplifying gives us:
The point of this algebra is to come up with some expressions for proving the first Simpson equation. In the left-hand side (or LHS) of the equation:
f(x), is a parabola:
where α, β and γ are constants defining the parabola curve.
Integrating we get:
plus a constant of integration.
Integrating from xo to x2 gives us:
Now, we’ll substitute the limits:
The parentheses hold the algebra we just worked out. Substituting and simplifying, we get this:
For the right-hand side (or RHS) of the equation, we have this:
Using the expression for the parabola and substituting xo for x gives us yo. We’ll use the same process to get y1 and y2:
Factoring α, β and γ:
Substituting xo + h for x1 and xo + 2h for x2:
Simplifying, we get this:
Which is the same as the LHS! We’ve just shown that the integral of a parabola can be expressed in terms of y values and the separation, h, between the x values.
Now, let’s integrate a function from a to b:
Here’s the first area, Ao:
We write ≈ because the parabola does not fit the curve exactly.
Here’s the second area, A1:
And, the third area, A2:
Adding the areas together, we get the total area of A:
This last line with the alternating 4s and 2s is Simpson’s Rule. In general, we write
Looking for a Similar Assignment? Order now and Get 10% Discount! Use Coupon Code “Newclient”
The post What is Simpson’s Rule? – Example & Formula appeared first on Superb Professors.