Difference between revisions of "Trapezium formula"
m (fix tex) |
(latex details) |
||
Line 13: | Line 13: | ||
The special case of the [[Newton–Cotes quadrature formula|Newton–Cotes quadrature formula]] in which two nodes are taken: | The special case of the [[Newton–Cotes quadrature formula|Newton–Cotes quadrature formula]] in which two nodes are taken: | ||
− | + | \begin{equation} \label{eq1} | |
\int\limits _ { a } ^ { b } f ( x) dx \cong \ | \int\limits _ { a } ^ { b } f ( x) dx \cong \ | ||
{ | { | ||
\frac{b - a }{2} | \frac{b - a }{2} | ||
} [ f ( a) + f ( b)]. | } [ f ( a) + f ( b)]. | ||
− | + | \end{equation} | |
If the integrand $ f $ | If the integrand $ f $ | ||
− | differs strongly from a linear function, then formula | + | differs strongly from a linear function, then formula \eqref{eq1} is not very exact. In this case the interval $ [ a, b] $ |
is divided into $ n $ | is divided into $ n $ | ||
subintervals $ [ x _ {i} , x _ {i + 1 } ] $, | subintervals $ [ x _ {i} , x _ {i + 1 } ] $, | ||
Line 30: | Line 30: | ||
$$ | $$ | ||
− | \int\limits _ {x _ {i} } ^ { {x _ {i | + | \int\limits _ {x _ {i} } ^ { {x _ {i + 1} } } |
f ( x) dx \cong \ | f ( x) dx \cong \ | ||
{ | { | ||
Line 42: | Line 42: | ||
leads to the composite trapezium formula: | leads to the composite trapezium formula: | ||
− | + | \begin{equation} \label{eq2} | |
\int\limits _ { a } ^ { b } f ( x) dx \cong \ | \int\limits _ { a } ^ { b } f ( x) dx \cong \ | ||
h \left [ | h \left [ | ||
Line 53: | Line 53: | ||
} | } | ||
\right ] , | \right ] , | ||
− | + | \end{equation} | |
where $ x _ {j} = a + jh $, | where $ x _ {j} = a + jh $, | ||
$ j = 0 \dots n $. | $ j = 0 \dots n $. | ||
− | The quadrature formula | + | The quadrature formula \eqref{eq2} is also called the trapezium formula (without adding the word composite). The algebraic degree of accuracy of the quadrature formula \eqref{eq2}, as well as of \eqref{eq1}, is equal to 1. The quadrature formula \eqref{eq2} is exact for the trigonometric functions |
$$ | $$ | ||
Line 70: | Line 70: | ||
In the case when $ b - a = 2 \pi $, | In the case when $ b - a = 2 \pi $, | ||
− | formula | + | formula \eqref{eq2} is exact for all trigonometric polynomials of order not exceeding $ n - 1 $; |
furthermore, its trigonometric degree of accuracy is equal to $ n - 1 $. | furthermore, its trigonometric degree of accuracy is equal to $ n - 1 $. | ||
Line 76: | Line 76: | ||
is twice-continuously differentiable on $ [ a, b] $, | is twice-continuously differentiable on $ [ a, b] $, | ||
then the error $ R ( f ) $ | then the error $ R ( f ) $ | ||
− | of the quadrature formula | + | of the quadrature formula \eqref{eq2}, that is, the difference between the integral and the quadrature sum, is given by |
$$ | $$ | ||
Line 93: | Line 93: | ||
$$ | $$ | ||
− | \int\ | + | \int\limits_{a}^{b} f(x) dx = h \left [ |
− | |||
− | |||
− | |||
− | |||
− | h \left [ | ||
\frac{f(a)}{2} | \frac{f(a)}{2} | ||
− | + f( x _ {1} ) + \dots + f( x _ {n-} | + | + f( x _ {1} ) + \dots + f( x _ {n-1} ) |
− | + \frac{f(b)}{2} | + | + \frac{f(b)}{2} \right ] - |
− | |||
\frac{b-a}{12} | \frac{b-a}{12} | ||
h ^ {2} f ^ { \prime\prime } ( \xi ) | h ^ {2} f ^ { \prime\prime } ( \xi ) | ||
Line 110: | Line 104: | ||
====References==== | ====References==== | ||
− | <table><TR><TD valign="top">[a1]</TD> <TD valign="top"> F.B. Hildebrand, "Introduction to numerical analysis" , Dover, reprint (1974) pp. 95ff</TD></TR><TR><TD valign="top">[a2]</TD> <TD valign="top"> W.H. Press, B.P. Flannery, S.A. Teukolsky, W.T. Vetterling, "Numerical recipes" , Cambridge Univ. Press (1986) pp. 105ff</TD></TR></table> | + | <table> |
+ | <TR><TD valign="top">[a1]</TD> <TD valign="top"> F.B. Hildebrand, "Introduction to numerical analysis" , Dover, reprint (1974) pp. 95ff</TD></TR><TR><TD valign="top">[a2]</TD> <TD valign="top"> W.H. Press, B.P. Flannery, S.A. Teukolsky, W.T. Vetterling, "Numerical recipes" , Cambridge Univ. Press (1986) pp. 105ff</TD></TR> | ||
+ | </table> |
Latest revision as of 16:30, 29 March 2024
The special case of the Newton–Cotes quadrature formula in which two nodes are taken:
\begin{equation} \label{eq1} \int\limits _ { a } ^ { b } f ( x) dx \cong \ { \frac{b - a }{2} } [ f ( a) + f ( b)]. \end{equation}
If the integrand $ f $ differs strongly from a linear function, then formula \eqref{eq1} 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:
\begin{equation} \label{eq2} \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 ] , \end{equation}
where $ x _ {j} = a + jh $, $ j = 0 \dots n $. The quadrature formula \eqref{eq2} is also called the trapezium formula (without adding the word composite). The algebraic degree of accuracy of the quadrature formula \eqref{eq2}, as well as of \eqref{eq1}, is equal to 1. The quadrature formula \eqref{eq2} 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 \eqref{eq2} 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 \eqref{eq2}, 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 [ \frac{f(a)}{2} + f( x _ {1} ) + \dots + f( x _ {n-1} ) + \frac{f(b)}{2} \right ] - \frac{b-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 |
Trapezium formula. Encyclopedia of Mathematics. URL: http://encyclopediaofmath.org/index.php?title=Trapezium_formula&oldid=51276