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.


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?