Derivation: simple midpoint

Replacing the function by a central height to obtain the centred rectangle rule and its error.

Centred rectangle

abmf(m)(b-a) f(m)function fmidpoint
The base is bab-a and the height is taken at m=(a+b)/2m=(a+b)/2.
Expand diagram

The base is bab-a and the height is taken at m=(a+b)/2m=(a+b)/2.

Rule and error
  1. Define the centre of the interval:

    m=a+b2m=\frac{a+b}{2}
  2. Approximate the function by the constant f(m)f(m):

    abf(x)dxabf(m)dx\int_a^b f(x)\,dx\approx\int_a^b f(m)\,dx
  3. Since f(m)f(m) is constant with respect to xx, the integral is base times height:

    M1=(ba)f(m)=(ba)f ⁣(a+b2)M_1=(b-a)f(m)=(b-a)f\!\left(\frac{a+b}{2}\right)
  4. The linear Taylor term around mm contributes no net area by symmetry. The first remaining term depends on ff'':

    abf(x)dxM1=(ba)324f(ξ)\int_a^b f(x)\,dx-M_1=\frac{(b-a)^3}{24}f''(\xi)