## Evaluation of a surprisingly beautiful integral

I wish to evaluate

$$\int_0^{\pi/3} dx\: \ln^2\left(\frac{\sin x }{\sin (x+\pi/3)}\right)$$

It turns out that this integral takes on a very simple form amenable to analysis via residues. Let $u = \sin{x}/\sin{(x+\pi/3)}$. We may then find that (+)

$$\tan{x} = \frac{(\sqrt{3}/2)u}{1-(u/2)}$$

A little bit of algebra reveals a very nice form for the differential:

$$dx = \frac{\sqrt{3}}{2} \frac{du}{1-u+u^2}$$

so the original integral takes on a much simpler-looking form:

$$\frac{\sqrt{3}}{2} \int_0^1 du \frac{\log^2{u}}{1-u+u^2}$$

This is not ready for contour integration yet. We may transform this into such an integral by substituting $u=1/v$ and observing that

$$\int_0^1 du \frac{\log^2{u}}{1-u+u^2} = \int_1^\infty du \frac{\log^2{u}}{1-u+u^2} = \frac{1}{2} \int_0^\infty du \frac{\log^2{u}}{1-u+u^2}$$

We may now analyze that last integral via the residue theorem. Consider the integral

$$\oint_C dz \frac{\log^3{z}}{1-z+z^2}$$

where $C$ is a keyhole contour that passes up and back along the positive real axis. It may be shown that the integral along the large and small circular arcs vanish as the radii of the arcs goes to $\infty$ and $0$, respectively. We may then write the integral in terms of positive contributions just above the real axis and negative contributions just below. The result is

$$\oint_C dz \frac{\log^3{z}}{1-z+z^2} = \begin{array}\\ i \left ( – 6 \pi \int_0^\infty du \frac{\log^2{u}}{1-u+u^2} + 8 \pi^3 \int_0^\infty du \frac{1}{1-u+u^2} \right ) \\ + 12 \pi^2 \int_0^\infty du \frac{\log{u}}{1-u+u^2} \end{array}$$

We set this equal to $i 2 \pi$ times the sum of the residues of the poles of the integrand within $C$. The poles are $z \in \{e^{i \pi/3},e^{i 5\pi/3}\}$. The residues are

$$\mathrm{Res}_{z=e^{i \pi/3}} = -\frac{\pi^3}{27 \sqrt{3}}$$

$$\mathrm{Res}_{z=e^{i 5\pi/3}} = \frac{125 \pi^3}{27 \sqrt{3}}$$

$i 2 \pi$ times the sum of these residues is then

$$i \frac{248 \pi^4}{27 \sqrt{3}}$$

Equating imaginary parts of the integral to the above quantity, we see that

$$– 6 \pi \int_0^\infty du \frac{\log^2{u}}{1-u+u^2} + 8 \pi^3 \int_0^\infty du \frac{1}{1-u+u^2} = \frac{248 \pi^4}{27 \sqrt{3}}$$

Now, I will state without proof for now that (++)

$$\int_0^\infty du \frac{1}{1-u+u^2} = \frac{4 \pi}{3 \sqrt{3}}$$

Then with a little arithmetic, we find that

$$\int_0^\infty du \frac{\log^2{u}}{1-u+u^2} = \frac{20 \pi^3}{81 \sqrt{3}}$$

The integral we want is $\sqrt{3}/4$ times this value; therefore

$$\int_0^{\pi/3} dx \log^2{\left [ \frac{\sin{x}}{\sin{(x + \pi/3)}} \right ]} = \frac{5\pi^3}{81}$$

**Proof of (++)**

Now, to prove (++), we go right back to the observation (+) that

$$x = \int \frac{du}{1-u+u^2} \implies \tan{\left ( \frac{\sqrt{3}}{2} x \right )} = \frac{(\sqrt{3}/2)u}{1-(u/2)}$$

Therefore

$$\int_0^1 \frac{du}{1-u+u^2} = \frac{2}{\sqrt{3}} \left [ \arctan \left ( \frac{(\sqrt{3}/2) u}{1-(u/2)} \right ) \right ]_0^1 = \frac{2}{\sqrt{3}} \frac{\pi}{3}$$

and we showed that this is $1/2$ the integral over $[0,\infty)$, and

$$\int_0^\infty \frac{du}{1-u+u^2} = \frac{4 \pi}{3 \sqrt{3}}$$

QED

### Did Tales From Topographic Oceans kill progressive rock?

Dave Weigel at Slate has done nerds all over a wonderful service in writing a five-part series about Prog Rock. Weigel recalls the birth of what we know as progressive rock with Keith Emerson and his band The Nice. Weigel doesn’t really offer a strict definition of the genre because, well…who has one? Rock with

### Confirmation Bias and Voting in OH

I knew that the liberal/conservative divide in this country was bad, but never this bad. I don’t mean to sound alarmist, but a recent episode involving the reporting by a certain right-leaning reporter of a mundane, although likely political, lawsuit filed by the Obama campaign and certain local Democratic groups against the OH Secretary of

### Coming down to Earth

Problem: an object initially at rest some distance above the Earth begins to fall toward the Earth. Show that the time it takes for the object to fall halfway to the Earth is about 9/11 of the time it takes to fall all the way to the Earth. Solution: use conservation of energy. Let be

### The expected value of a Mega Millions ticket

As I type this post, the Mega Millions jackpot projects to be $500,000,000 (annuity value – after-tax cash value is more like$220,000,000). A single ticket costs \$1. Is it worth it? By “worth it,” I mean that the expected value of a ticket is greater than zero. The expected value of a random variable

### Top Ten Twilight Zone Episodes

As I watch the annual marathon on Syfy, I figure it would be worthwhile to compile a Top Ten Twilight Zone episodes. Hardly original, I know, but having watched every episode multiple times, I feel I have some standing here. Anyway… Eye of the Beholder Number Twelve Looks Just Like You And When the Sky

### Computing square roots

Let’s say you want to take the square root of a real number without a computer. How would you do it? How do you think a computer does it? The only way I know any computer performs square roots practically is via the following recurrence: , where . The recurrence derives from Newton’s Method of

### Hungry Goats

Problem: A goat is tied to the edge of a circular plot of grass by a length of rope. How long should the rope be so that the goat eats exactly half of the grass? Solution: Let the radius of the plot of grass be and the length of the rope be . The center

### An interesting sum

Problem: compute, in closed form, the following sum: , where , and . Solution: Make the following substitution: . Then we find that and . Therefore: . The sum desired then takes the form . It is not obvious how to go from here. It’s not even obvious from a cursory inspection that the sum

### Of Burdens and Trophies; or, How I Got Here

I’m sure that everyone has someone in their family who was, at one time, at least a little famous. Maybe not a parent, child or sibling, but perhaps a cousin, or a uncle, or a great-aunt. What value does such proximity to fame hold? In most cases, about zero. So what if your second cousin,