The previous question linked by b00n het discusses the sum of two periodic functions but the same argument applies to the product.
Sum of two periodic functions is periodic?
The answer is that the sum or product of two periodic functions is periodic if and only if the ratio of their periods is rational. If the ratio of the periods is not rational then you cannot calculate the LCM. Even if the ratio of the periods is rational, the period of the sum or product will not necessarily be the LCM of the periods of components; it could be shorter. What's the period of $sin(x)$, $sin(x) - sin(x)$, and $sin(x) \times sin(x)$? However it won't be longer. The sum or product will either be constant or its period will be the LCM divided by an integer.
Consider $sin(x) \times sin(3.14159 x)$, what's its period? It's rather large: $628318 \times \pi$. How about $sin(x) \times sin(3.1415926535 x)$?
The point of these examples is that they are close approximations to $sin(x) \times sin(\pi x)$. You would need a very wide or very accurate graph to tell them apart. If your graph was wide enough then you would notice that $sin(x) \times sin(\pi x)$ would drift slowly from these approximations.
Another thing to consider is whether $sin(\pi x)$ could share a zero with $sin(x)$ other than at $x = 0$. It should be obvious that this would only be possible if $\pi$ was rational. However, name any non-zero error margin and it will come within that margin eventually.
Finally note that a computer generated graph, at least one which uses standard floating point arithmetic, will never show this since any value than can be stored in floating point format, regardless of the precision, will be rational. Even if you used some fancy techniques that overcame this, you could still not distinguish the periodic and non-periodic cases without an infinite size and precision graph.
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.