Finding the upper and lower Riemann-sums of trigonometric functions

2.8k Views Asked by At

I am asked to find Riemann-sums for the function $f(x) = \cos x, x \in [0, 2\pi], n = 4 \rightarrow \Delta x = \frac{\pi}{2}$

I was able to get the correct answers by intuition, but I have some trouble understanding how the process works. For the lower riemann sum, we have that

$$L_{f, P_4} = \frac{\pi}{2}(f(\pi/2) + f(\pi) + f(\pi) + f(\frac{3\pi}{2}) = -\pi$$

I have not worked with curves that changes from positive to negative like these together with Riemann-sums before, but I was able to get the correct answers by intuitevely thinking that is needs to have four factors, and only the lower ones are to be counted. However, I am very insecure about my hypothese where I decided to add $f(\pi)$ twice. What's the logic here?