[Math] Averaging the values of $\cos x$ over one period

algebra-precalculusaveragetrigonometry

I'm calculating the average value of $\cos x$ by dividing the period $[0,2\pi]$ into ten intervals which means that I should be looking for the average of 11 results. What I get is approx. 0.09. The expected result 0 is only obtained if I average over the values of the first 10 points. However, 10 points do not span the whole period $[0, 2\pi]$. What are your thoughts on this apparent problem?

Best Answer

Imagine another sensible way of calculating the average.

Divide into $10$ intervals, find the midpoint of each. Calculate the function value at these midpoints, add up, divide by $(10)(2\pi)$. This natural calculation uses $10$ points.

Using both $f(0)$ and $f(2\pi)$ is a useful idea, if modified slightly, by counting $f(0)$ and $f(2\pi)$ each with half-weight. So use $$\frac{1}{2\pi}\left(\frac{\frac{1}{2}f(0)+f(2\pi/10)+\cdots+f(18\pi/10)+\frac{1}{2}f(2\pi)}{10}\right).$$ This is essentially the useful Trapezoidal Rule.

Related Question