Trapezoidal rule error. Without loss of generality, work on [0,h] where h=bβa. Define E(f)=β«0hβf(x)dxβ2hβ[f(0)+f(h)]. Note E is linear and E(1)=0, E(x)=0 (both sides give h2/2).
For the error representation, consider g(t)=β«0tβf(x)dxβt2f(0)+f(t)β for tβ[0,h]. Then g(0)=0 and g(h)=E(f).
Compute gβ²(t)=f(t)β2f(0)+f(t)ββ2tβfβ²(t)=2f(t)βf(0)ββ2tβfβ²(t).
By the mean value theorem, f(t)βf(0)=tfβ²(c) for some cβ(0,t), and then gβ²(t)=2tβ[fβ²(c)βfβ²(t)]. Apply MVT again: fβ²(c)βfβ²(t)=(cβt)fβ²β²(d) for some d.
For the precise error constant, use the Peano kernel theorem. The error functional E annihilates polynomials of degree β€1, so E(f)=β«0hβK(t)fβ²β²(t)dt where K(t)=21βExβ[(xβt)+1β] is the Peano kernel. Computing: for 0β€tβ€h, K(t)=21β[β«thβ(xβt)dxβ2hβ(hβt)]=21β[2(hβt)2ββ2h(hβt)β]=4(hβt)(hβtβh)β=β4t(hβt)ββ
22β.
More directly: K(t)=21β[2(hβt)2ββ2h(hβt)β]=4(hβt)β(hβtβh)=4βt(hβt)β. Wait -- let us recompute carefully. K(t)=21β[β«thβ(xβt)dxβ2hβ(hβt)]=21β[2(hβt)2ββ2h(hβt)β]=4(hβt)β[(hβt)βh]=β4t(hβt)β.
Since K(t)β€0 on [0,h], the intermediate value theorem for integrals gives E(f)=fβ²β²(ΞΎ)β«0hβK(t)dt=fβ²β²(ΞΎ)β
(β12h3β), yielding ETβ=β12h3βfβ²β²(ΞΎ).
Simpson's rule error. On [0,2h] with m=h, Simpson's rule is S=3hβ[f(0)+4f(h)+f(2h)]. The error functional E(f)=β«02hβf(x)dxβS annihilates polynomials of degree β€2 by construction. The key insight is that E(x3)=0 as well, due to symmetry about x=h: both the integral and Simpson's formula give 4h4 for f(x)=x3.
Since E annihilates polynomials of degree β€3, the Peano kernel representation is E(f)=β«02hβK3β(t)f(4)(t)dt where K3β(t)=61βExβ[(xβt)+3β]. One can verify that K3β(t)β€0 on [0,2h] (by direct computation using symmetry), so E(f)=f(4)(Ξ·)β«02hβK3β(t)dt. The integral evaluates to β90h5β, giving ESβ=β90h5βf(4)(Ξ·)=β2880(bβa)5βf(4)(Ξ·). β‘