31

I need help with a textbook exercise (Stein's Complex Analysis, Chapter 3, Exercises 9). This exercise requires me to show that $$\int_0^1 \log(\sin \pi x)dx=-\log2$$ A hint is given as "Use the contour shown in Figure 9."

enter image description here

Since this is an exercise from Chapter 3, I think I should use the residue formula or something like that. But the function $f(x)=\log(\sin \pi x)$ becomes singular on $x=0$ and $x=1$, which makes the contour illegal for the residue theorem. Can anyone give me a further hint on this problem? Many thanks in advance!

P.S. This is my first time on Math Stack Exchange. If you find my post ambiguous, let me know.

TMM
  • 9,976
zytsang
  • 1,523
  • 1
  • 15
  • 16

3 Answers3

35

Consider $$f(z) = \log(1-e^{2 \pi zi }) = \log(e^{\pi zi}(e^{-\pi zi}-e^{\pi zi})) = \log(-2i) + \pi zi + \log(\sin(\pi z))$$ Then we have \begin{align} \int_0^1 f(z) dz & = \log(-2i) + \dfrac{i \pi}2 + \int_0^1 \log(\sin(\pi z))dz\\ & = \int_0^1 \log(\sin(\pi z))dz + \log(-2i) + \log(i)\\ & = \log(2) + \int_0^1 \log(\sin(\pi z))dz \end{align} Now it suffices to show that $\displaystyle \int_0^1 f(z) dz = 0$. Consider the contour $C(\epsilon,R)$ (which is the contour given in your question) given by the following.

$1$. $C_1(\epsilon,R)$: The vertical line along the imaginary axis from $iR$ to $i \epsilon$.

$2$. $C_2(\epsilon)$: The quarter turn of radius $\epsilon$ about $0$.

$3$. $C_3(\epsilon)$: Along the real axis from $(\epsilon,1-\epsilon)$.

$4$. $C_4(\epsilon)$: The quarter turn of radius $\epsilon$ about $1$.

$5$. $C_5(\epsilon,R)$: The vertical line from $1+i\epsilon$ to $1 + iR$.

$6$. $C_6(R)$: The horizontal line from $1+iR$ to $iR$.

$f(z)$ is analytic inside the contour $C$ and hence $\displaystyle \oint_C f(z) = 0$. This gives us $$\int_{C_1(\epsilon,R)} f dz + \int_{C_2(\epsilon)} f dz + \int_{C_3(\epsilon)} f dz + \int_{C_4(\epsilon)} f dz + \int_{C_5(\epsilon,R)} f dz + \int_{C_6(R)} f dz = 0$$

Now the integral along $1$ cancels with the integral along $5$ due to symmetry. Integrals along $2$ and $4$ scale as $\epsilon \log(\epsilon)$. Integral along $6$ goes to $0$ as $R \to \infty$. This gives us $$\lim_{\epsilon \to 0} \int_{C_3(\epsilon)} f dz = 0$$ which is what we need.


EDIT

@Did has given the standard way to evaluate this integral using real analysis techniques. Here is another way to prove it.

From integration by parts/ other techniques, we have that $$\int_0^{\pi/2} \sin^{2k}(x) dx = \frac{2k-1}{2k}\frac{2k-3}{2k-2} \cdots \frac{1}{2} \frac{\pi}{2} = \dfrac{(2k)!}{4^k (k!)^2} \dfrac{\pi}2 = \dfrac{\Gamma(2k+1)}{4^k \Gamma^2(k+1)} \dfrac{\pi}2$$

Hence, the analytic extension of $\displaystyle \int_0^{\pi/2} \sin^{2z}(x) dx $ is $\dfrac{\Gamma(2z+1)}{4^z \Gamma^2(z+1)} \dfrac{\pi}2$. (This needs to be justified)

Now differentiate both sides with respect to $z$, and set $z=0$, to get $$2 \int_0^{\pi/2} \log(\sin(x)) = -\dfrac{\pi}2 \log(4)$$ Hence, we get that $$\int_0^{\pi/2} \log(\sin(x)) dx = -\dfrac{\pi}2 \log(2)$$ This also provides you a way to evaluate $\displaystyle \int_0^{\pi/2} \sin^{n}(x) \log(\sin(x)) dx$.

  • 4
    Why do you use the multiplicative property of the complex log? I mean, in the first line why the equality holds if $\log(ab)=\log(a)+\log(b)$ is not always true in $\mathbb{C}$ – alexp9 May 03 '17 at 16:18
  • For future readers and @alexp9 true, but we don't need to be so careful here. Two ways to see this 1) we know the integral will evaluate to a positive real, so there's no need to fuss about arguments; 2) since $\sin(\pi z) \geq 0$ for $0 \leq z \leq 1$, we can write $\log(\sin(\pi z)) = \log(|\sin(\pi z)|) = \log(|e^{-\pi i z}(e^{2 \pi i z}-1)/(2 i)|)$ and work with the real logarithm. –  Jul 24 '19 at 14:55
  • @alexp9 it can be shown to be true for any $z\in[\delta, 1-\delta]$ (with $\delta > 0$). But of course it's not true in general. – Karthik Kannan Mar 07 '24 at 02:31
20

The integral $I$ to be computed is $$ I=2\int_0^{1/2}\log(\sin\pi x)\mathrm dx\stackrel{x\to 1/2-x}{=}2\int_0^{1/2}\log(\cos\pi x)\mathrm dx. $$ Summing up yields $$ 2I=2\int_0^{1/2}\log(\cos\pi x\sin\pi x)\mathrm dx=2\int_0^{1/2}\log(\sin2\pi x)\mathrm dx-2\int_0^{1/2}\log(2)\mathrm dx. $$ The first integral on the RHS is $$ \int_0^{1/2}\log(\sin2\pi x)\mathrm dx\stackrel{x\to2x}{=}\int_0^{1}\log(\sin\pi x)\frac{\mathrm dx}2=\frac{I}2, $$ and the second integral on the RHS is easy, hence $2I=I-\log2$ and, finally, $$ I=-\log2. $$

TCL
  • 14,262
Did
  • 279,727
  • 1
    Sorry, no complex analysis, simply the identities $\sin(\pi-u)=\sin u$, $\sin(\pi/2-u)=\cos u$ and $\sin(2u)=2\sin u\cos u$. – Did Mar 30 '13 at 23:37
  • 2
    I assume the OP wants a complex analysis proof, which makes use of the specific contour he has in the question. –  Mar 30 '13 at 23:38
  • and I didn't downvote. –  Mar 30 '13 at 23:45
  • 1
    @Marvis Obviously, I am well aware that "the OP wants a complex analysis proof" and that the proof in my post does not use complex analysis since I signaled it myself in a comment. – Did Mar 31 '13 at 00:07
  • I didn't see your comment when I posted mine. If you want, I can delete my comment. –  Mar 31 '13 at 00:08
  • 2
    (+1) a simple answer is a better answer. BTW, there is a typo in $2^{nd}$ line. – achille hui Mar 31 '13 at 00:23
  • @achillehui A missing factor 2, I presume? Thanks. – Did Mar 31 '13 at 00:32
  • I am sorry that I tick @Marvis 's answer as the accepted one, because he uses the contour. But your proof is truly amazing! I always viewed real techniques are lesser than complex ones until I saw your post. – zytsang Apr 02 '13 at 13:24
  • Please do not feel sorry, indeed the question asks for a proof using contour techniques and mine does not. Actually this would be a good MSE question: Which, if any, integrals (of real-valued functions) are computable ONLY through contour techniques? – Did Apr 02 '13 at 15:09
8
  1. Riemann sums

It is not a complex analytic technique but I think it is worth mentioning. We can compute the integral by taking Riemann sums and exploiting the identity: $$\prod_{k=1}^{n-1}\sin\frac{\pi k}{n}=\frac{2n}{2^n}\tag{1}$$ from which it follows that: $$\begin{eqnarray*}\int_{0}^{1}\log(\sin(\pi x))\,dx &=& \frac{1}{\pi}\int_{0}^{\pi}\log\sin x\,dx = \frac{1}{\pi}\lim_{n\to +\infty}\frac{\pi}{n}\sum_{k=1}^{n-1}\log\sin\frac{\pi k}{n}\\&=&\lim_{n\to +\infty}\frac{1}{n}\,\log\frac{2n}{2^n}=\color{red}{-\log 2}.\tag{2}\end{eqnarray*}$$

Other approaches deserve to be mentioned:

  1. Symmetry

The function $\sin(\pi x)$ is symmetric with respect to $x=\frac{1}{2}$, hence $$\begin{eqnarray*}I=\int_{0}^{1}\log\sin(\pi x)\,dx&\stackrel{x\to 2z}{=}&2\int_{0}^{1/2}\left[\log(2)+\log\sin(\pi z)+\log\cos(\pi z)\right]\,dz\\&=&\log(2)+2I.\end{eqnarray*}\tag{3}$$

  1. An obscene overkill

By Raabe's theorem $\int_{a}^{a+1}\log\Gamma(x)\,dx = \log\sqrt{2\pi}+a\log a-a$ and by the reflection formula for the $\Gamma$ function $\frac{\pi}{\sin(\pi z)}=\Gamma(z)\Gamma(1-z)$, hence the question is trivial by switching to logarithms and integrating over $(0,1)$.

Jack D'Aurizio
  • 353,855