Vous êtes sur la page 1sur 4

# Deriving Simpsons Rule Using Newton Interpolation

## Almost every numerical integration technique is based on the idea of fitting a

series of polynomials to successive sets of (usually uniformly spaced) points from (x0, y0),
(x1, y1), , (xn, yn), approximating the area under each portion of a curve with the area
under the corresponding polynomial, and summing the results. For instance, Simpsons
rule fits one quadratic function to the three points (x0, y0), (x1, y1), and (x2, y2), then
another quadratic to the next three points (x2, y2), (x3, y3), and (x4, y4), and so forth.

Simpsons rule is typically derived in one of two ways, either by using the
Lagrange interpolation formula (particularly in numerical analysis courses) or, more
frequently (in calculus courses), by writing the quadratic in the form Q(x) = A + B(x x0)
+ C(x x0)2 for the first polynomial and then setting up a system of linear equations in the
three unknowns based on the three points to solve for A, B, and C. With the latter
approach, if the first three points are (x0, y0), (x1, y1) = (x0+h, y1), and (x2, y2) = (x0+2h, y1),
then

## At = x0 + 2h: Q(x2) = A + B(x0 x0 - 2h) + C(x0 x0 - 2h)2 = A - 2hB + 4h2C = y2.

Some relatively simple algebra lets you solve this system of equations for the three
coefficients and then a simple integration from x0 to x0 + 2h of the resulting quadratic
function gives an approximation to the area under the original curve. When repeated over
successive sets of points, Simpsons Rule results.

## Alternatively, with the Lagrange Interpolation approach using the formula

( x - x1 )( x - x2 ) ( x - x0 )( x - x2 ) ( x - x0 )( x - x1 )
Q( x) = y0 + y1 + y2 ,
( x0 - x1 )( x0 - x2 ) ( x1 - x0 )( x1 - x2 ) ( x2 - x0 )( x2 - x1 )

## we substitute the three points to get

( x - x1 )( x - x2 ) ( x - x0 )( x - x2 ) ( x - x0 )( x - x1 )
Q( x) = y0 + y1 + y2
( x0 - x1 )( x0 - x2 ) ( x1 - x0 )( x1 - x2 ) ( x2 - x0 )( x2 - x1 )
( x - x0 - h)( x - x0 - 2h) ( x - x0 )( x - x0 - 2h) ( x - x0 )( x - x0 - 2h)
= y0 + y1 + y2
( x0 - x0 - h)( x0 - x0 - 2h) ( x0 + h - x0 )( x0 + h - x0 - 2h) ( x0 + 2h - x0 )( x0 + 2h - x0 - h)

## ( x - x0 - h)( x - x0 - 2h) ( x - x0 )( x - x0 - 2h) ( x - x0 )( x - x0 - 2h)

= y0 2
+ y1 2
+ y2 . (2)
2h -h 4h 2

We could either expand this and collect like terms and then integrate from x0 to x0 + 2h to
approximate the first strip under the curve or perform the integration using integration by
parts.

## In this article, we look at an alternative approach to derive Simpsons rule, one

that can be easily extended to derive numerical integration methods of higher degree and
which seems to be more direct, more in the spirit of a calculus course, and perhaps more
elegant. It is based on Newtons forward difference interpolating formula. See  for a
discussion of how to introduce these ideas into precalculus or algebra courses, which sets
the state for the following discussion at the calculus level. In general, the Newton
polynomial based on the n + 1 points (x0, y0), (x1, y1), , (xn, yn), where the xs are
uniformly spaced with x = x1 - x0 = x2 x1 = = xn xn 1, is the nth degree polynomial

Dy D2 y D3 y
Pn ( x) = y0 + Dx0 ( x - x0 ) + (Dx)02 ( x - x0 )( x - x1 ) + (Dx)03 ( x - x0 )( x - x1 )( x - x2 ) + ...
Dn-1 y
+ (Dx )n-01 ( x - x0 )( x - x1 )( x - x2 ) L ( x - xn -1 )

## In this expression, the successive differences of the y-terms are

Dy0 = y1 - y0 , D 2 y0 = y2 - 2 y1 + y0 , D3 y0 = y3 - 3 y2 + 3 y1 - y0 ,...

## In particular, the Newton quadratic polynomial is

Dy D2 y
P2 ( x) = y0 + Dx0 ( x - x0 ) + (Dx)02 ( x - x0 )( x - x1 ). (1)

## Deriving Simpsons Rule Since a quadratic polynomial is determined by three points,

starting with x0, x1, and x2, and then x2, x3, and x4, and so on, it is necessary that the
number of points n be an even integer. The quadratic Newton interpolating polynomial
based on the first three points (x0, y0), (x1, y1), and (x2, y2) is then Equation (1) and the
associated area under that quadratic from x = x0 to x = x2 is
x2 Dy D2 y
Area = y0 + Dx0 ( x - x0 ) + ( Dx)02 ( x - x0 )( x - x1 )
dx
x0
Dy ( x - x0 )
2 x2 x2 D2 y
= y0 (2Dx) + Dx0 + ( Dx )02 ( x - x0 )( x - x1 )dx.
2 x0 x0

In this expression, the second term easily simplifies and the third term can be integrated
quickly using integration by parts to yield

Dy (2Dx) D2 y ( x - x0 )( x - x1 ) ( x - x1 ) 2
2 2 x2
D2 y x2
Area = y0 (2Dx) + Dx0
2
+ ( Dx )02
2 x0
- ( Dx)02
x0 2
dx

D 2 y ( x - x1 )
3 x2
= y0 (2Dx ) + 2DxDy0 + 12 DxD 2 y0 - ( Dx )02
6 x0

D2 y ( Dx )3
+ (D6x ) ]
3
= y0 (2Dx ) + 2DxDy0 + 12 DxD 2 y0 - ( Dx )02 [ 6

## = 2 y0 (Dx ) + 2Dx ( y1 - y0 ) + 12 Dx ( y2 - 2 y1 + y0 ) - D3x ( y2 - 2 y1 + y0 ).

After some minor simplification, this reduces to the usual expression for Simpsons rule
for the area under the first portion of the curve

Area D3x [ y2 + 4 y1 + y0 ].

We note that the integration required here is considerably less work than what
would be required to integrate the expression in Equation (2), since that involves three
quadratic terms, not one.

Using the identical argument on the next group of three points (x2, y2), (x3, y3), and
(x4, y4), we find that

Area D3x [ y4 + 4 y3 + y2 ],

and so on. When these approximation terms are added, we have Simpsons Rule

## Total Area D3x [ y0 + 4 y1 + 2 y2 + 4 y3 + 2 y4 + L + 4 yn -1 + yn ].

We note that the identical approach will work with higher degree integration
techniques, such as Simpsons 3/8 rule based on a cubic interpolation using four points at
a time or the authors favorite, Weddles formula, which is based on a sixth degree
polynomial interpolation using seven points at a time. We leave it to the interested reader
to investigate some of these cases, which all come under the heading of Newton-Cotes
formulas.

Reference

1. Author, Interpolation and Polynomial Curve Fitting, The Mathematics Teacher, 2014
(to appear).