Evaluation of:
$$I = \int_{0}^{\pi} \log(\sin(x)) dx$$
Over closed rectangular contour $ABCD$ complex analysis.
Kind of like the contour here: Contour Answer complex analysis.
BUT INSTEAD the right bound will be $\pi$ instead of $\pi/2$
Here is what I do not understand.
I will use the fact that
$$\sin(x) = \frac{e^{ix} - e^{-ix}}{2i}$$
$$I = \int_{0}^{\pi} \log(\frac{e^{ix} - e^{-ix}}{2i}) dx$$
$$I = \int_{0}^{\pi} \log(e^{ix} - e^{-ix}) dx - \left( \pi\log(2) + \frac{i\pi^2}{2} \right)$$
All we need to figure out now is:
$$J = \int_{0}^{\pi} \log(e^{ix} - e^{-ix}) dx$$
Using that contour.
How can we do so?