Let t(i) = i/n, for i = 0, 1, .., n.
Then the formula inside the absolute value is equivalent to:
INT[0,1] f(t) dt - (1/n) SUM[w=1,n] f(w/n) =
= INT[0,1] f(t) dt - (1/n) SUM[i=1,n] f(t(i)) =
= SUM [i=1,n] INT[t(i-1), t(i)] f(t) dt - (1/n) SUM [i=1,n] f(t(i)) =
= SUM [i=1,n] ( INT[t(i-1), t(i)] f(t) dt - (1/n) f(t(i)) ) =
= SUM [i=1,n] INT[t(i-1), t(i)] ( f(t) - f(t(i)) ) dt
Bringing the absolute value back into the equation and using the triangle inequality and the integral inequality
| INT [a,b] f(t) dt | <= INT [a,b] |f(t)| dt
We have:
| SUM [i=1,n] INT[t(i-1), t(i)] ( f(t) - f(t(i)) ) dt | <=
<= SUM [i=1,n] | INT[t(i-1), t(i)] ( f(t) - f(t(i)) ) dt | <=
<= SUM [i=1,n] INT[t(i-1), t(i)] | f(t) - f(t(i)) | dt
By the mean value theorem we have, for some c:
| f(t) - f(t(i)) | = | f'(c) (t - t(i)) | <= A | t - t(i) |
Continuing:
<= SUM [i=1,n] INT[t(i-1), t(i)] A | t - t(i) | dt =
= SUM [i=1,n] INT[t(i-1), t(i)] A ( t(i) - t ) dt =
= SUM [i=1,n] INT[t(i-1), t(i)] A ( t(i) - t ) dt =
= SUM [i=1,n] [ A (t(i)t - t^2/2) ] [t=t(i-1), t=t(i)] =
= SUM [i=1,n] A (t(i)^2/2 - t(i)t(i-1) + t(i-1)^2/2) =
= SUM [i=1,n] (A/2) (t(i) - t(i-1))^2 =
= SUM [i=1,n] (A/2) (1/n)^2 =
= n * (A/2) (1/n)^2 =
= A/2n <= A/n