Approximations of the Riemann Integral in R

Equal Partitions

Let Pn be uniform partitions of n elements. Evaluating the Reimann sums at left or right endpoints is an important construction. They receive a particular notation, where hn=b−an:

Ln(f)=hn∑k=0n−1f(a+khn)Rn(f)=hn∑k=1nf(a+khn)

If we don’t have a reason to prefer either one of them, it’s reasonable to take the mean we get:

Tn(f)=Ln(f)+Rn(f)2=hn(f(a)2+∑k=1n−1f(a+khn)+f(b)2)

In particular, if f is monotonic then the integral will be trapped between the two, and we will get that the average will differ of the integral by a small amount:

|∫abf−Tn(f)|≤b−an|f(b)−f(a)2|

Trapezoidal Rule

Continue to work with equal partitions, Pn and a width of hn=b−an . Let’s consider the function gn is a piecewise function, of a linear approximation of f at the interval [a+(k−1)hn,a+khn]=Ik. In other words:

∫Ikgn=12hn[f(a+(k−1)hn)+f(a+khn)]

Then the integral along all [a,b] will be equal to:

∫abgn=∑k=1n∫Ikgn=12hn∑k=1nf(a+(k−1)hn)+f(a+khn)=hn(f(a)2+∑k=1nf(a+khn)+f(b)2)=Tn(f)

Tn(f) is the n-th Trapezoidal Approximation.

Theorem: If f∈C2[a,b], then there’s a c∈[a,b]:

Tn(f)−∫abf=(b−a)hn212f″(c)

Corollary: If f∈C2[a,b] and let |f″|≤B2, then:

|∫abf−Tn(f)|≤(b−a)312n2B2

Midpoint Rule

Mn(f)=hn∑k=1nf(a+(k−12)hn)

Theorem: if f∈C2[a,b], then there’s a c∈[a,b] that:

∫abf−Mn(f)=(b−a)hn224f″(c)

Corollary: If f∈C2[a,b] and let |f″|≤B2, then:

|∫abf−Mn(f)|≤(b−a)324n2B2

How to transform knowledge of Tn(f) and Mn(f) into a type of Tn(f):

T2n(f)=12Mn(f)+12Tn(f)

Simpson’s Rule

Given a n∈2N, the Simpson Sum is defined as follows:

Sn(f)=hn3(∑k=1n/2f(a+(2k−2)hn)+4f(a+(2k−1)hn)+f(a+2khn))

Theorem: If f∈C4[a,b], there’s a c∈[a,b] that:

Sn(f)−∫abf=(b−a)5180n4f(4)(c)

Corollary: If f∈C4[a,b], and |f(4)|≤B4, then:

|∫abf−Sn(f)|≤(b−a)5180n4B4

How to transform knowledge of Tn(f) and Mn(f) into a type of Sn(f):

S2n(f)=23Mn(f)+13Tn(f)