Can the following integral be evaluated using complex method by substituting $\sin(x) = {e^{ix}-e^{-ix} \over 2i}$? $$ I=\int_0^{\pi/2} \ln ( \sin(x)) \; dx = - {\pi \ln(2) \over 2}$$
-
2Are you sure you want to compute $I$ using "complex method"? – Did Sep 01 '12 at 10:35
-
1I know how to calculate it with the other method. I'm just looking if it can be done. I don't have necessity to do it. – Monkey D. Luffy Sep 01 '12 at 10:55
-
Nice question (+1) – user 1591719 Sep 01 '12 at 11:03
-
@Chris'sister thank you ... :D – Monkey D. Luffy Sep 01 '12 at 11:04
-
Are you sure your lower limit of integration is correct? I don't see much hope for it as $x\to 0^+$ though. – N8tron Sep 01 '12 at 13:33
-
5This can be done with complex analysis, using the same exact method as my answer here. – Nick Strehlke Sep 01 '12 at 15:07
-
@NickStrehlke many thanks!! – Monkey D. Luffy Sep 01 '12 at 17:20
4 Answers
Note first that \begin{align*} \int_0^{2\pi} \ln(\sin t)\,dt &= 2\int_0^{\pi/2} \ln(\sin t)\,dt + 2\int_0^{\pi/2} \ln(-\sin t)\,dt \\ &= 2\int_0^{\pi/2} \ln(\sin t)\,dt + 2\int_0^{\pi/2} \Bigl(\ln(\sin t) + i\pi\Bigr)\,dt \\ &= 4I + \pi^2i \end{align*} and, using the substitution $z=e^{it}$ \begin{align*} \int_0^{2\pi} \ln(\sin t)\,dx &= \int_{|z|=1} \ln\left(\frac{z-1/z}{2i}\right)\,\frac{dz}{iz} \\ &= \int_{|z|=1} \frac{\ln(1-z^2)}{iz}\,dz - \int_{|z|=1} \frac{\ln z}{iz}\,dz + \int_{|z|=1} \frac{\ln(i/2)}{iz}\,dz. \end{align*}
The first integral on the right is zero $\dots$ this is because $\ln(1-z^2)$ is analytic inside the unit disk and vanishes at $z=0$ so the singularity in the integrand there is removable (you need to shrink the circle of integration slightly to avoid the points $z=\pm1$ and then let the radius go to 1).
The second integral we do directly $$ \int_{|z|=1} \frac{\ln z}{iz}\,dz = \left[\frac{1}{2i}\bigl(\ln z\bigr)^2\right]_{-1^+}^{-1^-} = \frac{1}{2i}\Bigl[(\pi i)^2 - (-\pi i)^2 \Bigr] = 0 $$ where $-1^\pm$ indicate points just above and below $-1$ and on either side of the branch cut of $\ln$ along the negative real axis.
The third integral is just $2\pi i\ln(i/2)/i = 2\pi\bigl(-\ln2 + \pi i/2\bigr)$.
Therefore $4I + \pi^2i = -2\pi\ln2 + \pi^2i$ and $I = -\frac{\pi}{2}\ln2$.

- 901
- 6
- 5
-
1Nice! Would you mind writing a little more explanation of the step where you split the integral into three parts? – Sep 03 '12 at 20:16
Let us change variables $u=\sin^2(x)$, $x=\arcsin(\sqrt{u})$, $\mathrm{d}x = \frac{1}{2} \frac{\mathrm{d}u}{\sqrt{u(1-u)}}$: $$ \int_0^{\pi/2} \ln(\sin(x)) \mathrm{d}x = \int_0^1 \frac{1}{2} \ln(u) \cdot \frac{1}{2} \frac{\mathrm{d}u}{\sqrt{u(1-u)}} \stackrel{u=1-v}{=} \frac{1}{4} \int_0^1 \ln(1-v) \cdot \frac{\mathrm{d}v}{\sqrt{v(1-v)}} $$ Adding two last integrals, and dividing by $2$: $$ \int_0^{\pi/2} \ln(\sin(x)) \mathrm{d}x = \frac{1}{4} \int_0^1 \frac{\ln\left(\sqrt{u(1-u)}\right)}{\sqrt{u(1-u)}} \mathrm{d}u = -\frac{1}{4} \left.\frac{\mathrm{d}}{\mathrm{d}s}\operatorname{B}\left(s,s\right)\right|_{s=\frac{1}{2}} $$ Since $\operatorname{B}\left(s,s\right) = \frac{\Gamma(s)^2}{\Gamma(2s)}$: $$ \frac{\mathrm{d}}{\mathrm{d}s}\operatorname{B}\left(s,s\right) = 2 \operatorname{B}\left(s,s\right) \left(\psi(s) - \psi(2s)\right) $$ where $\psi(s)$ is the digamma function. Using $\operatorname{B}\left(\frac{1}{2},\frac{1}{2}\right) = \pi$, and duplication identity for the digamma function: $$ 2 \psi(2s) = \psi(s) + \psi\left(s+\frac{1}{2}\right) + 2 \log(2) \quad \stackrel{s=\frac{1}{2}}{\implies} \quad \psi\left(\frac{1}{2}\right) - \psi(1) = -2\ln(2) $$ Combining, we arrive at the result: $$ \int_0^{\pi/2} \ln(\sin(x)) \mathrm{d}x = \frac{1}{4} \cdot \pi \cdot \left(-2 \ln(2)\right) = -\frac{\pi}{2} \ln(2) $$

- 70,631
Consider a known formula (which can be proved by the identity of $\sin x$ you mentioned):
$$ \prod_{j=1}^{n-1}\sin\left(\frac{j}{n}\pi\right)=\frac{n}{2^{n-1}}\quad n\geq 2, $$ which implies that $$ \frac{\pi}{2n}\sum_{j=1}^{n-1}\ln \left(\sin\frac{j}{n}\pi\right)=\frac{\pi}{2n}\ln (n)-\frac{\pi\cdot (n-1)}{2n}\ln 2. $$ Now taking the limit on both side as $n\to\infty$, you get what you want by recognizing that the left hand side is a Riemann sum.
$$ \begin{aligned}\int_0^{\frac{\pi}{2}} \ln (\sin x) d x = & \int_0^{\frac{\pi}{2}} \ln \left(\frac{e^{x i}-e^{-x i}}{2 i}\right) d x \\ = & \int_0^{\frac{\pi}{2}} \ln \left(e^{x i}-e^{-x i}\right) d x-\int_0^{\frac{\pi}{2}} \ln (2 i) d x \\ = & \int_0^{\frac{\pi}{2}} \ln \left(e^{x i}\left(1-e^{-2 x i}\right)\right) d x-\frac{\pi}{2} \ln (2 i) \\ = & \int_0^{\frac{\pi}{2}} x i d x+\int_0^{\frac{\pi}{2}} \ln \left(1-e^{-2 x i}\right) d x-\frac{\pi}{2} \ln (2 i) \\ = & \frac{\pi^2}{8} i+\int_0^{\frac{\pi}{2}} \ln \left(1-e^{-2 x i}\right) d x-\frac{\pi}{2}\left(\ln 2+\frac{i \pi}{2}\right) \end{aligned} $$
For the remaining integral, let $y=e^{-2xi}$ yields
$$ \begin{aligned} \int_0^{\frac{\pi}{2}} \ln \left(1-e^{-2 x i}\right) d x&=\frac{1}{2 i} \int_{-1}^1 \frac{\ln (1-y)}{y} d y \\ & =\frac{1}{2 i}\left[-\operatorname{Li_2}(1)+ \operatorname{Li_2}(-1)\right] \\ & =-\frac{1}{2 i}\left(\frac{\pi^2}{6}+\frac{\pi^2}{12}\right)\\&=\frac{i \pi^2}{8} \end{aligned} $$ Summing them up reaches the conclusion that
$$\boxed{\int_0^{\frac{\pi}{2}}\ln (\sin x) d x =-\frac{\pi}{2}\ln 2}$$

- 20,421