# Definite integral to evaluate

1. Dec 4, 2008

### meichenl

The following integral came up in a paper I was reading recently.

$$\int_0^{2\pi}\ln(1 + x^2 - 2x\cos\theta)d\theta$$

The answer, for x^2<1, is zero. I'm not sure why. I tried writing it as a power series and showing that the integral for any given power of x vanishes, but it got too messy to work through. Anyone have a trick?

2. Dec 4, 2008

### lurflurf

hint change variable to
u=x^2-2x cos(theta)

3. Dec 4, 2008

### meichenl

lurflurf, thank you for your reply, but I am still stuck. To make the substitution you suggest, I need to be able to completely eliminate theta, so:

$$u = x^2 - 2x\cos\theta \vspace{10mm}$$

$$du = 2x\sin\theta d\theta$$

$$d\theta = \frac{du}{2x\sin\theta}$$

$$\frac{u - x^2}{-2x} = \cos\theta$$

$$\frac{u^2 - 2ux^2 + x^4}{4x^2} = 1-\sin^2\theta$$

$$\sin\theta = \sqrt{1-\frac{u^2 - 2ux^2 + x^4}{4x^2}}$$

$$d\theta = \frac{du}{2x \sqrt{1-\frac{u^2 - 2ux^2 + x^4}{4x^2}}}$$

I can't quite put this in the original problem yet, because the substitution is not bijective. There are multiple theta values over the range of the original integral that correspond to the same u value. I could split the integral into different pieces, or use the symmetry of the cosine function to play with the limits of integration before making any substitution, as I do below.

$$\int_0^{2\pi} \ln(1+x^2 - 2x\cos\theta)d\theta = 2\int_0^\pi \ln(1+x^2 - 2x\cos\theta)d\theta =2\int_{x^2 - 2x}^{x^2+2x} \ln(1+u) \frac{du}{2x \sqrt{1-\frac{u^2 - 2ux^2 + x^4}{4x^2}}}$$

Perhaps I'm missing something or made a mistake, but it doesn't look inviting from there.

4. Dec 4, 2008

### meichenl

I had Mathematica attempt to evaluate the integral analytically, but it failed. Plotting the function, it certainly looked plausible that for x^2<1 the integral evaluates to zero, and it's not really crucial for my research that I understand exactly why this works, but I am interested in how to do it, if anyone has a good method handy. The integral does appear in tables, but I didn't find an explanation of where the answer comes from.

5. Dec 4, 2008

Mathematica seemed to be happy with Integrate[Log[1 + x^2 - 2 x Cos[theta]], {theta, 0, 2 Pi}, Assumptions -> x > 0 && x < 1]: it gave an answer of zero. I'm thinking about how one could actually perform the integral; note that $$1 + x^2 - 2x cos \theta = \lvert 1 - xe^{i\theta} \rvert^2$$.

Last edited: Dec 5, 2008
6. Dec 6, 2008

### meichenl

you're right - thank you. mathematica just took a minute or so to do it, and i wasn't very patient.

you're also right about the vector interpretation. the argument of the natural log is essentially coming from the law of cosines.

7. Dec 7, 2008

Well, I think I found something that works, based on the series
$$\ln(1 - t) = - \sum_{n = 1}^{\infty} \frac{t^n}{n}, \lvert t \rvert < 1.$$

Here goes:
$$\begin{split} \int_{0}^{2\pi} \ln(1 + x^2 - 2x \cos \theta) \,d\theta &= \int_{0}^{2\pi} \ln \lvert 1 - xe^{i\theta} \rvert^2 \,d\theta \\ &= \int_{0}^{2\pi} \ln \left[(1 - xe^{i\theta})(1 - xe^{-i\theta})\right] \,d\theta \\ &= \int_{0}^{2\pi} \ln (1 - xe^{i\theta}) + \ln (1 - xe^{-i\theta}) \,d\theta \\ &= - \int_{0}^{2\pi} \sum_{n = 1}^{\infty} \frac{(xe^{i\theta})^n}{n} + \sum_{n = 1}^{\infty} \frac{(xe^{-i\theta})^n}{n} \,d\theta \text{\quad if \lvert x \rvert < 1} \\ &= - \sum_{n = 1}^{\infty} \frac{x^n}{n} \int_{0}^{2\pi} e^{in\theta} + e^{-in\theta} \,d\theta \\ &= 0. \end{split}$$

Last edited: Dec 7, 2008
8. Dec 9, 2008

### meichenl

adrian - that's pretty cool. thanks!