TheoremComplete

Euler-Maclaurin Summation Formula

Theorem4.2Euler-Maclaurin Formula

Let fC2p+2[a,b]f \in C^{2p+2}[a, b] and h=(ba)/nh = (b - a)/n. Then the composite trapezoidal rule satisfies: Tn(f)=abf(x)dx+k=1pB2k(2k)!h2k[f(2k1)(b)f(2k1)(a)]+RpT_n(f) = \int_a^b f(x)\, dx + \sum_{k=1}^p \frac{B_{2k}}{(2k)!} h^{2k} \left[f^{(2k-1)}(b) - f^{(2k-1)}(a)\right] + R_p where B2kB_{2k} are the Bernoulli numbers (B2=1/6B_2 = 1/6, B4=1/30B_4 = -1/30, B6=1/42,B_6 = 1/42, \ldots) and the remainder satisfies RpB2p+2(2p+2)!h2p+2(ba)f(2p+2)|R_p| \leq \frac{|B_{2p+2}|}{(2p+2)!} h^{2p+2} (b-a) \|f^{(2p+2)}\|_\infty.


Proof Outline

Proof

The proof uses the Bernoulli polynomials Bk(x)B_k(x) defined by textet1=k=0Bk(x)tkk!\frac{te^{xt}}{e^t - 1} = \sum_{k=0}^\infty B_k(x) \frac{t^k}{k!}.

Step 1. On a single interval [0,h][0, h], apply repeated integration by parts with Bk(x/h)B_k(x/h): 0hf(x)dx=h2[f(0)+f(h)]k=1pB2k(2k)!h2k[f(2k1)(h)f(2k1)(0)]+rp\int_0^h f(x)\, dx = \frac{h}{2}[f(0) + f(h)] - \sum_{k=1}^p \frac{B_{2k}}{(2k)!} h^{2k}[f^{(2k-1)}(h) - f^{(2k-1)}(0)] + r_p where rp=h2p+2(2p+2)!0hB2p+2(x/h)f(2p+2)(x)dxr_p = -\frac{h^{2p+2}}{(2p+2)!}\int_0^h B_{2p+2}(x/h) f^{(2p+2)}(x)\, dx.

Step 2. Sum over all subintervals [xj,xj+1][x_j, x_{j+1}] for j=0,,n1j = 0, \ldots, n-1. Interior derivative terms telescope: f(2k1)(xj+1)f(2k1)(xj)f^{(2k-1)}(x_{j+1}) - f^{(2k-1)}(x_j) at shared nodes cancel, leaving only the boundary contributions f(2k1)(b)f(2k1)(a)f^{(2k-1)}(b) - f^{(2k-1)}(a).

Step 3. The left side sums to abf(x)dx\int_a^b f(x)\, dx and the trapezoidal contributions sum to Tn(f)T_n(f), yielding the stated formula. The remainder bound follows from B2p+2(t)B2p+2|B_{2p+2}(t)| \leq |B_{2p+2}| for t[0,1]t \in [0,1]. \square


Applications

ExampleRichardson Extrapolation from Euler-Maclaurin

The Euler-Maclaurin formula shows T(h)=I+c1h2+c2h4+T(h) = I + c_1 h^2 + c_2 h^4 + \cdots with explicit constants ckc_k. This asymptotic expansion in even powers of hh is the theoretical foundation for Romberg integration: combining T(h)T(h) and T(h/2)T(h/2) eliminates the h2h^2 term, giving the Simpson-like formula 4T(h/2)T(h)3=I+O(h4)\frac{4T(h/2) - T(h)}{3} = I + O(h^4). Each level of extrapolation removes two orders of error.

RemarkThe Trapezoidal Rule for Periodic Functions

When ff is periodic with period bab - a, all boundary terms f(2k1)(b)f(2k1)(a)=0f^{(2k-1)}(b) - f^{(2k-1)}(a) = 0 vanish. The Euler-Maclaurin formula then gives Tn(f)=I+RpT_n(f) = I + R_p for any pp. If ff is CC^\infty-periodic (or analytic and periodic), the trapezoidal rule converges exponentially fast: TnI=O(ecn)|T_n - I| = O(e^{-cn}) for some c>0c > 0. This remarkable phenomenon makes the trapezoidal rule the method of choice for periodic integrands.

ExampleComputing $\sum_{k=1}^n 1/k$ via Euler-Maclaurin

The Euler-Maclaurin formula also converts sums to integrals. For k=1n1k\sum_{k=1}^n \frac{1}{k}: k=1n1k=lnn+γ+12n112n2+1120n4\sum_{k=1}^n \frac{1}{k} = \ln n + \gamma + \frac{1}{2n} - \frac{1}{12n^2} + \frac{1}{120n^4} - \cdots where γ0.5772\gamma \approx 0.5772 is the Euler-Mascheroni constant. This asymptotic expansion allows high-precision computation of harmonic sums and the constant γ\gamma.