Simpson's rule

In numerical analysis, Simpson's rule (named after Thomas Simpson) is a way to get an approximation of an integral:

<math> \int_{a}^{b} f(x) dx<math>
Contents

Basics

Simpson's rule works by approximating <math>f(x)<math> by the quadratic polynomial <math>P(x)<math> which takes the same values as <math>f(x)<math> at a, b, and the midpoint m=(a+b)/2. One can use Lagrange polynomial interpolation to find an expression for this polynomial,

<math>P(x)=f(a)\frac{(x-m)(x-b)}{(a-m)(a-b)}+

f(m)\frac{(x-a)(x-b)}{(m-a)(m-b)}+ f(b)\frac{(x-a)(x-m)}{(b-a)(b-m)} <math>.

Simpson's rule then follows by an easy (albeit tedious) calculation:

<math> \int_{a}^{b} f(x) dx\approx \int_{a}^{b} P(x) dx =\frac{b-a}{6}\left[f(a) + 4f\left(\frac{a+b}{2}\right)+f(b)\right].<math>
Missing image
Simpsons_method_illustration.png
The function f(x) (in blue) is approximated by a quadratic function P(x) (in red).

The error in approximating an integral by Simpson's rule is

<math>-\frac{h^5}{90}f^{(4)}(\xi),<math>

with <math>h=(b-a)/2<math> and <math>\xi<math> some number between <math>a<math> and <math>b<math>.

Composite Simpson's rule

We see that Simpson's rule provides an adequate approximation if the interval of integration <math>[a, b]<math> is small, which does not happen most of the time. The obvious solution is to split the interval of integration in small subintervals, apply Simpson's rule on each subinterval, and add up the results. In this way one obtains the composite Simpson's rule

<math>\int_a^b f(x) dx\approx

\frac{h}{3}\bigg[f(x_0)+2\sum_{j=1}^{n/2-1}f(x_{2j})+ 4\sum_{j=1}^{n/2}f(x_{2j-1})+f(x_n) \bigg],<math>

where <math>n<math> is the number of subintervals in which one splits <math>[a, b]<math> with <math>n<math> an even number, <math>h=(b-a)/n<math> is the length of each subinterval, and <math>x_i=a+ih<math> for <math>i=0, 1, ..., n-1, n<math>, in particular, <math>x_0=a<math> and <math>x_n=b<math>. Alternatively, the above can be written as:

<math>\int_a^b f(x) dx\approx

\frac{h}{3}\bigg[f(x_0)+4f(x_1)+2f(x_2)+4f(x_3)+...+4f(x_{n-1})+f(x_n)\bigg].<math>

The maximum error associated with the composite Simpson's rule can be found using the following formula:

<math>-\frac{h^4}{180}(b-a)f^{(4)}(\xi),<math>

Where <math>h<math> is the "step length", given by <math>h=(b-a)/n<math>.

See also: Newton-Cotes formulas.

References

External link

pl:Wzór parabol Simpsona

Navigation

  • Art and Cultures
    • Art (https://academickids.com/encyclopedia/index.php/Art)
    • Architecture (https://academickids.com/encyclopedia/index.php/Architecture)
    • Cultures (https://www.academickids.com/encyclopedia/index.php/Cultures)
    • Music (https://www.academickids.com/encyclopedia/index.php/Music)
    • Musical Instruments (http://academickids.com/encyclopedia/index.php/List_of_musical_instruments)
  • Biographies (http://www.academickids.com/encyclopedia/index.php/Biographies)
  • Clipart (http://www.academickids.com/encyclopedia/index.php/Clipart)
  • Geography (http://www.academickids.com/encyclopedia/index.php/Geography)
    • Countries of the World (http://www.academickids.com/encyclopedia/index.php/Countries)
    • Maps (http://www.academickids.com/encyclopedia/index.php/Maps)
    • Flags (http://www.academickids.com/encyclopedia/index.php/Flags)
    • Continents (http://www.academickids.com/encyclopedia/index.php/Continents)
  • History (http://www.academickids.com/encyclopedia/index.php/History)
    • Ancient Civilizations (http://www.academickids.com/encyclopedia/index.php/Ancient_Civilizations)
    • Industrial Revolution (http://www.academickids.com/encyclopedia/index.php/Industrial_Revolution)
    • Middle Ages (http://www.academickids.com/encyclopedia/index.php/Middle_Ages)
    • Prehistory (http://www.academickids.com/encyclopedia/index.php/Prehistory)
    • Renaissance (http://www.academickids.com/encyclopedia/index.php/Renaissance)
    • Timelines (http://www.academickids.com/encyclopedia/index.php/Timelines)
    • United States (http://www.academickids.com/encyclopedia/index.php/United_States)
    • Wars (http://www.academickids.com/encyclopedia/index.php/Wars)
    • World History (http://www.academickids.com/encyclopedia/index.php/History_of_the_world)
  • Human Body (http://www.academickids.com/encyclopedia/index.php/Human_Body)
  • Mathematics (http://www.academickids.com/encyclopedia/index.php/Mathematics)
  • Reference (http://www.academickids.com/encyclopedia/index.php/Reference)
  • Science (http://www.academickids.com/encyclopedia/index.php/Science)
    • Animals (http://www.academickids.com/encyclopedia/index.php/Animals)
    • Aviation (http://www.academickids.com/encyclopedia/index.php/Aviation)
    • Dinosaurs (http://www.academickids.com/encyclopedia/index.php/Dinosaurs)
    • Earth (http://www.academickids.com/encyclopedia/index.php/Earth)
    • Inventions (http://www.academickids.com/encyclopedia/index.php/Inventions)
    • Physical Science (http://www.academickids.com/encyclopedia/index.php/Physical_Science)
    • Plants (http://www.academickids.com/encyclopedia/index.php/Plants)
    • Scientists (http://www.academickids.com/encyclopedia/index.php/Scientists)
  • Social Studies (http://www.academickids.com/encyclopedia/index.php/Social_Studies)
    • Anthropology (http://www.academickids.com/encyclopedia/index.php/Anthropology)
    • Economics (http://www.academickids.com/encyclopedia/index.php/Economics)
    • Government (http://www.academickids.com/encyclopedia/index.php/Government)
    • Religion (http://www.academickids.com/encyclopedia/index.php/Religion)
    • Holidays (http://www.academickids.com/encyclopedia/index.php/Holidays)
  • Space and Astronomy
    • Solar System (http://www.academickids.com/encyclopedia/index.php/Solar_System)
    • Planets (http://www.academickids.com/encyclopedia/index.php/Planets)
  • Sports (http://www.academickids.com/encyclopedia/index.php/Sports)
  • Timelines (http://www.academickids.com/encyclopedia/index.php/Timelines)
  • Weather (http://www.academickids.com/encyclopedia/index.php/Weather)
  • US States (http://www.academickids.com/encyclopedia/index.php/US_States)

Information

  • Home Page (http://academickids.com/encyclopedia/index.php)
  • Contact Us (http://www.academickids.com/encyclopedia/index.php/Contactus)

  • Clip Art (http://classroomclipart.com)
Toolbox
Personal tools