If what I think you are doing is right, then what you have done is good.
Use left and right endpoints and the given number of rectangles to find two approximations of the area of the region between the graph of the function and the x-axis over the given interval.
f(x) = cos(x), (0, ), 4 rectangles
Plese check for me where I'm wrong
the width of each retangles is
use right endpoints we have
use left endpoints we have