Trapezoidal Rule
📂Numerical AnalysisTrapezoidal Rule
Definition

Let’s assume f:[a,b]→R is integrable over [a,b] and [a,b] is divided into nodes at intervals of h:=nb−a, like a=x0<⋯<xn=b. The numerical integration operator In1, defined as follows, is called the trapezoidal rule.
In1(f):=k=1∑n2h(f(xk−1)+f(xk))
Theorem
Let’s say f∈C2[a,b]. The error E11 and the asymptotic error E~n1 of the trapezoidal rule can be summarized as follows:
- [1]: E11(f)=−121h3f′′(ξ)
- [2]: E~n1(f)=−12h2[f′(b)−f′(a)]
Explanation
If we expand In1(f), it can be written as follows:
In1(f)=h[21f(x0)+f(x1)+⋯+f(xn−1)+21f(xn)]
The trapezoidal rule is one of the simplest methods for calculating the numerical integration of a definite integral I(f)=∫abf(x)dx. This method can be easily thought of even if one only knows about the method of finite sums.
Proof
[1]
Strategy: Since the trapezoid is a linear interpolation of the given function, we can use the properties of polynomial interpolation.
I11(f):=(2b−a)[f(a)+f(b)]
This can be regarded as approximating the integral of the function by linearly interpolating f over the interval [a,b] to I(f). Then, the error En1(f) between the actual I(f) and I11(f) for some ξ∈[a,b] is computed as follows.
Polynomial interpolation:
- [4] Error with the actual function: For a function (n+1) times differentiable over f:R→R and for some ξ∈H{x0,⋯,xn}, the polynomial interpolation pn of f satisfies the following for some t∈R:
f(t)−pn(t)=(n+1)!(t−x0)⋯(t−xn)f(n+1)(ξ)
E11(f):=======I(f)−I11(f)∫ab[f(x)−b−af(b)(x−a)−f(a)(x−b)]dx∫ab[f(x)−p1(x)]dx21f′′(ξ)∫ab(x−a)(x−b)dx[21f′′(ξ)][−61(b−a)3]−121(b−a)3f′′(ξ)−121h3f′′(ξ)
■
[2]
Strategy: If we derive the Riemann sums, what follows naturally deduces from the Fundamental Theorem of Calculus.
According to Theorem [1], the error between the actual I(f) and In1(f) for some ξk∈[xk−1,xk] is computed as follows:
En1(f)==I(f)−In1(f)k=1∑n(−12h3f′′(ξk))
Regarding this,
n→∞limh2En1(f)====n→∞limh21k=1∑n(−12h3f′′(ξk))−121n→∞limk=1∑nhf′′(ξk)−121∫abf′′(x)dx−121[f′(b)−f′(a)]
Therefore,
n→∞limEn(f)E~n(f)=1
En1(f)≈E~n1(f)=−12h2[f′(b)−f′(a)]
■