# Why does $\int_{-\pi}^{\pi}\ln(a^2+e^2+2ea\cos(\theta))d\theta = 4\pi$ only for $-e\leq a\leq e$

I've been given this integral from a friend. $$\int_{-\pi}^{\pi}\ln(a^2+e^2+2ea\cos(\theta))d\theta = 4\pi$$ for $-e\leq a\leq e$. He said I could use complex analysis to solve it. I'm just starting to learn complex analysis and evaluating real integrals using it. I'm not entirely sure exactly what I'm doing, but I'll show you what I've got.

Using $$\int_{\Gamma} \frac{\ln(z+e)}{z} dz=2\pi i$$

where $\Gamma$ is the circle with radius $a$ traveling counterclockwise around the origin. Letting $z=ae^{i\theta}$ $dz=aie^{i\theta}$ and $-\pi \leq\theta\leq\pi,$

$$2\pi=\int_{-\pi}^{\pi} \ln(ae^{i\theta}+e)d\theta$$

Rewriting this (I'm pretty sure) can be written as:

$$\int_{-\pi}^{\pi}\frac{1}{2}\ln(a^2+e^2+2ea\cos(\theta))+i\arctan(\frac{a\sin(\theta)}{a\cos(\theta)+e})d\theta$$

Since that arctan part is odd it evaluates to zero so the only part that matters is the real part so, $$4\pi=\int_{-\pi}^{\pi}\ln(a^2+e^2+2ea\cos(\theta))d\theta$$

Why does the integral only converge to $4\pi$ when $-e\leq a\leq e$?

• Does it have to do with the fact that the contour is a circle? – Tom Himler Sep 15 '18 at 1:35
• For $\{\,\log(x)\in\mathbb{R}\,\}$ we should consider $\{\,x\gt0\,\}$. The integral limits $[-\pi,+\pi]$ will make the cosine function alter between $[-1,+1]$, Hence: $a^2+e^2+2ea\cos(\theta)\gt0 \implies |a|\lt{e}$ – Hazem Orabi Sep 15 '18 at 2:32
• Ahh I see, thank you – Tom Himler Sep 15 '18 at 2:46

Let us consider the related integral $$J(b)=\int_{-\pi}^{\pi}\ln(b^2+2b\cos t+1)\; dt$$ for a real parameter $b$. (We force the factor $e^2$ under the logarithm, and set $b=a/e$.)

Then the same argument as in the OP (well done!) connects this integral with $$\int_\gamma\frac{\log(1+z)}z\; dz\ ,$$ where $\gamma$ is the contour given by the circle around $0$ with radius $b$. There is no residue in $0$, so this integral is zero if $|b|<1$. The function under the integral is not defined for $|b|=1$, and the question in the OP asks what happens for $|b|>1$. Note that the logarithm has a (non-algebraic) singularity in zero, so the point $z=-1$ is the obstruction for applying mot-a-mot the same argument. In fact, the above function - slightly changed - is the dilogarithm function, the first one in the family of polylogarithms and its monodromy is known, see for instance L.C. Maximon on the dilogarithm, relation (3.13) gives the monodromy.

In our case, we have numerically the relation: $$J(b)=0 \ ,\qquad |b|<1\ ,$$ because the $0$ is the only critical point to be studied, seen from the vanishing in the denominator, but $\log(1+z)$
also introduces a zero in the numerator. If $|b|>1$, the integration contour $\gamma$ also encloses the $-1$, and (after the substitution $z\to -z$) we see that the integral is given by the "dilog monodromy", $$J(b) = 4\pi\log|b|\ ,\qquad |b|>1\ .$$

Note: For general contours care should be taken. Here are some checks of the formula for some special values of $b$ in PARI/GP:

? J(b) = intnum( s=-Pi, Pi, log( b^2 + 1 + 2*b*cos(s) ) )
%58 = (b)->intnum(s=-Pi,Pi,log(b^2+1+2*b*cos(s)))
? J(0)
%59 = 0.E-58
? J(0.3)
%60 = -6.4319905876740685684468423893114405506 E-35
? J(0.6)
%61 = 5.4800880749740093821428545185216071537 E-29
? J(0.9)
%62 = 1.9998792919130675098744931954858341671 E-22
? J(1.1)
%63 = 1.1977030427423570301778965420686442108
? 4*Pi*log(1.1)
%64 = 1.1977030427423570301783313489498872659
? J(2)
%65 = 8.7103443612144085220027555929513569724
? 4*Pi*log(2)
%66 = 8.7103443612144085220027555929504557893
? J(2018)
%67 = 95.628348740882708966578414674163307707
? 4*Pi*log(2018)
%68 = 95.628348740882708966578414674163307707
? J(-2018)
%69 = 95.628348740882708966578414674163307707


$2ea\cos \theta = ea(e^{i\theta} + e^{-i\theta})$

$z = e^{i\theta}\\ dz = e^{i\theta}\ dt\\ dt = \frac {dz}{iz}\ dz$

$(a^2 + e^2 + aez + aez^{-1}) = (e+az)(e+az^{-1})$

$\oint_{|z| = 1} \frac{\ln(e+az)+ \ln (e+az^{-1})}{iz} dz\\ \oint_{|z| = 1} \frac{2\ln e + \ln(1+\frac{a}{e}z)+ \ln (1+\frac{a}{e}z^{-1})}{iz} dz$

$\ln(1+\frac{a}{e}z) = -\sum_\limits{i=1}^{\infty} (-1)^i(\frac{a}{e}z)^i = \frac {a}{e}z - \frac {a^2}{e^1}z^2 +\cdots$

The series converges when $|\frac {a}{e} z| <1$

and $\ln (1+\frac{a}{e}z^{-1}) = \frac {a}{e} z^{-1} - \frac {a^2}{e^2} z^{-2} + \cdots$

$-i\oint_{|z|=1} \cdots \frac {e^2}{a^2}z^{-3} +\frac {e}{a}z^{-2}+2 z^{-1} + \frac {e}{a} + \frac {e^2}{a^2} z + \cdots \ dz$

When we evaluate the residues we only care about the coefficent of the $z^{-1}$ terms.

$(2\pi i)(-2i) = 4\pi$

• Why does $dt=\frac{dz}{iz}dz$? – Tom Himler Sep 15 '18 at 2:16
• I might be blind but how does this prove the bonds for a? – Tom Himler Sep 15 '18 at 2:22
• bounds* not bonds – Tom Himler Sep 15 '18 at 2:46