Math 2.0

Numerical analysis Definition

Trapezoidal rule

Builds on Quadrature ruleNewton–Cotes formulasDegree of exactness of a quadrature rule

Definition

Let a<ba < b and let f ⁣:[a,b]→ℝf \colon [a, b] \to \R be continuous. The trapezoidal rule is the quadrature rule T(f)=b−a2(f(a)+f(b)).T(f) = \frac{b - a}{2} \big( f(a) + f(b) \big). For an integer N≥1N \ge 1, let h=(b−a)/Nh = (b - a)/N and xi=a+ihx_i = a + i h for i=0,…,Ni = 0, \dots, N. The composite trapezoidal rule with NN subintervals is TN(f)=h(f(x0)2+f(x1)+⋯+f(xN−1)+f(xN)2),T_N(f) = h \left( \frac{f(x_0)}{2} + f(x_1) + \cdots + f(x_{N-1}) + \frac{f(x_N)}{2} \right), the sum of TT over the subintervals [xi−1,xi][x_{i-1}, x_i].

Remarks

TT is the closed Newton–Cotes formula with n=1n = 1, and its degree of exactness is 11. Example: for f(x)=x2f(x) = x^2 on [0,1][0, 1] and N=2N = 2, T2(f)=12(0+14+12)=38T_2(f) = \tfrac{1}{2}\big(0 + \tfrac{1}{4} + \tfrac{1}{2}\big) = \tfrac{3}{8}, while ∫01x2 dx=13\int_0^1 x^2\, dx = \tfrac{1}{3}. Non-example: the left Riemann sum h(f(x0)+⋯+f(xN−1))h \big( f(x_0) + \cdots + f(x_{N-1}) \big) is not the composite trapezoidal rule. It gives full weight to f(x0)f(x_0) and none to f(xN)f(x_N); for f(x)=xf(x) = x on [0,1][0, 1] and N=1N = 1 it gives 00 instead of 1/21/2. The composite rule is the average of the left and right Riemann sums. For a continuous function of period b−ab - a, TN(f)=h∑i=0N−1f(xi)T_N(f) = h \sum_{i=0}^{N-1} f(x_i), and for smooth periodic ff the error decreases faster than any power of hh.

Reading path

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

Show the path as a graph
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. Degree of exactness of a quadrature rule concept
  2. Newton–Cotes formulas concept
  3. Quadrature rule concept
  4. Trapezoidal rule definition

Further reading

  1. Web https://en.wikipedia.org/wiki/Trapezoidal_rule
About this page
Tag7R0F4956PX
URIm2://7R0F4956PX
Kinddefinition
WritingW0 stub
MSC65D32, 41A55, 65D30
DefinesTrapezoidal rule
UsesQuadrature rule, Newton–Cotes formulas, Degree of exactness of a quadrature rule

Markdown · JSON · Edit on GitHub

What this page needs for W1

  • 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.