Math 2.0

Numerical analysis Theorem

Error bound for the trapezoidal rule

Builds on Trapezoidal ruleSecond derivativeInterpolation error formulaMean value theorem for integrals

Statement

Let a<ba < b, let f ⁣:[a,b]→ℝf \colon [a, b] \to \R be twice continuously differentiable, let N≥1N \ge 1, h=(b−a)/Nh = (b - a)/N, and let TN(f)T_N(f) be the composite trapezoidal rule with NN subintervals. Then there is ξ∈[a,b]\xi \in [a, b] with ∫abf(x) dx−TN(f)=−(b−a) h212 f′′(ξ).\int_a^b f(x)\, dx - T_N(f) = -\frac{(b - a)\, h^2}{12}\, f''(\xi). In particular, ∣∫abf(x) dx−TN(f)∣≤(b−a) h212max⁡a≤x≤b∣f′′(x)∣.\left| \int_a^b f(x)\, dx - T_N(f) \right| \le \frac{(b - a)\, h^2}{12} \max_{a \le x \le b} \abs{f''(x)}.

Remarks

On one subinterval [xi−1,xi][x_{i-1}, x_i], the interpolation error formula gives f(x)−L(x)=12f′′(ηx)(x−xi−1)(x−xi)f(x) - L(x) = \tfrac{1}{2} f''(\eta_x)(x - x_{i-1})(x - x_i) for the linear interpolant LL. Since (x−xi−1)(x−xi)≤0(x - x_{i-1})(x - x_i) \le 0 there, the mean value theorem for integrals gives the local error −h312f′′(ξi)-\tfrac{h^3}{12} f''(\xi_i). Summing over the NN subintervals and using the intermediate value theorem for f′′f'' gives the global formula with Nh3=(b−a)h2N h^3 = (b - a) h^2. Example: f(x)=x2f(x) = x^2 on [0,1][0, 1] with N=2N = 2: the error is 13−38=−124\tfrac{1}{3} - \tfrac{3}{8} = -\tfrac{1}{24}, and the formula gives −1⋅1/412⋅2=−124-\tfrac{1 \cdot 1/4}{12} \cdot 2 = -\tfrac{1}{24}. Without the smoothness hypothesis the rate h2h^2 can fail: for f(x)=xf(x) = \sqrt{x} on [0,1][0, 1], whose second derivative is unbounded near 00, the error is only of order h3/2h^{3/2}. Mathlib proves the bound in the form trapezoidal_error_le_of_c2.

Going deeper

For a student

This bound is the model for error analysis of composite Newton–Cotes formulas: a local error of order hd+2f(d+1)h^{d+2} f^{(d+1)} summed over NN pieces gives a global error of order hd+1h^{d+1}. It also tells how many subintervals are needed for a given tolerance, once a bound on ∣f′′∣\abs{f''} is known. The Euler–Maclaurin formula refines it into an expansion of the error in even powers of hh, which is the basis of Richardson extrapolation and Romberg's method. For smooth periodic functions all the correction terms vanish, which explains the very fast convergence of the trapezoidal rule in that case.

Reading path

To understand this page from the ground up, read these 39 pages in order. The foundations come first.

Show the path as a graph
Derivative, concept, no evidence levelDerivativeconceptLimit point of a set, definition, no evidence levelLimit point of a setdefinitionLocal maximum, definition, no evidence levelLocal maximumdefinitionPartition of an interval, definition, no evidence levelPartition of an inter…definitionPolynomial interpolation, concept, no evidence levelPolynomial interpolat…conceptSequence, definition, no evidence levelSequencedefinitionTrapezoidal rule, concept, no evidence levelTrapezoidal ruleconceptLimit of a function, definition, no evidence levelLimit of a functiondefinitionLocal minimum, definition, no evidence levelLocal minimumdefinitionMesh of a partition, definition, no evidence levelMesh of a partitiondefinitionRiemann sum, definition, no evidence levelRiemann sumdefinitionReal sequence, definition, no evidence levelReal sequencedefinitionSubsequence, definition, no evidence levelSubsequencedefinitionContinuity at a point, definition, no evidence levelContinuity at a pointdefinitionDerivative, definition, no evidence levelDerivativedefinitionRiemann integrable function, definition, no evidence levelRiemann integrable fu…definitionBounded sequence, definition, no evidence levelBounded sequencedefinitionLimit of a sequence, definition, no evidence levelLimit of a sequencedefinitionMonotone sequence, definition, no evidence levelMonotone sequencedefinitionContinuous function, definition, no evidence levelContinuous functiondefinitionDifferentiable function, definition, no evidence levelDifferentiable functi…definitionFermat's theorem on stationary points, statement, no evidence levelFermat's theorem on s…statementRiemann integral, definition, no evidence levelRiemann integraldefinitionConvergent sequence, definition, no evidence levelConvergent sequencedefinitionMonotone convergence theorem for sequences, statement, no evidence levelMonotone convergence …statementEvery sequence has a monotone subsequence, statement, no evidence levelEvery sequence has a …statementIntermediate value theorem, statement, no evidence levelIntermediate value th…statementDerivative function, definition, no evidence levelDerivative functiondefinitionDefinite integral, definition, no evidence levelDefinite integraldefinitionBolzano–Weierstrass theorem, statement, no evidence levelBolzano–Weierstrass t…statementHigher derivative, definition, no evidence levelHigher derivativedefinitionBoundedness theorem, statement, no evidence levelBoundedness theoremstatementMonotonicity of the integral, statement, no evidence levelMonotonicity of the i…statementSecond derivative, definition, no evidence levelSecond derivativedefinitionExtreme value theorem, statement, no evidence levelExtreme value theoremstatementMean value theorem for integrals, statement, no evidence levelMean value theorem fo…statementRolle's theorem, statement, no evidence levelRolle's theoremstatementInterpolation error formula, statement, no evidence levelInterpolation error f…statementError bound for the trapezoidal rule, statement, no evidence levelError bound for the t…statement
Each page uses the pages above it. The colour of the bar on a box shows how strong the evidence is, and the box also gives it as text. The list has the same pages.
  • no evidence level
  1. Derivative concept
  2. Limit point of a set definition
  3. Local maximum definition
  4. Partition of an interval definition
  5. Polynomial interpolation concept
  6. Sequence definition
  7. Trapezoidal rule concept
  8. Limit of a function definition
  9. Local minimum definition
  10. Mesh of a partition definition
  11. Riemann sum definition
  12. Real sequence definition
  13. Subsequence definition
  14. Continuity at a point definition
  15. Derivative definition
  16. Riemann integrable function definition
  17. Bounded sequence definition
  18. Limit of a sequence definition
  19. Monotone sequence definition
  20. Continuous function definition
  21. Differentiable function definition
  22. Fermat's theorem on stationary points statement
  23. Riemann integral definition
  24. Convergent sequence definition
  25. Monotone convergence theorem for sequences statement
  26. Every sequence has a monotone subsequence statement
  27. Intermediate value theorem statement
  28. Derivative function definition
  29. Definite integral definition
  30. Bolzano–Weierstrass theorem statement
  31. Higher derivative definition
  32. Boundedness theorem statement
  33. Monotonicity of the integral statement
  34. Second derivative definition
  35. Extreme value theorem statement
  36. Mean value theorem for integrals statement
  37. Rolle's theorem statement
  38. Interpolation error formula statement
  39. Error bound for the trapezoidal rule statement

Further reading

  1. Web https://en.wikipedia.org/wiki/Trapezoidal_rule
About this page
TagQ0M7PT9VN2
URIm2://Q0M7PT9VN2
Kindstatement, theorem
WritingW0 stub
MSC65D32, 41A55, 65D30
StatusThis copy of the site has no build data. Run m2 status Q0M7PT9VN2.
AboutTrapezoidal rule
UsesTrapezoidal rule, Second derivative, Interpolation error formula, Mean value theorem for integrals

Markdown · JSON · Edit on GitHub

What this page needs for W1

  • an inventory row: the row of the inventory that the node accounts for (0 of 1)
  • a source with a locator (0 of 1)

The writing levels say how complete the text of a page is. They do not measure its truth.

What links here

No page links to this page yet.