## Deceptively tricky integral

Someone wanted us to evaluate the following integral:

$$\int\limits_0^\pi dx{\frac{{{x^2}}}{{\sqrt 5-2\cos x}}}$$

This looks straightforward, although the factor of $x^2$ does seem to complicate things a little. Actually, a lot. The usual tricks to deal with powers leads us down a road that leads to interesting territory involving dilogarithms.

Let’s define

$$J(a) = \int_{-\pi}^{\pi} dx \frac{e^{i a x}}{\sqrt{5}-2 \cos{x}}$$

Then the integral we seek is

$$-\frac12 J”(0) = \int_0^{\pi} dx \frac{x^2}{\sqrt{5}-2 \cos{x}}$$

To evaluate $J(a)$, consider the following contour integral in the complex plane:

$$\oint_C dz \frac{z^a}{z^2-\sqrt{5} z+1}$$

where $C$ is a “keyhole” unit circle, with the keyhole being about the negative real axis, as pictured below.

By the residue theorem, this contour integral is equal to

$$-i 2 \pi \phi^a$$

where $\phi = (\sqrt{5}-1)/2$ is the golden ratio. On the other hand, the integral is also equal to

$$-i J(a) + i 2 \sin{\pi a} \, \int_0^1 dx \frac{x^a}{x^2+\sqrt{5} x+1}$$

Note that the portion of the integral that goes about the center goes to zero. Therefore we have

$$J(a) = 2 \pi \phi^a + 2 \sin{\pi a} \, \int_0^1 dx \frac{x^a}{x^2+\sqrt{5} x+1}$$

With some quick work, the integral we seek is then

$$-\frac12 J”(0) = -\pi \log^2{\phi} – 2 \pi \int_0^1 dx \frac{\log{x}}{x^2+\sqrt{5} x+1}$$

Using the fact that

$$\frac{1}{x^2+\sqrt{5} x+1} = \frac{1}{x+\phi}-\frac{1}{x+1/\phi}$$

$$\int_0^1 dx \frac{\log{x}}{x+a} = \text{Li}_2{\left ( -\frac{1}{a}\right)}$$

$$\text{Li}_2{\left ( -\frac{1}{\phi}\right)} = -\frac{\pi^2}{10} – \log^2{\phi}$$

$$\text{Li}_2{\left ( -\phi\right)} = -\frac{\pi^2}{15} +\frac12 \log^2{\phi}$$

We finally have

$$-\frac12 J”(0) = -\pi \log^2{\phi} – 2 \pi \left [\left ( -\frac{\pi^2}{10} – \log^2{\phi} \right ) – \left ( -\frac{\pi^2}{15} +\frac12 \log^2{\phi} \right ) \right ]$$

or

$$\int_0^{\pi} dx \frac{x^2}{\sqrt{5}-2 \cos{x}} = 2 \pi \log^2{\phi} + \frac{\pi^3}{15}$$

which may easily be verified numerically in Wolfram Alpha.

• Bennett Gardiner wrote:

this is a good one! Nice combination of the Feynman trick and contour methods π

• rlgordonma@yahoo.com wrote:

I agree. I really like this one. It is deceptively difficult because the integrand looks so innocent. But the manipulations you need to get to a form for contour integration, and then you have to do a branch cut in the unit circle…that took me off guard. Anyway, good times; thanks for the feedback.

• Bennett Gardiner wrote:

• rlgordonma@yahoo.com wrote:

Post linked to in the, uhhh, post.

• Hi RG:

Wonderfully clever solution. L)

But, may I ask one tiny thing?.

How did you arrive at that -iJ(a) term under where you state “on the other hand, the integral is also equal to…”

This appears to be the branch, but I am a little stymied at where that -iJ(a) comes in.

Take care,
Cody

• rlgordonma@yahoo.com wrote:

Hey Cody, thanks. Parametrize the complex contour integral along the unit circle by $z=e^{i x}$. Note that the denominator will give the negative of that in the definition of $J(a)$. That’why you get $-i J(a)$ rather than $i J(a)$. I hope that helps.

• DUH, I am ashamed I asked that. Of course. Thanks RG. π

• Hey RG:

May I ask you something else?. Have you ever taken a look at this one?

http://math.stackexchange.com/questions/385931/closed-form-for-int-0-infty-frac-arctan-x-ln1x21x2-sqrtx-dx

O.L. does not evaluate it, but mentions deforming the right contour. A friend of mine done the right half of the complex log integral. The left one appears to be a little trickier. But, Random Variable showed the branch at ‘i’ does not go to 0 but infinity. A suggestion was made to use a semicircle with its diameter along y=x. Clever. Anyway, I would really like to see your thoughts on it if you feel like it and have time.

Take care,
Cody

• […] integral is deviously difficult. It may look like it has the solution I provided for this integral, but, as you will see, there is an additional […]