Sometimes it can be frustrating using Riemann sums because a lot of calculation doesn’t get you all that good an approximation. You can see a lot of "white space" between the function \(f\) and the horzontal lines at the top of the rectangles that make up the upper or lower Riemann sum. If instead you let the rectangle become a right trapezoid, with both its top-left and top-right corner on the graph \(y = f(x)\text{,}\) then you get what is known as the trapezoidal approximation. The figure shows a trapezoidal approximation of an integral \(\displaystyle\int_0^4 f(x) \, dx\) with five trapezoids. Note that the first and last trapezoid are degenerate, that is, one of the vertical sides has length zero and the trapezoid is actually a right triangle. It is perfectly legitimate for one or more of the trapezoids to be degenerate.
Because the tops of the slices are allowed to slant, they remain much closer to the graph \(y = f(x)\) than do the Riemann sums. Because the area of a right trapezoid is the average of the areas of the two rectangles whose heights are the value of \(f\) at the two endpoints, it is easy to compute the trapezoidal approximation: it is just the average of the left-Riemann sum and the right-Riemann sum corresponding to the same partition into vertical strips.
Averaging the left and right Riemann sums always gives a sum containing the \(n-1\) common terms plus half the first term for the left Riemann sum and the last term for the right Riemann sum. In this case one gets
The trapezoidal estimate is usually much closer than the upper or lower estimate, though it has the drawback of being neither an upper nor a lower bound. However, if you know the function to be concave upward then the trapezoidal estimate is an upper bound. Similarly if \(f'' \lt 0\) on the interval then the trapezoidal estimate is an lower bound. In the figure, \(f\) is concave downward and the trapezoidal estimate is indeed a lower bound.
The function \(1/(1+x^3)\) is concave upward on \([1,2]\) (compute and see that the second derivative is a positive quantity divided by \((1+x^3)^3\)) so the trapezoidal estimate should be not only very close but an upper bound. Indeed, the trapezoidal estimate is the average of the upper and lower previously computed and is equal to \(0.25485...\) which is indeed just slightly higher than the true value of \(0.25425...\text{.}\)