Namespaces
Variants
Actions

Difference between revisions of "Trapezium formula"

From Encyclopedia of Mathematics
Jump to: navigation, search
(Importing text file)
 
m (tex encoded by computer)
Line 1: Line 1:
The special case of the [[Newton–Cotes quadrature formula|Newton–Cotes quadrature formula]] in which two nodes are taken:
+
<!--
 +
t0940301.png
 +
$#A+1 = 26 n = 0
 +
$#C+1 = 26 : ~/encyclopedia/old_files/data/T094/T.0904030 Trapezium formula
 +
Automatically converted into TeX, above some diagnostics.
 +
Please remove this comment and the {{TEX|auto}} line below,
 +
if TeX found to be correct.
 +
-->
  
<table class="eq" style="width:100%;"> <tr><td valign="top" style="width:94%;text-align:center;"><img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/t/t094/t094030/t0940301.png" /></td> <td valign="top" style="width:5%;text-align:right;">(1)</td></tr></table>
+
{{TEX|auto}}
 +
{{TEX|done}}
  
If the integrand <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/t/t094/t094030/t0940302.png" /> differs strongly from a linear function, then formula (1) is not very exact. In this case the interval <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/t/t094/t094030/t0940303.png" /> is divided into <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/t/t094/t094030/t0940304.png" /> subintervals <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/t/t094/t094030/t0940305.png" />, <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/t/t094/t094030/t0940306.png" />, of length <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/t/t094/t094030/t0940307.png" />, and for the calculation of the integral over <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/t/t094/t094030/t0940308.png" /> one uses the trapezium formula
+
The special case of the [[Newton–Cotes quadrature formula|Newton–Cotes quadrature formula]] in which two nodes are taken:
  
<table class="eq" style="width:100%;"> <tr><td valign="top" style="width:94%;text-align:center;"><img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/t/t094/t094030/t0940309.png" /></td> </tr></table>
+
$$ \tag{1 }
 +
\int\limits _ { a } ^ { b }  f ( x)  dx  \cong \
 +
{
 +
\frac{b - a }{2}
 +
} [ f ( a) + f ( b)].
 +
$$
  
Summation of the left- and right-hand sides of this approximate equality with respect to <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/t/t094/t094030/t09403010.png" /> from 0 to <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/t/t094/t094030/t09403011.png" /> leads to the composite trapezium formula:
+
If the integrand  $  f $
 +
differs strongly from a linear function, then formula (1) is not very exact. In this case the interval  $  [ a, b] $
 +
is divided into  $  n $
 +
subintervals  $  [ x _ {i} , x _ {i + 1 }  ] $,
 +
$  i = 0 \dots n - 1 $,
 +
of length  $  h = ( b- a)/n $,
 +
and for the calculation of the integral over  $  [ x _ {i} , x _ {i + 1 }  ] $
 +
one uses the trapezium formula
  
<table class="eq" style="width:100%;"> <tr><td valign="top" style="width:94%;text-align:center;"><img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/t/t094/t094030/t09403012.png" /></td> <td valign="top" style="width:5%;text-align:right;">(2)</td></tr></table>
+
$$
 +
\int\limits _ {x _ {i} } ^ { {x _ {i}  + 1 } }
 +
f ( x)  dx  \cong \
 +
{
 +
\frac{h}{2}
 +
}
 +
[ f ( x _ {i} ) + f ( x _ {i + 1 }  )].
 +
$$
  
where <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/t/t094/t094030/t09403013.png" />, <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/t/t094/t094030/t09403014.png" />. The quadrature formula (2) is also called the trapezium formula (without adding the word composite). The algebraic degree of accuracy of the quadrature formula (2), as well as of (1), is equal to 1. The quadrature formula (2) is exact for the trigonometric functions
+
Summation of the left- and right-hand sides of this approximate equality with respect to  $  i $
 +
from 0 to  $  n - 1 $
 +
leads to the composite trapezium formula:
  
<table class="eq" style="width:100%;"> <tr><td valign="top" style="width:94%;text-align:center;"><img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/t/t094/t094030/t09403015.png" /></td> </tr></table>
+
$$ \tag{2 }
 +
\int\limits _ { a } ^ { b }  f ( x)  dx  \cong \
 +
h \left [
 +
{
 +
\frac{f ( a) }{2}
 +
} +
 +
f ( x _ {1} ) + \dots + f ( x _ {n - 1 }  ) +
 +
{
 +
\frac{f ( b) }{2}
 +
}
 +
\right ] ,
 +
$$
  
In the case when <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/t/t094/t094030/t09403016.png" />, formula (2) is exact for all trigonometric polynomials of order not exceeding <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/t/t094/t094030/t09403017.png" />; furthermore, its trigonometric degree of accuracy is equal to <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/t/t094/t094030/t09403018.png" />.
+
where  $  x _ {j} = a + jh $,
 +
$  j = 0 \dots n $.  
 +
The quadrature formula (2) is also called the trapezium formula (without adding the word composite). The algebraic degree of accuracy of the quadrature formula (2), as well as of (1), is equal to 1. The quadrature formula (2) is exact for the trigonometric functions
  
If the integrand <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/t/t094/t094030/t09403019.png" /> is twice-continuously differentiable on <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/t/t094/t094030/t09403020.png" />, then the error <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/t/t094/t094030/t09403021.png" /> of the quadrature formula (2), that is, the difference between the integral and the quadrature sum, is given by
+
$$
 +
\cos 
 +
\frac{2 \pi }{b - a }
 +
kx,\ \
 +
\sin 
 +
\frac{2 \pi }{b - a }
 +
kx,\ \
 +
k = 0 \dots n - 1.
 +
$$
  
<table class="eq" style="width:100%;"> <tr><td valign="top" style="width:94%;text-align:center;"><img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/t/t094/t094030/t09403022.png" /></td> </tr></table>
+
In the case when  $  b - a = 2 \pi $,
 +
formula (2) is exact for all trigonometric polynomials of order not exceeding  $  n - 1 $;  
 +
furthermore, its trigonometric degree of accuracy is equal to  $  n - 1 $.
  
where <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/t/t094/t094030/t09403023.png" /> is a point of <img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/t/t094/t094030/t09403024.png" />.
+
If the integrand  $  f $
 +
is twice-continuously differentiable on  $  [ a, b] $,
 +
then the error  $  R ( f  ) $
 +
of the quadrature formula (2), that is, the difference between the integral and the quadrature sum, is given by
  
 +
$$
 +
R ( f  )  = \
 +
- {
 +
\frac{b - a }{12}
 +
}
 +
h  ^ {2} f ^ { \prime\prime } ( \xi ),
 +
$$
  
 +
where  $  \xi $
 +
is a point of  $  [ a, b] $.
  
 
====Comments====
 
====Comments====
 
The complete formula
 
The complete formula
  
<table class="eq" style="width:100%;"> <tr><td valign="top" style="width:94%;text-align:center;"><img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/t/t094/t094030/t09403025.png" /></td> </tr></table>
+
$$
 +
\int\limits _ { a } ^ { b }  f( x)  dx =
 +
$$
  
<table class="eq" style="width:100%;"> <tr><td valign="top" style="width:94%;text-align:center;"><img align="absmiddle" border="0" src="https://www.encyclopediaofmath.org/legacyimages/t/t094/t094030/t09403026.png" /></td> </tr></table>
+
$$
 +
= \
 +
h \left [ f(
 +
\frac{a)}{2}
 +
+ f( x _ {1} ) + \dots + f( x _ {n-} 1 )
 +
+ f(
 +
\frac{b)}{2}
 +
\right ] - b-  
 +
\frac{a}{12}
 +
h  ^ {2} f ^ { \prime\prime } ( \xi )
 +
$$
  
 
is often referred to as the trapezoidal rule.
 
is often referred to as the trapezoidal rule.

Revision as of 08:26, 6 June 2020


The special case of the Newton–Cotes quadrature formula in which two nodes are taken:

$$ \tag{1 } \int\limits _ { a } ^ { b } f ( x) dx \cong \ { \frac{b - a }{2} } [ f ( a) + f ( b)]. $$

If the integrand $ f $ differs strongly from a linear function, then formula (1) is not very exact. In this case the interval $ [ a, b] $ is divided into $ n $ subintervals $ [ x _ {i} , x _ {i + 1 } ] $, $ i = 0 \dots n - 1 $, of length $ h = ( b- a)/n $, and for the calculation of the integral over $ [ x _ {i} , x _ {i + 1 } ] $ one uses the trapezium formula

$$ \int\limits _ {x _ {i} } ^ { {x _ {i} + 1 } } f ( x) dx \cong \ { \frac{h}{2} } [ f ( x _ {i} ) + f ( x _ {i + 1 } )]. $$

Summation of the left- and right-hand sides of this approximate equality with respect to $ i $ from 0 to $ n - 1 $ leads to the composite trapezium formula:

$$ \tag{2 } \int\limits _ { a } ^ { b } f ( x) dx \cong \ h \left [ { \frac{f ( a) }{2} } + f ( x _ {1} ) + \dots + f ( x _ {n - 1 } ) + { \frac{f ( b) }{2} } \right ] , $$

where $ x _ {j} = a + jh $, $ j = 0 \dots n $. The quadrature formula (2) is also called the trapezium formula (without adding the word composite). The algebraic degree of accuracy of the quadrature formula (2), as well as of (1), is equal to 1. The quadrature formula (2) is exact for the trigonometric functions

$$ \cos \frac{2 \pi }{b - a } kx,\ \ \sin \frac{2 \pi }{b - a } kx,\ \ k = 0 \dots n - 1. $$

In the case when $ b - a = 2 \pi $, formula (2) is exact for all trigonometric polynomials of order not exceeding $ n - 1 $; furthermore, its trigonometric degree of accuracy is equal to $ n - 1 $.

If the integrand $ f $ is twice-continuously differentiable on $ [ a, b] $, then the error $ R ( f ) $ of the quadrature formula (2), that is, the difference between the integral and the quadrature sum, is given by

$$ R ( f ) = \ - { \frac{b - a }{12} } h ^ {2} f ^ { \prime\prime } ( \xi ), $$

where $ \xi $ is a point of $ [ a, b] $.

Comments

The complete formula

$$ \int\limits _ { a } ^ { b } f( x) dx = $$

$$ = \ h \left [ f( \frac{a)}{2} + f( x _ {1} ) + \dots + f( x _ {n-} 1 ) + f( \frac{b)}{2} \right ] - b- \frac{a}{12} h ^ {2} f ^ { \prime\prime } ( \xi ) $$

is often referred to as the trapezoidal rule.

References

[a1] F.B. Hildebrand, "Introduction to numerical analysis" , Dover, reprint (1974) pp. 95ff
[a2] W.H. Press, B.P. Flannery, S.A. Teukolsky, W.T. Vetterling, "Numerical recipes" , Cambridge Univ. Press (1986) pp. 105ff
How to Cite This Entry:
Trapezium formula. Encyclopedia of Mathematics. URL: http://encyclopediaofmath.org/index.php?title=Trapezium_formula&oldid=12696
This article was adapted from an original article by I.P. Mysovskikh (originator), which appeared in Encyclopedia of Mathematics - ISBN 1402006098. See original article