Denote f(x0)=a=5.8, f(x1)=b, f(x2)=c, ..., f(x6)=g.
The formula you stated (let me replace a and b with x and y, respectively, to avoid confusion with your problem) requires values of f at x, y and their midpoint (x+y)/2, so to apply it to the problem one would group the intervals as {x0, x1...