๐Ÿงฎ Brain Teaser

The Cauchy Integral That Evaluates Itself

Let ff be analytic on and inside a simple closed curve ฮณ\gamma, and suppose z0z_0 is a point inside ฮณ\gamma. Everyone knows the Cauchy integral formula:

f(z0)=12ฯ€iโˆฎฮณf(z)zโˆ’z0โ€‰dz.f(z_0) = \frac{1}{2\pi i} \oint_\gamma \frac{f(z)}{z - z_0}\, dz.

Now use this to evaluate the following real integral in closed form:

I=โˆซ02ฯ€cosโกฮธ2โˆ’cosโกฮธโ€‰dฮธ.I = \int_0^{2\pi} \frac{\cos\theta}{2 - \cos\theta}\, d\theta.

Hint: think about what contour to use and what rational function of eiฮธe^{i\theta} appears.

contour integrationresidue theoremtrigonometric integralsunit circle substitution

Answer: The Cauchy Integral That Evaluates Itself

Key Idea / Intuition

The key insight is to convert the trigonometric integral over [0,2ฯ€][0, 2\pi] into a contour integral over the unit circle โˆฃzโˆฃ=1|z| = 1 by writing z=eiฮธz = e^{i\theta}, so cosโกฮธ=z+zโˆ’12\cos\theta = \frac{z + z^{-1}}{2} and dฮธ=dzizd\theta = \frac{dz}{iz}. The resulting rational function of zz has poles that can be located explicitly, and then the residue theorem (a consequence of Cauchy's formula) does all the work. The answer turns out to be a clean expression involving 3\sqrt{3}, which is surprising from the integral's innocent appearance.


Formal Proof / Solution

Step 1: Substitution z=eiฮธz = e^{i\theta}.

On the unit circle โˆฃzโˆฃ=1|z|=1: cosโกฮธ=z+zโˆ’12,dฮธ=dziz.\cos\theta = \frac{z + z^{-1}}{2}, \qquad d\theta = \frac{dz}{iz}.

So: I=โˆฎโˆฃzโˆฃ=1z+zโˆ’122โˆ’z+zโˆ’12โ‹…dziz.I = \oint_{|z|=1} \frac{\dfrac{z+z^{-1}}{2}}{2 - \dfrac{z+z^{-1}}{2}} \cdot \frac{dz}{iz}.

Step 2: Simplify the integrand.

Multiply numerator and denominator of the big fraction by 2z2z:

z+zโˆ’12=z2+12z,2โˆ’z+zโˆ’12=4zโˆ’z2โˆ’12z=โˆ’(z2โˆ’4z+1)2z.\frac{z + z^{-1}}{2} = \frac{z^2+1}{2z}, \qquad 2 - \frac{z+z^{-1}}{2} = \frac{4z - z^2 - 1}{2z} = \frac{-(z^2 - 4z + 1)}{2z}.

So the integrand becomes:

(z2+1)/(2z)โˆ’(z2โˆ’4z+1)/(2z)โ‹…1iz=z2+1โˆ’(z2โˆ’4z+1)โ‹…1iz.\frac{(z^2+1)/(2z)}{-(z^2-4z+1)/(2z)} \cdot \frac{1}{iz} = \frac{z^2+1}{-(z^2-4z+1)} \cdot \frac{1}{iz}.

Thus: I=โˆฎโˆฃzโˆฃ=1โˆ’(z2+1)iz(z2โˆ’4z+1)โ€‰dz=i1โˆฎโˆฃzโˆฃ=1z2+1z(z2โˆ’4z+1)โ€‰dz.I = \oint_{|z|=1} \frac{-(z^2+1)}{iz(z^2 - 4z + 1)}\, dz = \frac{i}{1} \oint_{|z|=1} \frac{z^2+1}{z(z^2-4z+1)}\, dz.

More carefully: I=1iโˆฎโˆฃzโˆฃ=1โˆ’(z2+1)z(z2โˆ’4z+1)โ€‰dz.I = \frac{1}{i}\oint_{|z|=1} \frac{-(z^2+1)}{z(z^2-4z+1)}\,dz.

Let me redo cleanly. We have:

I=โˆฎโˆฃzโˆฃ=1z2+1โˆ’(z2โˆ’4z+1)โ‹…dziz=1iโˆฎโˆฃzโˆฃ=1โˆ’(z2+1)z(z2โˆ’4z+1)โ€‰dz.I = \oint_{|z|=1} \frac{z^2+1}{-(z^2-4z+1)} \cdot \frac{dz}{iz} = \frac{1}{i}\oint_{|z|=1} \frac{-(z^2+1)}{z(z^2-4z+1)}\,dz.

Step 3: Factor the denominator.

The roots of z2โˆ’4z+1=0z^2 - 4z + 1 = 0 are: z=4ยฑ16โˆ’42=2ยฑ3.z = \frac{4 \pm \sqrt{16-4}}{2} = 2 \pm \sqrt{3}.

So z1=2โˆ’3โ‰ˆ0.27z_1 = 2 - \sqrt{3} \approx 0.27 (inside โˆฃzโˆฃ=1|z|=1) and z2=2+3โ‰ˆ3.73z_2 = 2+\sqrt{3} \approx 3.73 (outside โˆฃzโˆฃ=1|z|=1).

Step 4: Compute residues inside โˆฃzโˆฃ=1|z|=1.

The poles inside are at z=0z=0 and z=z1=2โˆ’3z = z_1 = 2-\sqrt{3}.

Define g(z)=โˆ’(z2+1)z(z2โˆ’4z+1)g(z) = \dfrac{-(z^2+1)}{z(z^2-4z+1)}.

Residue at z=0z=0: Resz=0โ€‰g(z)=โˆ’(0+1)0โ‹…stuffโ‹…limโกzโ†’0zโ‹…g(z)=โˆ’11โ‹…(0โˆ’0+1)=โˆ’1.\text{Res}_{z=0}\, g(z) = \frac{-(0+1)}{0 \cdot \text{stuff}} \cdot \lim_{z\to 0} z \cdot g(z) = \frac{-1}{1 \cdot (0-0+1)} = -1.

More carefully: Resz=0=limโกzโ†’0zโ‹…โˆ’(z2+1)z(z2โˆ’4z+1)=โˆ’11=โˆ’1.\text{Res}_{z=0} = \lim_{z\to 0} z \cdot \frac{-(z^2+1)}{z(z^2-4z+1)} = \frac{-1}{1} = -1.

Residue at z=2โˆ’3z = 2-\sqrt{3}:

Resz=z1=โˆ’(z12+1)z1โ‹…(z1โˆ’z2)=โˆ’(z12+1)z1โ‹…(โˆ’23).\text{Res}_{z=z_1} = \frac{-(z_1^2+1)}{z_1 \cdot (z_1 - z_2)} = \frac{-(z_1^2+1)}{z_1 \cdot (-2\sqrt{3})}.

Now z1=2โˆ’3z_1 = 2-\sqrt{3}, so z12=4โˆ’43+3=7โˆ’43z_1^2 = 4 - 4\sqrt{3} + 3 = 7 - 4\sqrt{3}, thus z12+1=8โˆ’43=4(2โˆ’3)z_1^2 + 1 = 8 - 4\sqrt{3} = 4(2-\sqrt{3}).

Resz=z1=โˆ’4(2โˆ’3)(2โˆ’3)(โˆ’23)=โˆ’4โˆ’23=23.\text{Res}_{z=z_1} = \frac{-4(2-\sqrt{3})}{(2-\sqrt{3})(-2\sqrt{3})} = \frac{-4}{-2\sqrt{3}} = \frac{2}{\sqrt{3}}.

Step 5: Apply the residue theorem.

โˆฎโˆฃzโˆฃ=1g(z)โ€‰dz=2ฯ€i(โˆ’1+23).\oint_{|z|=1} g(z)\, dz = 2\pi i \left(-1 + \frac{2}{\sqrt{3}}\right).

Therefore: I=1iโ‹…2ฯ€i(โˆ’1+23)=2ฯ€(23โˆ’1).I = \frac{1}{i} \cdot 2\pi i \left(-1 + \frac{2}{\sqrt{3}}\right) = 2\pi\left(\frac{2}{\sqrt{3}} - 1\right).

Simplifying:

I=2ฯ€โ€‰โฃ(23โˆ’1)=2ฯ€โ€‰โฃ(233โˆ’1)โ‰ˆ2ฯ€(0.155)โ‰ˆ0.976.\boxed{I = 2\pi\!\left(\frac{2}{\sqrt{3}} - 1\right) = 2\pi\!\left(\frac{2\sqrt{3}}{3} - 1\right) \approx 2\pi(0.155) \approx 0.976.}

Sanity check: Since cosโกฮธ2โˆ’cosโกฮธ\frac{\cos\theta}{2-\cos\theta} averages to a small positive number over [0,2ฯ€][0,2\pi], a value near 11 makes sense. โœ“


The beauty: A completely elementary-looking trigonometric integral, with no obvious closed form, yields an answer involving 3\sqrt{3} โ€” the signature of a quadratic residue computation hidden inside the unit circle substitution.

Source: Stein & Shakarchi, Complex Analysis, Chapter 2 exercises; classical folklore

Type: Complex AnalysisSource: Stein & Shakarchi, Complex Analysis, Chapter 2 exercises; classical folkloreEdit on GitHub โ†—