Skip to main content
Library homepage
 

Text Color

Text Size

 

Margin Size

 

Font Type

Enable Dyslexic Font
Mathematics LibreTexts

6.2: Composite Rules

( \newcommand{\kernel}{\mathrm{null}\,}\)

We now use our elementary formulas obtained for (6.2) to perform the integral given by (6.1)

6.2.1. Trapezoidal rule

We suppose that the function ๐‘“โก(๐‘ฅ) is known at the ๐‘› +1 points labeled as ๐‘ฅ0,๐‘ฅ1,โ€ฆ,๐‘ฅ๐‘›, with the endpoints given by ๐‘ฅ0 =๐‘Ž and ๐‘ฅ๐‘› =๐‘. Define

๐‘“๐‘–=๐‘“โก(๐‘ฅ๐‘–),โ„Ž๐‘–=๐‘ฅ๐‘–+1โˆ’๐‘ฅ๐‘–

Then the integral of (6.1) may be decomposed as

โˆซ๐‘๐‘Ž๐‘“โก(๐‘ฅ)๐‘‘๐‘ฅ=๐‘›โˆ’1โˆ‘๐‘–=0โˆซ๐‘ฅ๐‘–+1๐‘ฅ๐‘–๐‘“โก(๐‘ฅ)๐‘‘๐‘ฅ=๐‘›โˆ’1โˆ‘๐‘–=0โˆซโ„Ž๐‘–0๐‘“โก(๐‘ฅ๐‘–+๐‘ )๐‘‘๐‘ 

where the last equality arises from the change-of-variables ๐‘  =๐‘ฅ โˆ’๐‘ฅ๐‘–. Applying the trapezoidal rule to the integral, we have

โˆซ๐‘๐‘Ž๐‘“โก(๐‘ฅ)๐‘‘๐‘ฅ=๐‘›โˆ’1โˆ‘๐‘–=0โ„Ž๐‘–2โข(๐‘“๐‘–+๐‘“๐‘–+1)

If the points are not evenly spaced, say because the data are experimental values, then the โ„Ž๐‘– may differ for each value of ๐‘– and (6.6) is to be used directly.

However, if the points are evenly spaced, say because ๐‘“โก(๐‘ฅ) can be computed, we have โ„Ž๐‘– =โ„Ž, independent of ๐‘–. We can then define

๐‘ฅ๐‘–=๐‘Ž+๐‘–โขโ„Ž,๐‘–=0,1,โ€ฆ,๐‘›

and since the end point ๐‘ satisfies ๐‘ =๐‘Ž +๐‘›โขโ„Ž, we have

โ„Ž=๐‘โˆ’๐‘Ž๐‘›

The composite trapezoidal rule for evenly space points then becomes

โˆซ๐‘๐‘Ž๐‘“โก(๐‘ฅ)๐‘‘๐‘ฅ=โ„Ž2โข๐‘›โˆ’1โˆ‘๐‘–=0(๐‘“๐‘–+๐‘“๐‘–+1)=โ„Ž2โข(๐‘“0+2โข๐‘“1+โ‹ฏ+2โข๐‘“๐‘›โˆ’1+๐‘“๐‘›)

The first and last terms have a multiple of one; all other terms have a multiple of two; and the entire sum is multiplied by โ„Žโก/2.

6.2.2. Simpsonโ€™s rule

We here consider the composite Simpsonโ€™s rule for evenly space points. We apply Simpsonโ€™s rule over intervals of 2โขโ„Ž, starting from ๐‘Ž and ending at ๐‘ :

โˆซ๐‘๐‘Ž๐‘“โก(๐‘ฅ)๐‘‘๐‘ฅ=โ„Ž3โข(๐‘“0+4โข๐‘“1+๐‘“2)+โ„Ž3โข(๐‘“2+4โข๐‘“3+๐‘“4)+โ€ฆ+โ„Ž3โข(๐‘“๐‘›โˆ’2+4โข๐‘“๐‘›โˆ’1+๐‘“๐‘›)

Note that ๐‘› must be even for this scheme to work. Combining terms, we have

โˆซ๐‘๐‘Ž๐‘“โก(๐‘ฅ)๐‘‘๐‘ฅ=โ„Ž3โข(๐‘“0+4โข๐‘“1+2โข๐‘“2+4โข๐‘“3+2โข๐‘“4+โ‹ฏ+4โข๐‘“๐‘›โˆ’1+๐‘“๐‘›)

The first and last terms have a multiple of one; the even indexed terms have a multiple of 2; the odd indexed terms have a multiple of 4; and the entire sum is multiplied by โ„Žโก/3.


This page titled 6.2: Composite Rules is shared under a CC BY 3.0 license and was authored, remixed, and/or curated by Jeffrey R. Chasnov via source content that was edited to the style and standards of the LibreTexts platform.

  • Was this article helpful?

Support Center

How can we help?