Overview
This analysis evaluates the error using the mid-point approximation. We follow the logic in Moin.
The integral over a small interval can be written as
{% \int_{x_i}^{x_{i+1}} f(x)dx \approx (x_{i+1} - x_i) f(\frac{x_i + x_{i+1}}{2}) %}
Using the
Taylor Series
of {% f(x) %}
where we set
{% y = \frac{x_i + x_{i+1}}{2} %}
{% f(x) = f(y) + (x-y)f'(i) + \frac{1}{2}(x-y)^2f''(y)
+ \frac{1}{6}(x-y)^3 f'''(y) + ... %}
Subsituting in to the equation above and dropping the even powers (which vanish) we get
{% \int_{x_i}^{x_{i+1}} f(x)dx = (x_{i+1} - x_i) f(y) + \frac{(x_{i+1} - x_i)^3}{24} + \frac{1}{1920} (x_{i+1} - x_i)^5 f''''(y) + ... %}
which shows that the integration is accurate to third order.