John R. answered 05/05/20
Calculus, Probability, and Stat Tutor, Math Degree, 20+ years Exp.
The idea here is that the area under the graph of f(x) can be estimated by dividing the area into approximating rectangles. The width of each rectangle is Δx. The Δx's don't have to be the same size, but when they are, Δx=(b-a)/n=(6-2)/2=2. The height (length) of each rectangle is given by the value of f(x) at some x within the corresponding subinterval. Again, any x within each subinterval can be used, but the problem asks that we use the midpoints of each subinterval. For each subinterval, the corresponding area of the rectangle will be L*W=f(xi)*Δxi.
For n=2, the two subintervals of [2,6] are [2,4] and [4,6]. The two midpoints are therefore x1=3 and x2=5, and the approximation of the area under the curve between 2 and 6 is:
f(x1)*Δx+f(x2)*Δx = f(3)*2 + f(5)*2 = (3+cos(3π))*2 + (5+cos(5π))*2 = (3+(-1))*2 + (5+(-1))*2 = 12.