Computing Contour Integral for Argument Principle

41 Views Asked by At

I've been trying to learn about the Argument Principle. To practice, I've been trying to compute the integral from the definition for the simple function $$ f(z) = z + 1 $$ According to wikipedia,

if $f(z)$ is a meromorphic function inside and on some closed contour $C$, and $f$ has no zeros or poles on $C$, then $$ \frac{1}{2\pi i}\oint_C \frac{f'(z)}{f(z)}dz = Z - P $$ where $Z$ and $P$ denote respectively the number of zeros and poles of $f(z)$ inside the contour $C$, with each zero and pole counted as many times as its multiplicity and order, respectively, indicate.
I wanted to compute this using a circle contour, defined by $$z = re^{i\theta}$$ where $\theta \in [0, 2\pi]$. Since I picked a simple function that I already know the roots of, I know that if I let $|r| \gt 1$, the integral should come out to $1$, because there is one root at $z = -1$ inside that circle, and if I let $|r| \lt 1$, the integral should come out to $0$, because there is no root inside that circle.

Unless I made a mistake, the integral definition for this choice of function and contour comes out to this: $$ \frac{1}{2\pi i} \int_{0}^{2\pi} \frac{ire^{i\theta}}{1 + re^{i\theta}}d\theta $$ This evaluates to $$ \frac{1}{2\pi i} \left( \log(1+re^{2\pi i}) - \log(1+re^{0}) \right) $$ This seems to be $0$ for any choice of $r \ne -1$.

What did I do wrong? Am I evaluating the logarithm wrong? Does it matter what contour I choose? How should I go about computing integrals for the Argument Principle?