It is given that: $\sin\frac{\pi }{n} \sin\frac{2\pi }{n}\cdots\sin\frac{(n-1)\pi }{n}=\frac{n}{2^{n-1}}$ It is asked to use the above identity to evaluate the following improper integral: $\int_0^\pi \log(\sin x) \, dx$
I used the definition of the integral in terms of Riemann sums: $\begin{align*}\int_0^\pi \log(\sin x) \, dx &=\lim_{n\rightarrow \infty }\frac{\pi }{n}\left[\sum_{k=1}^{k=n-1}\log\left(\sin\left(\frac{k\pi }{n}\right)\right)\right]\\ &=\lim_{n\rightarrow \infty }\frac{\pi }{n}\left[\log\left(\sin\frac{\pi }{n}\sin\frac{2\pi }{n}\cdots\sin\frac{(n-1)\pi }{n}\right)\right]\\ &=\lim_{n\rightarrow \infty }\frac{\pi }{n}\Big(\log n-(n-1)\log 2\Big)\\ &=-\pi \log 2 \end{align*}$
However, this integral is improper, so $\log(\sin(\pi ))=\log(0)=-\infty $. I am kind of cheating in my solution, because the Riemann sum above should be: $\sum_{k=1}^{k=n-1}\log\left(\sin\left(\frac{k\pi }{n}\right)\right)+\frac{\pi }{n}\log\left(\sin\left(\frac{n\pi }{n}\right)\right)\;,$ but I have no idea how to deal with the last term of the sum since $\sin\left(\frac{n\pi }{n}\right)=\sin(\pi)=0 $.
Can anyone show me how to deal with this? Also, if someone knows how to prove the first identity: $\sin\frac{\pi }{n}\sin\frac{2\pi }{n}\cdots\sin\frac{(n-1)\pi }{n}=\frac{n}{2^{n-1}}$ please write down your proof below? Thanks