using the method you're suggesting will always get you an approximate value unless the different between x_{i} and x_{i+1} is infinitely small. using the formula method is no good.
you might want to brush up on sigma notation because I think that's where the confusion is. the distance between x_{i} and x_{i + 1} is something you'd "decide" based on how precise of an answer you want.
and the integral would equal the sum of all f(x_{i}) where x_{i-1}, x_{i} and x_{i+1} are equally spaced and the spacing is decided depending on how many calculations you can afford to make.
tl;dr : humans can't use that method/formula you're suggesting unless you're looking for the area of a rectangle-derived shape.
just integrate x/2 from 0 to 2

edit: you can PM me if you have follow-up question [you can post here and tell me to come check or straight up pm]
This post was edited by rx7drifter on Jul 12 2013 05:36pm