The trapezoidal rule describes a mathematical procedure for the numerical approximation of the integral of a function in the interval ( numerical integration ).
To do this, replace the area under the curve in the given interval with a trapezoid or several equally wide trapezoids.
There are various ways of determining these trapezoids: The curve can, for example, be replaced approximately by a chord between the function values at points and . This leads to the trapezoidal tendon formula . But you can also place the tangent on the function in the middle of the interval and then get the tangent trapezoidal formula or center point rule .
example
With the help of the trapezoidal formulas explained below, this specific integral should be calculated approximately.
Tendon trapezoidal formula
The trapezoid is formed from the baseline (the interval on the -axis), the vertical straight lines and and the chord as the connecting straight line between and . This chord replaces the curve .
The chordal trapezoidal formula results from the area of the described trapezoid:
This formula - and also the following ones - can be derived from the “general quadrature formula for a partial area”.
If twice continuously differentiable in , then the following estimate applies to the remainder :
If it is also real-valued, then applies with an intermediate place
The sign in this formula can be made geometrically plausible as follows: If the function is strictly concave , as in the illustration of the chordal trapezoid above , applies to all and therefore also to the intermediate point . Thus it follows that , i. H. the area searched for is larger than the trapezoidal area , as shown in the illustration.
The dependence of the error on the 2nd derivative of means that the formula for straight lines is exact, which is also clearly evident. The degree of accuracy is thus 1.
Applied to the example above:
Because of the above formula it follows that the searched area is smaller than the trapezoidal area , in accordance with the calculated numbers.
Compound trapezoidal tendon formula
In order to be able to approximate the integral even better, one subdivides the interval into adjacent, equally large sub-intervals of length . In each sub-interval, the chordal trapezoidal formula is used for the individual sub-areas and then the resulting approximations are added. This gives the summed (or composite) chord trapezoidal formula :
With
Applied to the example above:
Be the step size and with it . Then
Be the step size and with it . Then
You can see the advantage of the trapezoidal rule: If you double the number of intervals, you can fall back on the previous calculation. This is not the case with the tangent trapezoidal rule (see below). This is one of the reasons why the Romberg integration is based on the tendon trapezoid rule.
The general formula is:
Error estimation
The error estimate for the remainder is
or for real-valued functions with an intermediate point from the interval
The factor in the above formula means that if the step size is halved (doubling the intervals), as is the case with the Romberg method with the Romberg sequence, the error is about a factor of 4 smaller, as the following example shows :
Applied to the example above:
With follows
and thus the error estimate
-
,
which is expected to result in a larger value than the exact value
The error estimate is obtained analogously
-
,
which is expected to result in a larger value than the exact value
It applies
Error estimation
If you calculate the chordal trapezoidal formula twice with 2 different numbers of intervals , you get the following error estimate:
Especially when doubling the intervals (halving the step size) one obtains the error estimate:
Applied to the above example one obtains
Asymptotic error development
In the following we determine the type of error of the trapezoidal sum and in particular its dependence on the step size , whereby the integral is to be determined.
Be to it
- the step size: with
- Trapezoidal sum depends on :
- the integrand is continuously differentiable : with .
Then the following error behavior applies to the trapezoidal sum
where the following definitions apply
Furthermore, these are given by the Bernoulli numbers and the coefficient of the residual term can be estimated uniformly in . So it applies
Tangent trapezoidal formula or center point rule
The trapezoid is formed from the baseline (the interval on the -axis), the vertical straight lines and the tangent to in the middle of the interval . This tangent replaces the curve .
The tangent trapezoidal formula results from the area of the described trapezoid:
This formula - and also the following ones - can be derived from the “general quadrature formula for a partial area”.
If twice continuously differentiable in , then the following estimate applies to the remainder :
If it is also real-valued, then with an intermediate place :
The sign in this formula can be made geometrically plausible as follows: If the function is strictly concave , as in the above illustration of the tangent trapezoid , applies to all and therefore also to the intermediate point . Thus it follows that , i. H. the area searched for is smaller than the trapezoidal area , as shown in the illustration.
The dependence of the error on the 2nd derivative of means that the formula for straight lines is exact, which is also clearly evident. The degree of accuracy is thus 1.
If you turn the tangent in the point clockwise in the above picture of the tangent trapezoidal rule until you get a horizontal straight line, a rectangle with the same area is created. The rule thus obtained ( midpoint rule ) is thus a different geometric interpretation of the same quadrature formula.
Applied to the example above:
Because of the above formula it follows that the searched area is larger than the trapezoidal area , in accordance with the calculated numbers.
Compound tangent trapezoidal formula or center point rule
In order to be able to approximate the integral even better, the interval is divided into adjacent, equally large sub-intervals of length . In each sub-interval the tangent trapezoidal formula is used for the individual sub-areas and then the resulting approximations are added. This gives the summed (or composite) tangent trapezoidal formula :
With
Applied to the example above:
Be the step size and with it
Be the step size and with it . Then
In contrast to the tendon trapezoid rule, with the tangent trapezoid rule, when doubling the number of intervals, the previous calculation cannot be used.
Error estimation
The error estimate for the remainder is:
or for real-valued functions with an intermediate point :
The factor in the above formula means that if the step size is halved (doubling the intervals), the error is about a factor of 4 smaller, as the following example also shows:
Applied to the example above:
With follows
and thus the error estimate
-
,
which is expected to result in a larger value than the exact value
The error estimate is analogously obtained
-
,
which is expected to result in a larger value than the exact value
It applies
Error estimation
If the tangent trapezoidal formula is calculated twice with two different numbers of intervals , the following error estimate is obtained, as with the tendon trapezoid rule:
-
.
Especially when doubling the intervals (halving the step size) one obtains the error estimate:
-
.
Applied to the above example one obtains
-
.
Relation to other formulas
As you can see from the examples above, the following applies
The general formula is:
For the error estimation of the tendon trapezoidal rule one thus obtains
If the error estimate for is added to the approximate value , the two better equivalent formulas are obtained:
-
That is the formula from the Simpson rule . This results in a formula of degree of accuracy 3, which integrates polynomials exactly up to degree 3. This delivers i. A. Better results than or .
-
That is the formula for the 2nd column of the calculation scheme of the Romberg integration when using the Romberg sequence. Thus, the 2nd column of the Romberg schema is the Simpson rule with the degree of accuracy 3.
Applied to the above example one gets with
a better approximation for the exact integral
than with , or
with the same number of function values to be evaluated as , namely 13 pieces.
See also
literature
- Josef Stoer: Numerical Mathematics, Springer-Verlag, Berlin, 2005, ISBN 3-540-21395-3
- Martin Hanke-Bourgeois: Fundamentals of Numerical Mathematics and Scientific Computing, Teubner-Verlag, Stuttgart, 2002, ISBN 3-519-00356-2 , p. 317 ff
Individual evidence
-
^ Peter Deuflhard; Folkmar Bornemann: Numerical Mathematics / 1. An algorithmic introduction. 4th, revised. and exp. Edition volume 1 . de Gruyter, Berlin, ISBN 3-11-020354-5 , p. 313 .