31
$\begingroup$

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.

$\endgroup$
7
  • $\begingroup$ I bet the contour is ever so slightly bigger than the box you've indicated, so that you can use the residue theorem. But if not, then you'll just have to use the definition and treat it as improper. $\endgroup$ Commented Mar 26, 2013 at 11:53
  • $\begingroup$ Note that, $z=0$ and $z=1$ are branch points. $\endgroup$ Commented Mar 26, 2013 at 12:28
  • 1
    $\begingroup$ The singularities at $x=0$ and $x=1$ are integrable. $\endgroup$ Commented Mar 26, 2013 at 12:49
  • 1
    $\begingroup$ @MhenniBenghorbal: If they are branch points, then how will it help to solve this problem? $\endgroup$ Commented Mar 26, 2013 at 13:54
  • 2
    $\begingroup$ For example, $$\int_0^1 dx \: \log{x} = [x \log{x} - x]_0^1 = -1$$ Note that the integral is finite despite log having a singularity at $x=0$. $\endgroup$ Commented Mar 26, 2013 at 13:55

3 Answers 3

37
+150
$\begingroup$

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$.

$\endgroup$
4
  • 5
    $\begingroup$ 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}$ $\endgroup$ Commented May 3, 2017 at 16:18
  • $\begingroup$ 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. $\endgroup$ Commented Jul 24, 2019 at 14:55
  • $\begingroup$ @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. $\endgroup$ Commented Mar 7, 2024 at 2:31
  • $\begingroup$ In the integration after the first line from 0 to 1, why is there a factor of $1/2$ for $\pi i$? $\endgroup$ Commented Apr 20 at 13:55
20
$\begingroup$

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. $$

$\endgroup$
9
  • 1
    $\begingroup$ 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$. $\endgroup$ Commented Mar 30, 2013 at 23:37
  • 2
    $\begingroup$ I assume the OP wants a complex analysis proof, which makes use of the specific contour he has in the question. $\endgroup$ Commented Mar 30, 2013 at 23:38
  • $\begingroup$ and I didn't downvote. $\endgroup$ Commented Mar 30, 2013 at 23:45
  • 1
    $\begingroup$ @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. $\endgroup$ Commented Mar 31, 2013 at 0:07
  • 2
    $\begingroup$ (+1) a simple answer is a better answer. BTW, there is a typo in $2^{nd}$ line. $\endgroup$ Commented Mar 31, 2013 at 0:23
9
$\begingroup$
  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)$.

$\endgroup$

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.