A long time ago, I came across this question. In the third answer, that drew my interest, we have the calculation of
$$\int_0^{\pi}\log (\sin \theta)d\theta$$
by taking logarithms in both sides of the trigonometric formula
$$\prod_{k=1}^{n-1}\sin (k\pi/n)=\frac{n}{2^{n-1}}$$
and using Riemann sums. My main concern is the following. How can we use the theory of Riemann sums if the function (here $\theta \mapsto \log (\sin \theta)$) is unbounded in the interval of integration (in our case $[0,\pi]$)? Do you know what's going on at this point of the aforementioned solution?
Thanks in advance for your valuable help!
You are correct about the fact that Riemann-integrability is usually defined for bounded functions, and $\log\sin\theta$ is not bounded over $(0,\pi)$. On the other hand the boundedness assumption can be dropped in some peculiar circumstances. Indeed, the sequence $$ a_n = \frac{\pi}{n}\sum_{k=1}^{n-1}\log\sin\frac{\pi k}{n}=-\pi\log 2+\frac{\pi\log(2n)}{n} $$ is convergent, and for any $n>2$ $$ a_n = \int_{0}^{\frac{n-2}{n}\pi}\log\sin\left(\frac{\pi}{n}\left\lceil\frac{n\theta}{\pi}\right\rceil\right)\,d\theta $$ holds. By the dominated convergence theorem, $\lim_{n\to+\infty} a_n$ equals the value of the Lebesgue (or improper-Riemann) integral $\int_{0}^{\pi}\log\sin\theta\,d\theta$.