I can't make a whole lot of sense out of your questions, but you seem to be applying the formula without knowing where it came from. The "formula" for the trapezoidal rule can be derived by simply drawing a function f(x) from x = a to x = b and splitting it into several trapezoids. By simply using geometry to find the area of each trapezoid, we will obtain
. Here, is the "height" of each trapezoid, and is just the sum of the two bases of the trapezoid (this is why we get the coefficients of 1,2,2,...,2,1).
In the case where the are evenly spaced, the sum will telescope to , which is just , so , which is constant. Substitute that into the summation to obtain the formula.