# Complex integral

Let $C$ denote the unit circle centered at the origin in Complex Plane

What is the value of

$$\frac{1}{2\pi i}\int_C |1+z+z^2 |dz,$$ where the integral is taken anti-clockwise along $C$?

1. 0
2. 1
3. 2
4. 3

What I have answered is 0 because it seems like $f(z)$ is analytic at 0 hence by Cauchy's Theorem.

• Be careful! $z\mapsto |1+z+z^2|$ is real-valued and not constant and therefore not holomorphic! Jun 19, 2017 at 16:35
• $|z|$ is not analytic at 0 Jun 19, 2017 at 16:35
• Numerically integrating seems to give $\approx 0.6$ Jun 19, 2017 at 16:42
• Jun 20, 2017 at 5:24
• @LutzL Actually, it's not a duplicate; the results are different, although the methods are similar. I have provided solutions to both of them. Also, none of the choices in the OP are correct, as also noted by user399601. See my solution below. Jun 21, 2017 at 17:27

HINT Note that if $z = x+yi$ then $$\left|1+z+z^2\right| = \left|\left(x^2-y^2+x+1\right) +y(2x+1)i\right|$$ Now parameterize $C$ as $x = \cos t, y = \sin t$ and $t \in [0,2\pi]$, then $$\int_C |1+z+z^2 |dz = \int_{t=0}^{t=2\pi} \left|\left(x^2-y^2+x+1\right) +y(2x+1)i\right|$$ where $x,y$ are functions of $t$ as in the parameterization. Can you finish this?

We want the integral

$$\frac{1}{2\pi i}\int_C |1+z+z^2|dz=\frac{1}{2\pi}\int_0^{2\pi}|1+z+z^2|z~d\theta$$

since $z=e^{i\theta}$.

Now consider the absolute value portion,

\begin{align} |1+z+z^2| &=\sqrt{(1+z+z^2)(1+z+z^2)^*}\\ &=\sqrt{(1+z+z^2)(1+z^{-1}+z^{-2})}\\ &=\sqrt{(1+z+z^2)(1+z^{-1}+z^{-2})\frac{z^2}{z^2}}\\ &=\sqrt{\left(\frac{1+z+z^2}{z} \right)^2}\\ &=\sqrt{\left(\frac{1}{z}+1+z \right)^2}\\ &=\sqrt{(1+2\cos\theta)^2}\\ &=|1+2\cos\theta| \end{align}

\begin{align}\frac{1}{2\pi i}\int_C |1+z+z^2|dz &=\frac{1}{2\pi}\int_0^{2\pi}|1+2\cos\theta|(\cos\theta+i\sin\theta)~d\theta\\ &=\frac{1}{2\pi}\int_0^{2\pi}|1+2\cos\theta|\cos\theta~d\theta\\ &=\frac{1}{3}+\frac{\sqrt{3}}{2\pi}\approx0.60900 \end{align}
Put $z=e^{it}, 0\le t\le 2π$ and $dz=i.e^{it}dt$.
So $I_1=\int_0^{2π}|1+e^{it}+e^{i2t}|^2ie^{it}dt=i\int_0^{2π}(1+e^{it}+e^{i2t})(1+e^{-it}+e^{-i2t})e^{it}dt$
$=i\int_0^{2π}g(t)dt$, where $g(t)$ is the integrand and $g(2π+t)=g(t)$. So $I_1=...$