Home Home  Article Index Article Index  
GuruPedia  

Simpson's rule

In computer science, in the field of numerical analysis, Simpson's Rule is a way to get an approximation of an integral:

 

using an interpolating polynomial of higher degree. Simpson's rule belong to the family of rules derived from Newton-Cotes formulas. The most common is a quadratic polynomial interpolating at a, (a+b)/2, and b which gives us the polynomial:

 

From this Simpson's Rule is:

 

Proof

We want to have our polynomial on the form:

P(x) = αx2 + βx + γ

Assume we have the function values a = x0,   and b = x2. The situation will look like this, with our sampled function values at f(a),   and f(b):

 

As this Simpson's rule apply to equidistant points, we know that x0 < x1 < x2 and that x1 - x0 = x2 - x1. This means we may transport our solution to the intervals formed by - h,0,h such that

 

 

We need to interpolate these values and function values with a polynomial and form our equations:

f( - h) = αh2 - βh + γ
f(0) = γ
f(h) = αh2 + βh + γ

Which yields:

 
 
γ = f(0)

We then integrate our polynomial:

 
 
 
 
 
 

Substitute back our original values:

 
 
 
 

Q.E.D.

Error of Simpson's Rule

To examine the accuracy of the rule, take  , so

 

Using integration by parts we get:

 

and

 

where α and β are constants that we can choose. Adding these expressions, we get:

 


Let's take α and β, so as to get Simpson's Rule:

 

and defining the function Py(x) by:


 

we have

 

where

 

is the error value.

Popular Topics

This article is from Wikipedia. All text is available under the terms of the GNU Free Documentation License.  For the live article, click here.

Privacy