Your answer should depend on whether ∣a∣<1 or ∣a∣>1.
Hint (try without it first): Factor 1−2acosx+a2 over C.
Bonus: What happens at a=1, where the integrand has a logarithmic singularity at x=0?
Field: Integration / Complex analysis
Why it's interesting: Direct antidifferentiation gets nowhere. After one factorization, the integral turns out to be "secretly" an average of a harmonic function over a circle. The answer is then a striking dichotomy: exactly 0 inside the unit disk and 2πln∣a∣ outside it. It is the prototype of Jensen's formula. It also has a completely elementary second proof using roots of unity and Riemann sums.
Difficulty: 3 / 5
mean value propertyroots of unityRiemann sumsJensen's formulaharmonic functions
Answer: Poisson's Log-Cosine Integral
Key Idea / Intuition
The expression 1−2acosx+a2 is the squared distance from a to the point eix on the unit circle:
1−2acosx+a2=∣1−aeix∣2=∣a−eix∣2.
So the integral is (up to constants) the average of ln∣1−az∣ over the unit circle.
If ∣a∣<1, the function ln∣1−az∣ is harmonic on the whole closed disk. Its circle-average therefore equals its value at the center, which is ln1=0.
If ∣a∣>1, factor out a to reduce to the case 1/a, which lies inside the disk.
The elementary version of the same idea: discretize the circle at the n-th roots of unity. The product ∏k(1−aωk) collapses to 1−an.
Answer:
I(a)={0,2πln∣a∣,∣a∣<1,∣a∣>1.
Formal Proof / Solution
Step 0: Reduce to a full period. The integrand is even in x and 2π-periodic. Hence
Step 1: The case ∣a∣<1. Consider f(z)=log(1−az), using the principal branch. For ∣z∣≤1 we have Re(1−az)≥1−∣a∣>0, so f is holomorphic on a neighbourhood of the closed unit disk. Then u(z)=Ref(z)=ln∣1−az∣ is harmonic there.
By the mean value property,
2π1∫02πln∣1−aeix∣dx=u(0)=ln1=0.
You can also see this concretely through the power series:
ln∣1−aeix∣=Re(−n≥1∑naneinx).
The series converges uniformly in x because ∣a∣<1, and every term integrates to 0 over a period. Hence I(a)=0.
Step 2: The case ∣a∣>1. Factor out a2:
1−2acosx+a2=a2(1−a2cosx+a21).
Therefore
I(a)=∫0πlna2dx+I(1/a)=2πln∣a∣+0=2πln∣a∣,
since ∣1/a∣<1.
Proof 2: Riemann sums and roots of unity (fully elementary)
Let ω=e2πi/n. The integrand ln∣1−aeix∣2 is continuous because ∣a∣=1. So the full-period integral is the limit of Riemann sums at the points xk=2πk/n:
This is consistent with both formulas, since 2πln1=0. The function a↦I(a) is continuous across the unit circle, but it has a "kink" there. This is exactly the behaviour of 2πln+∣a∣, the simplest instance of Jensen's formula.