To get the best deal on Tutoring, call 1-855-666-7440 (Toll Free)
Top

Simpson's Rule

A definite integral can be evaluated either using the fundamental theorem of  calculus or approximated using numerical methods.  To evaluate a definite integral using fundamental theorem of Calculus, we must be able to find the antiderivative applying techniques of integration.  But, it is not often easy or not possible to find the antiderivative of an integral.  Sometimes, as in the case of Scientific Experiments, the function has to be determined from the observed readings.The numerical methods are helpful in approximating the integral in these situations.

The different numerical methods used are,

  1. The left or right approximation using Riemann sums.
  2. The Midpoint Rule
  3. The Trapezoidal rule
  4. Simpson's Rule
Comparing on the basis of error bounds of these approximations, Simpson's rule approximations are more accurate than the other numerical methods mentioned above.

Related Calculators
Cramer's Rule Calculator Product Rule Calculator
 

Composite Simpson's Rule

Back to Top

Riemann sum and Trapezoidal rule approximate the graph between two adjacent points on the graph by the straight line joining them. This against Simpson's Rule makes use of the parabola joining the three adjacent points to approximate the graph. A parabola can be drawn through any three non collinear points. The Simpson formula is also arrived at by dividing the given interval [a,b] into 'n' sub intervals of equal length $\Delta x$ = $\frac{b - a}{n}$. But, n in this case is an even integer. Then, on each consecutive pair of intervals, we approximate the curve y = f(x) $\neq$ 0, by parabolas as shown in the diagram here. A general parabola passes through the consecutive points Pi, Pi+1 and Pi+2.The definite integral is then approximated to the sum of the areas under all such parabolas Composite Simpson's Rule

                                                                    Simpson's Rule - Formula
 $\int_{a}^{b}f(x)dx\approx S_{n}=\frac{\Delta x}{3}[f(x_{0})+4f(x_{1})+2f(x_{2})+4f(x_{3})+.....+2f(x_{n-2})+4f(x_{n-1})+f(x_{n})]$

Simpson's Rule Derivation

Back to Top
Let us first approximate for the division consisting of three points x0 = -h, x1 = 0 and x2 = h.

Simpson's Rule Derivation
Simpson's Rule

An equation to the parabola passing through the Points P0, P1 and P2 can be assumed in the form Ax2 + Bx + C = 0. Hence, the area under the parabola from x = -h to x = h is given by the definite Integral,
$\int_{-h}^{h}(Ax^{2} + Bx + C)dx = 2\int_{0}^{h}Ax^{2}dx + C$                                       

Applying properties of definite Integral for odd and even functions
          $= 2[A\frac{x^{3}}{3} + Cx]_{0}^{h}$
          $= 2[A\frac{h^{3}}{3} + Ch] = \frac{h}{3} (2Ah^{2} + 6C)$

Since the parabola passes through the point (-h,y0), (0.y1) and (h,y2)
$y_{0} = A(-h)^{2} + B(-h) + C = Ah^{2} - Bh + C$
$y_{1} = C$
$y_{2} = Ah^{2} + Bh + C$

From the above three equations, we get
$y_{0} + 4y_{1} + y_{2} = 2Ah^{2} + 6C$
Hence, the area under the parabola = $\frac{h}{3}(y_{0} + 4y_{1} + y_{2})$
Shifting the parabola horizontally to three other values of x with the same interval will not alter the area under the parabola. Thus, the area under the parabola passing through the points P0, P1 and P2 from x = x0 to x = x2 as shown in the first diagram is $\frac{h}{3}(y_{0} + 4y_{1} + y_{2})$

Similarly, the area under the parabola passing through P2, P3 and P4 from x = x2 to x = x4 is
$\frac{h}{3}(y_{2} + 4y_{3} + y_{4})$
Extending this computations to other consecutive double intervals, the composite Simpson's rule is given as,
$\int_{a}^{b}\approx \frac{h}{3}(y_{0} + 4y_{1} + y_{2}) + \frac{h}{3}(y_{2} + 4y_{3} + y_{4}) + ........ \frac{h}{3}(y_{n - 2} + 4y_{n - 1} + y_{n})$
$= \frac{h}{3}(y_{0} + 4y_{1} + 2y_{2} + 4y_{3}2y_{4} + ..........2y_{n - 2} + 4y_{n - 1} + y_{n})$

Even though, we have derived the rule for f(x) ≥ 0, this approximation holds good for any continuous function f. The formula can be easily memorized noting the pattern of the coefficients, 1,4,2,4,2,4.......4,2,4,1.
$\int_{a}^{b}f(x)dx\approx S_{n}$
$= \frac{h}{3}(\sum y_{ends} + 4\sum y_{odds} + 2\sum y_{evens})$

Simpson's Rule Example

Back to Top
Given below are some of the examples on Simpson's Rule.

Solved Examples

Question 1: Evaluate $\int_{0}^{1}$$\frac{dx}{1 + x^{2}}$ using Simpson's 1/3 and 3/8 rule.
Solution:
Divided the range into six equal parts of with h = 1/6 and compute the value of y = $\frac{1}{1 + x^{2}}$ at each point of sub-division.
x0 = 0 then y0 = 1
x1 = x0 + h = $\frac{1}{6}$ then y1 = $\frac{36}{37}$ = 0.97297
x2 = x0 + 2h = $\frac{2}{6}$ then y2 = $\frac{36}{40}$ = 0.90007
x3 = x0 + 3h = $\frac{3}{6}$ then y3 = $\frac{36}{45}$ = 0.8000
x4 = x0 + 4h = $\frac{4}{6}$ then y4 = $\frac{36}{52}$ = 0.6923
x5 = x0 + 5h = $\frac{5}{6}$ then y5 = $\frac{36}{61}$ = 0.5901
x6 = x0 + 6h = $\frac{6}{6}$ = 1 then y6 = $\frac{1}{2}$ = 0.5

Then, by Simpson's 1/3 rule
$\int_{a}^{b}f(x) dx $ = $\frac{h}{3}\left [ \left (y _{0} +y_{n}\right ) +4\left (y _{1}+y_{3}+y_{5}+...+y_{n-1} \right )+2\left (y _{2}+y_{4}+y_{6}+....+y_{n-2} \right )\right ]$

= $\frac{1}{18}[(1 + 0.5) + 4(0.97297 + 0.8 + 0.5901) + 2(0.9 + 0.6923)]$

= $\frac{1}{18}[1.5 + 9.4525 + 3.1846]$

= $(0.055)[1.5 + 9.4525 + 3.1846]$

= 0.7853

By Simpson's 3/8 rule
$\int_{a}^{b}f(x) dx $ = $\frac{3h}{8}\left [ \left (y _{0} +y_{n}\right ) +3\left (y _{1}+y_{2}+y_{4}+y_{5}+...+y_{n-1} \right )+2\left (y _{3}+y_{6}+y_{9}+....+y_{n-3} \right )\right ]$

= $\frac{3}{48}[(1 + 0.5) + 3(0.97297 + 0.9 + 0.6923 + 0.5901) + 2(0.8)]$

= $\frac{1}{16}[1.5 + 9.4663 + 1.6]$

= 0.78539

Question 2: Evaluate the integral $\int_{0}^{1}e^{x}dx$, using Simpson's 1/3 rule.
Solution:
Divide the whole range (0,1) into six equal parts by taking h = 1/6.
x0 = 0 then y0 =e0 = 1
x1 = x0 + h = $\frac{1}{6}$ then y1 = $e^{\frac{1}{6}}$ = 1.1813
x2 = x0 + 2h = $\frac{2}{6}$ then y2 = $e^{\frac{1}{3}}$ = 1.3956
x3 = x0 + 3h = $\frac{3}{6}$ then y3 = $e^{\frac{1}{2}}$ = 1.6487
x4 = x0 + 4h = $\frac{4}{6}$ then y4 = $e^{\frac{4}{6}}$ = 1.9477
x5 = x0 + 5h = $\frac{5}{6}$ then y5 = $e^{\frac{5}{6}}$ = 2.3009
x6 = x0 + 6h = $\frac{6}{6}$ = 1 then y6 = 2.7182

By Simpson's 1/3 rule
$\int_{a}^{b}f(x) dx $ = $\frac{h}{3}\left [ \left (y _{0} +y_{n}\right ) +4\left (y _{1}+y_{3}+y_{5}+...+y_{n-1} \right )+2\left (y _{2}+y_{4}+y_{6}+....+y_{n-2} \right )\right ]$

= $\frac{1}{18} [(1 + 2.718) + 4(1.1813 + 1.6487 + 2.3009) + 2(1.39561 + 1.9477)]$

= 0.055[3.7182 + 20.52422 + 6.6866]

= 1.71828

Simpson's  Rule Integration

Back to Top
Simpson's 1/3 Rule for Integration:

A quick approximation for definite integrals can be got by taking 2 partitions for a small interval [a,b].
When two partitions are made we have
$x_{0}=a$, $x_{1}=\frac{a+b}{2}$ and $x_{2}=b$. Hence the approximation is written as
$\int_{a}^{b}f(x)dx\approx S_{2}=\frac{h}{3}[f(x_{0})+4f(x_{1})+f(x_{2})]$
$=\frac{h}{3}[f(a)+4f(\frac{a+b}{2})+f(b)]$     where $h=\frac{b-a}{2}$

This is known as Simpson's $\frac{1}{3}^{rd}$ Rule of Integration.
Simpson's  Rule Integration


Simpson's $\frac{1}{3}^{rd}$ Rule - Example


Approximate $I= \int_{0}^{\frac{\pi }{2}}Sin(x)dx$ and compare with the exact value of definite integral.
Here, $a = 0$ and $b = \frac{\pi}{2}$
$h = \frac{b - a}{2} = \frac{\pi}{4}$

Using Simpson's $\frac{1}{3}^{rd}$ Rule,
$I\approx S_{2}=\frac{\pi}{4}[f(0)+4f(\frac{\pi}{4})+f(\frac{\pi}{2})]$
$I\approx 1.341$

Applying fundamental theorem of calculus, we get$I =1$.
The approximation is not close enough, as the interval is not really small here. Using composite Simpson's formula with larger partitions would give more accurate results.

Simpson's 3/8 Rule for Integration:
The Simpson's rule stated above can be used only when the number of intervals is an even number.  Simpson's rule also exist when the number of divisions made is a multiple of 3.
Thomas Simpson gave the initial formula for 3 partitions which is known as Simpson's $\frac{3}{8}$ rule and it is given as follows:
$\int_{a}^{b}f(x)dx\approx \frac{3h}{8}[f(a) + 3f(a + h) + 3f(a + 2h) + f(b)]$
where, $h = \frac{b - a}{3}$

Extending this the composite Simpson's $\frac{3}{8}$ rule for 3m partitions is written as
$\int_{a}^{b}f(x)dx\approx \frac{3h}{8}\sum_{k = 1}^{m}(f(x_{3k - 3}) + 3f(x_{3k - 2}) + 3f(x_{3k - 1}) + f(x_{3k}))$
where, $h = \frac{b - a}{3m}$

Simpson's Rule Proof

Back to Top
Consider the given data of a set of (n + 1) values of x and y, namely (x0,y0),(x1,y1),(x2,y2)........,(xn,yn) with xi = x0+ih where i = 1,2,3,....n. If it is required to calculate $\int_{x_{0}}^{x_{n}}f(x) dx$, where y = f(x) is tabulated function. For the proof of Simpson's formula, we can use forward difference interpolation formula

I = $\int_{x_{0}}^{x_{n}}f(x) dx$

= $\int_{x_{0}}^{x_{n}}P_{n}(x) dx$

= $\int_{0}^{n}P_{n}(x_{0}+hu)hdu$

= h$\int_{0}^{n}P_{n}(x_{0}+hu)du$ ........................(i)

Since x = x0 + h u, dx = h du (x0 and h are constant)
So, u = $\frac{x - x_{0}}{h}$ and xi = x0 + ih
Now, if n = 2 i.e. the data consists of just three values as (x0,y0),(x1,y1),(x2,y2), so that differences of order higher than second do not exists.

$ \int_{x_{0}}^{x_{2}}f(x) dx= h\int_{0}^{2}\left [ y_{0}+ u\Delta y_{0}+ \frac{u(u-1)}{2!} \Delta ^{2}y_{0}\right ]$

= $\frac{h}{3}$$[y_0 + 4y_1 + y_2]$ ................................(ii)
Again $\int_{x_{2}}^{x_{4}}f(x) dx$ = $\frac{h}{3}$$[y_2 + 4y_3 + y_4]$ ..........................(iii)

If we continue this process, then we get
$\int_{x_{2n - 2}}^{x_{2n}}f(x) dx$ = $\frac{h}{3}$ $[y_{2n - 2} + 4y_{2n - 1} + y_{2n}]$ ...............(iv)

Adding (ii), (iii) and (iv), we get
$\int_{x_{0}}^{x_{2n}}f(x) dx$ = $\frac{h}{3}\left [ \left (y _{0} + y_{2n}\right ) + 4\left (y _{1} + y_{3} + y_{5} + ... + y_{2n - 1} \right ) + 2\left (y _{2} + y_{4} + y_{6} + .... + y_{2n - 2} \right )\right ]$

Simpson's Rule Formula

Back to Top
In numerical integration, we want to find out the approximate value of the given integral say $\int_{a}^{b}y dx$ without actually integrating the function but only using some values of y at some points of x equally spaced over the interval [a,b]. If we have y = f(x) which is a equally spaced function over [a,b] i.e. if a = x0, x1 = x0 + h, x2 = x0 + 2h ...., xn = x0 + nh, where h is the difference in these terms or we can say that y0 = f(x0), y1 = f(x1), y2 = f(x2),......,yn = f(xn) are the corresponding values of y with each value of x.
We have two Simpson's rule for numerical integration one is 1/3rd rule and another is 3/8 rule.

Simpson's One Third Rule:


$\int_{a}^{b}f(x) dx$ = $\frac{h}{3}\left [ \left (y _{0} +y_{n}\right ) +4\left (y _{1}+y_{3}+y_{5}+...+y_{n-1} \right )+2\left (y _{2}+y_{4}+y_{6}+....+y_{n-2} \right )\right ]$

Simpson's Three Eight Rule:


$\int_{a}^{b}f(x) dx$ = $\frac{3h}{8}\left [ \left (y _{0} +y_{n}\right ) +3\left (y _{1}+y_{2}+y_{4}+y_{5}+...+y_{n-1} \right )+2\left (y _{3}+y_{6}+y_{9}+....+y_{n-3} \right )\right ]$


Related Topics
Math Help Online Online Math Tutor
*AP and SAT are registered trademarks of the College Board.