Suppose you have a polynomial $p(z)$ and you want to know how many roots it has inside a given disk. You could try to solve $p(z) = 0$ explicitly, but for degree five or higher there is no algebraic formula. You could try to plot $p$ and count visually, but that only works in simple cases. What if the function is not a polynomial at all, but some complicated holomorphic function defined by a convergent series? The Argument Principle gives a completely different approach: integrate along the boundary of the disk, and read off the count from the result. The number of zeros (minus the number of poles) of a meromorphic function inside a contour equals a certain contour integral — one that counts how many times the image of the contour winds around the origin. Counting zeros and poles becomes an act of integration.
This is not merely a clever trick. The Argument Principle sits at the confluence of two of the deepest ideas in complex analysis: the logarithmic derivative, which converts multiplicative information about zeros and poles into additive information suitable for integration, and the winding number, which encodes topological data about curves into an integer. Together they explain why the zeros of holomorphic functions behave so rigidly — why they are isolated, why they can be counted, and why small perturbations cannot create or destroy them.
The argument in "Argument Principle" refers to the argument of a complex number: as $z$ traverses the contour $\gamma$, the image $f(z)$ traces a closed curve in $\mathbb{C} \setminus \{0\}$ (assuming $f$ has no zeros or poles on $\gamma$), and the total change in $\arg f(z)$ is $2\pi$ times an integer. That integer counts zeros minus poles.
[example: Counting Roots of a Polynomial Without Solving It]
Consider $p(z) = z^3 - 3z + 1$. How many roots does $p$ have inside the disk $|z| < 2$?
Evaluating $p$ on the circle $|z| = 2$ by parametrizing $z(t) = 2e^{it}$ for $t \in [0, 2\pi]$: the dominant term is $z^3 = 8e^{3it}$, which winds three times around the origin. The perturbation $-3z + 1$ satisfies $|-3z + 1| \leq 3 \cdot 2 + 1 = 7 < 8 = |z^3|$ on $|z| = 2$. By Rouché's Theorem (which follows directly from the Argument Principle), $p(z)$ has the same number of roots inside $|z| < 2$ as $z^3$, namely three roots. Since $p$ has degree three and all three roots lie inside $|z| < 2$, we can immediately conclude that $p$ has no real roots outside $(-2, 2)$ — a global statement extracted from a single contour estimate.
The direct approach — finding the roots of $z^3 - 3z + 1 = 0$ — requires Cardano's formula or numerical methods. The indirect approach via the Argument Principle requires only a single inequality on the boundary.
[/example]
## Definition
To formulate the Argument Principle precisely, we need two pieces of language: the class of functions it applies to (meromorphic functions, which are holomorphic except for isolated poles), and the key analytic object that makes everything work (the logarithmic derivative).
A holomorphic function vanishes at a zero and blows up at a pole, but these are qualitatively different kinds of failure. The logarithmic derivative $f'/f$ handles both in a unified way: it has a simple pole at each zero of $f$ with residue equal to the order of the zero, and a simple pole at each pole of $f$ with residue equal to the negative of the order of the pole. Integration then picks up these residues as a count.
[definition: Meromorphic Function]
Let $\Omega \subset \mathbb{C}$ be an open set. A function $f: \Omega \setminus S \to \mathbb{C}$ is **meromorphic** on $\Omega$ if $S \subset \Omega$ is a discrete set (no accumulation points in $\Omega$), $f$ is holomorphic on $\Omega \setminus S$, and every point $z_0 \in S$ is a pole of $f$: there exists $m \in \mathbb{N}$ and a holomorphic function $g$ near $z_0$ with $g(z_0) \neq 0$ such that
\begin{align*}
f(z) = \frac{g(z)}{(z - z_0)^m}
\end{align*}
near $z_0$. The integer $m$ is the **order** of the pole at $z_0$, written $\operatorname{ord}(f, z_0) = -m$.
[/definition]
The notational convention $\operatorname{ord}(f, z_0) = -m$ for a pole of order $m$ and $\operatorname{ord}(f, z_0) = m$ for a zero of order $m$ unifies the two cases: the residue of $f'/f$ at any zero or pole of $f$ is precisely $\operatorname{ord}(f, z_0)$.
Now for the logarithmic derivative. The name comes from the chain rule: $\frac{d}{dz} \log f(z) = \frac{f'(z)}{f(z)}$, at least where $\log f$ is well-defined. The remarkable feature is that this converts the multiplicative structure of zeros and poles into simple poles with integer residues.
[definition: Logarithmic Derivative]
Let $\Omega \subset \mathbb{C}$ be an open set and let $f: \Omega \to \mathbb{C}$ be meromorphic and not identically zero. The **logarithmic derivative** of $f$ is the meromorphic function
\begin{align*}
\frac{f'}{f}: \Omega \setminus (Z_f \cup P_f) &\to \mathbb{C} \\
z &\mapsto \frac{f'(z)}{f(z)},
\end{align*}
where $Z_f = \{z \in \Omega : f(z) = 0\}$ is the zero set of $f$ and $P_f \subset \Omega$ is the (discrete) set of poles of $f$. The logarithmic derivative extends meromorphically to all of $\Omega$, with simple poles precisely at the zeros and poles of $f$.
[/definition]
To see why the logarithmic derivative has the right residues, suppose $f$ has a zero of order $m$ at $z_0$, so $f(z) = (z - z_0)^m g(z)$ with $g(z_0) \neq 0$ and $g$ holomorphic near $z_0$. Differentiate:
\begin{align*}
f'(z) = m(z - z_0)^{m-1} g(z) + (z - z_0)^m g'(z).
\end{align*}
Dividing:
\begin{align*}
\frac{f'(z)}{f(z)} = \frac{m}{z - z_0} + \frac{g'(z)}{g(z)}.
\end{align*}
Since $g(z_0) \neq 0$, the term $g'(z)/g(z)$ is holomorphic at $z_0$. So $f'/f$ has a simple pole at $z_0$ with residue $m$ — exactly the order of the zero. The same calculation for a pole of order $m$ (replace $m$ by $-m$) gives residue $-m$.
[illustration:argument-principle-contour-winding]
The logarithmic derivative has converted local zero and pole data into residues. The remaining step is global: integrate around a contour and let the Residue Theorem add those integer residues inside the curve. This is the Argument Principle, which turns a contour integral into the count of zeros minus poles enclosed by the contour.
[quotetheorem:356]
The theorem is a bookkeeping device for holomorphic and meromorphic functions. Instead of finding zeros directly, we measure the total winding of $f(\gamma)$ around the origin; the result remembers every zero and pole inside the contour, with multiplicity and sign. That is why the formula is so effective in applications: it replaces solving equations by checking boundary behavior.
## The Geometric Interpretation
The formula $\frac{1}{2\pi i} \oint_\gamma \frac{f'(z)}{f(z)} dz = Z - P$ has a beautiful geometric reading that explains the name "Argument Principle." As $z$ traverses $\gamma$, the image $f(z)$ traces a closed curve $\Gamma = f \circ \gamma$ in the $w$-plane. The integral $\frac{1}{2\pi i} \oint_\gamma \frac{f'(z)}{f(z)} dz$ is, by a change of variables $w = f(z)$, equal to
\begin{align*}
\frac{1}{2\pi i} \oint_\Gamma \frac{dw}{w} = n(\Gamma, 0),
\end{align*}
the winding number of the image curve $\Gamma$ around the origin. Meanwhile, $dw/w = d \log w = d(\log|w| + i\arg w)$, so the integral measures the total change in $\arg f(z)$ as $z$ goes around $\gamma$, divided by $2\pi$. This is the change in argument — hence the principle's name.
[explanation: Why the Winding Number Around the Origin Counts Zeros Minus Poles]
The connection between winding numbers and zero counting is not accidental — it is the same phenomenon that makes the index of a vector field count the number of zeros. Consider the simplest case: $f(z) = z^m$ on the circle $|z| = 1$. The image is $f(e^{it}) = e^{imt}$, which winds $m$ times around the origin as $t$ goes from $0$ to $2\pi$. So $n(\Gamma, 0) = m = Z - P$ (since $z^m$ has a zero of order $m$ at the origin and no poles inside the unit circle).
For a general meromorphic function, the key insight is that zeros are points where the image curve passes through the origin ($f(z_0) = 0$), and poles are points where the image goes to infinity. Near a zero of order $m$, the map $f$ looks like $z \mapsto z^m$ (up to a nonvanishing holomorphic factor), and locally adds $m$ to the winding count. Near a pole of order $m$, the map looks like $z \mapsto z^{-m}$, locally subtracting $m$ from the winding count. The total winding number accumulates these local contributions, giving $Z - P$.
This is also why the formula fails if $f$ has a zero or pole on $\gamma$: the image $\Gamma$ would pass through $0$ (at a zero) or go to infinity (at a pole), and the winding number of $\Gamma$ around $0$ would be undefined.
[/explanation]
[example: Verifying the Argument Principle with a Pole]
Let $f(z) = \frac{z^2 - 1}{z}$ and $\gamma$ be the circle $|z| = 2$ traversed counterclockwise. The function $f$ has zeros at $z = \pm 1$ (each of order $1$, both inside $\gamma$) and a simple pole at $z = 0$ (inside $\gamma$). The Argument Principle predicts
\begin{align*}
\frac{1}{2\pi i} \oint_{|z|=2} \frac{f'(z)}{f(z)} \, dz = Z - P = 2 - 1 = 1.
\end{align*}
Let us verify by direct computation. We have
\begin{align*}
f'(z) = \frac{(2z)(z) - (z^2 - 1)(1)}{z^2} = \frac{z^2 + 1}{z^2},
\end{align*}
so
\begin{align*}
\frac{f'(z)}{f(z)} = \frac{z^2 + 1}{z^2} \cdot \frac{z}{z^2 - 1} = \frac{z^2 + 1}{z(z^2 - 1)} = \frac{z^2 + 1}{z(z-1)(z+1)}.
\end{align*}
We compute the residues at the three poles $z = 0, 1, -1$ inside $|z| = 2$.
At $z = 0$:
\begin{align*}
\operatorname{Res}\!\left(\frac{z^2 + 1}{z(z-1)(z+1)}, 0\right) = \lim_{z \to 0} z \cdot \frac{z^2 + 1}{z(z-1)(z+1)} = \frac{1}{(-1)(1)} = -1.
\end{align*}
At $z = 1$:
\begin{align*}
\operatorname{Res}\!\left(\frac{z^2 + 1}{z(z-1)(z+1)}, 1\right) = \lim_{z \to 1} (z-1) \cdot \frac{z^2 + 1}{z(z-1)(z+1)} = \frac{2}{1 \cdot 2} = 1.
\end{align*}
At $z = -1$:
\begin{align*}
\operatorname{Res}\!\left(\frac{z^2 + 1}{z(z-1)(z+1)}, -1\right) = \lim_{z \to -1} (z+1) \cdot \frac{z^2 + 1}{z(z-1)(z+1)} = \frac{2}{(-1)(-2)} = 1.
\end{align*}
Summing: $-1 + 1 + 1 = 1$. By the Residue Theorem,
\begin{align*}
\frac{1}{2\pi i} \oint_{|z|=2} \frac{f'(z)}{f(z)} \, dz = 1 = Z - P,
\end{align*}
as predicted. Notice how the pole at $z = 0$ contributes $-1$ to the sum (subtracting from the zero count), while each simple zero contributes $+1$.
[/example]
## When the Hypotheses Fail
The Argument Principle requires three hypotheses: $f$ must be meromorphic on $\Omega$, the contour $\gamma$ must avoid all zeros and poles of $f$, and $\gamma$ must be homologous to zero in $\Omega$ (i.e., $n(\gamma, z_0) = 0$ for all $z_0 \notin \Omega$). Each hypothesis is genuinely necessary, and dropping any one of them causes the formula to break down.
[example: The Contour Passes Through a Zero]
Let $f(z) = z$ and $\gamma$ be the circle $|z| = 1$. The function $f$ has a zero at $z = 0$, which is inside $\gamma$ — but now perturb the contour so it passes directly through the zero. Let $\gamma_\varepsilon(t) = \varepsilon e^{it}$ for $t \in [0, 2\pi]$ (a tiny circle around the origin), so that the "contour" degenerates to a point as $\varepsilon \to 0$. For $\varepsilon > 0$ fixed, $f'(z)/f(z) = 1/z$ and
\begin{align*}
\frac{1}{2\pi i}\oint_{\gamma_\varepsilon} \frac{1}{z}\,dz = 1
\end{align*}
for every $\varepsilon > 0$. But now consider a contour that literally passes through the origin: $\gamma(t) = e^{it}$ for $t \in [0, 2\pi]$ but with the path modified to pass through $0$ at some parameter value $t_0$. At $t = t_0$, $f(\gamma(t_0)) = 0$, so $f'(\gamma(t))/f(\gamma(t)) = 1/\gamma(t) \to \infty$ as $t \to t_0$. The integral $\oint_\gamma f'/f\,dz$ is not even defined — the integrand has a non-integrable singularity on the contour. The formula produces no output, not a wrong output. This is why the hypothesis "$\gamma$ does not pass through any zero or pole of $f$" is not a technicality: it is what makes the integral exist.
[/example]
[example: The Contour Is Not Homologous to Zero]
Let $\Omega = \mathbb{C} \setminus \{0\}$ (the punctured plane) and $f \equiv 1$ (a constant, with no zeros or poles). The Argument Principle would predict $\frac{1}{2\pi i}\oint_\gamma \frac{f'}{f}\,dz = \frac{1}{2\pi i}\oint_\gamma 0\,dz = 0$ for any contour. But now take $\gamma$ to be the unit circle $|z| = 1$ traversed once counterclockwise. In $\Omega = \mathbb{C} \setminus \{0\}$, the point $0 \notin \Omega$, but $n(\gamma, 0) = 1 \neq 0$: the contour is *not* homologous to zero in $\Omega$.
For a more striking failure, let $f(z) = z$ on $\Omega = \mathbb{C} \setminus \{0\}$. Strictly speaking, $f$ is holomorphic on $\Omega$ with no zeros in $\Omega$ (the zero at $z = 0$ is not in the domain). The Argument Principle does not apply to $\gamma$ as a contour in $\Omega$ since $n(\gamma, 0) = 1 \neq 0$. If we naively apply the formula anyway:
\begin{align*}
\frac{1}{2\pi i}\oint_{|z|=1} \frac{1}{z}\,dz = 1,
\end{align*}
which is nonzero — but we claimed $f$ has no zeros in $\Omega$! The apparent contradiction dissolves once we note that the formula genuinely does not apply: the contour fails the homologous-to-zero condition, and the missing zero at the origin (excluded from $\Omega$) is exactly what the winding number $n(\gamma, 0) = 1$ is detecting.
[/example]
## Rouché's Theorem
The Argument Principle has a powerful corollary that allows one to count zeros by comparison. If two functions are close on a contour, their zero counts inside the contour must agree. This is Rouché's Theorem, and it is one of the most widely applicable results in all of complex analysis.
The intuition is topological. The winding number $n(\Gamma, 0)$ of a curve $\Gamma$ around the origin is a continuous function of $\Gamma$ in an appropriate sense — if you deform $\Gamma$ continuously without passing through $0$, the winding number cannot change (it is an integer and would have to vary continuously, hence stay constant). Rouché's Theorem says: if $|h(z)| < |f(z)|$ on $\gamma$, then the image of $\gamma$ under $f + h$ is a perturbation of the image under $f$ that never reaches the origin (since $|f(z)| > |h(z)|$ prevents $f(z) + h(z) = 0$ on $\gamma$), so the winding numbers match.
[quotetheorem:357]
Rouché's Theorem is best read as a stability theorem for zero-counting. If the perturbation is strictly smaller than the main term on the boundary, then the boundary image cannot cross the origin while the perturbation is turned on. The winding number therefore stays fixed, and the number of zeros inside the contour is unchanged.
[example: All Roots of a Polynomial Inside a Large Disk]
Let $p(z) = z^5 - 3z^3 + 2z - 1$. We claim all five roots lie inside $|z| < 2$.
On $|z| = 2$: $|z^5| = 32$ and $|-3z^3 + 2z - 1| \leq 3|z|^3 + 2|z| + 1 = 3 \cdot 8 + 2 \cdot 2 + 1 = 29 < 32$.
Set $f(z) = z^5$ and $h(z) = -3z^3 + 2z - 1$. On $|z| = 2$, we have $|h(z)| \leq 29 < 32 = |f(z)|$. By Rouché's Theorem, $p(z) = f(z) + h(z)$ has the same number of zeros inside $|z| < 2$ as $f(z) = z^5$, which has exactly five zeros (all at the origin). Therefore $p$ has exactly five zeros inside $|z| < 2$.
Since $p$ has degree five and therefore exactly five zeros in $\mathbb{C}$ (counted with multiplicity, by the Fundamental Theorem of Algebra), all five zeros lie inside $|z| < 2$.
[/example]
[example: Zeros of a Perturbation of the Exponential]
Does the equation $e^z = 3z$ have solutions inside $|z| \leq 1$? Write $f(z) = -3z$ and $h(z) = e^z$, so $f + h = e^z - 3z$. On $|z| = 1$: $|f(z)| = 3$ and $|h(z)| = |e^z| = e^{\operatorname{Re}(z)} \leq e^1 = e \approx 2.718 < 3 = |f(z)|$.
By Rouché's Theorem, $e^z - 3z$ has the same number of zeros inside $|z| < 1$ as $-3z$, which has exactly one zero (at $z = 0$, of order $1$). Therefore $e^z - 3z$ has exactly one zero inside the unit disk — that is, the equation $e^z = 3z$ has exactly one solution with $|z| < 1$.
Note the direction: we take $f$ to be the term with larger modulus on the contour. Choosing $f = e^z$ and $h = -3z$ would fail since $|e^z| = e^{\operatorname{Re}(z)}$ is not uniformly larger than $3$ on $|z| = 1$ (at $z = -1$, $|e^{-1}| = 1/e < 3$, so the inequality $|h| < |f|$ would require $3 < 1/e$, which is false).
[/example]
## The Open Mapping Theorem and Local Geometry
A further consequence of the Argument Principle is the Open Mapping Theorem: a non-constant holomorphic function maps open sets to open sets. This is a statement about the local geometry of $f$ and again rests on zero counting. If $f(z_0) = w_0$ and $f - w_0$ has a zero of order $m$ at $z_0$, then near $z_0$ the map $f$ behaves like $z \mapsto w_0 + (z - z_0)^m$ — it is an $m$-to-one map locally. Rouché's Theorem makes this precise by counting how many zeros $f - w$ has near $z_0$ for $w$ close to $w_0$.
[quotetheorem:358]
The Open Mapping Theorem has no real analogue: the function $f(x) = x^2$ is smooth and non-constant, but maps the open set $(-1, 1)$ to $[0, 1)$, which is not open. The difference lies in the fact that the real map $x \mapsto x^2$ is two-to-one near $0$ in a way that collapses the open set to a half-open interval, whereas the complex map $z \mapsto z^2$ wraps around $0$ uniformly and the image of any open set remains open.
[explanation: The Local Picture Behind Open Mapping]
The local model is the map $z \mapsto z^m$. Near a zero of order $m$, a holomorphic function wraps small circles around the target value $m$ times instead of collapsing them to a one-sided interval. Rouché's Theorem turns that picture into stable zero-counting: target values close to $w_0$ still have preimages near $z_0$. This is why nonconstant holomorphic maps send neighborhoods to neighborhoods.
[/explanation]
Open mapping tells us that a nonconstant holomorphic function sends small neighborhoods to open neighborhoods. This has an immediate consequence for the modulus: if the function never vanishes, then $|f|$ cannot have an interior low point, because the image near that point necessarily spreads in every complex direction. The next theorem records this as the minimum-modulus counterpart to the Maximum Modulus Principle.
[quotetheorem:3347]
Compare this with the Maximum Modulus Principle, which says $|f|$ also cannot attain a local maximum in $\Omega$. Together, they say holomorphic functions behave like harmonic functions in their refusal to have interior extrema for the modulus. The nonvanishing hypothesis is essential: without it, $|f|$ can attain the minimum value $0$ at an interior zero.
## Hurwitz's Theorem and Stability of Zeros
The Argument Principle gives stability results for zeros under limits. If a sequence of holomorphic functions converges uniformly, the zeros of the limit are limits of zeros of the sequence — and Rouché's Theorem quantifies exactly how many zeros converge to each point.
This is remarkable from a real-variable perspective. A sequence of smooth functions can converge uniformly to a function with far more zeros than any function in the sequence (think of polynomials approximating a function with infinitely many zeros). For holomorphic functions, the Argument Principle enforces a rigid bookkeeping: zeros cannot spontaneously appear or disappear in the limit, they can only move or merge.
[quotetheorem:3358]
Hurwitz's theorem is another stability statement: uniform convergence on compact sets preserves the local zero-counting information seen by the Argument Principle. Zeros may drift or collide in the limit, but they cannot appear from nowhere inside a small contour that avoids zeros of the limiting function.
[example: Zeros of Partial Sums of the Exponential]
The partial sums $p_n(z) = \sum_{k=0}^n \frac{z^k}{k!}$ converge uniformly on compact sets to $e^z$. The exponential has no zeros in $\mathbb{C}$. By Hurwitz's Theorem applied to the disk $|z| \leq R$ for any $R > 0$: for sufficiently large $n$ (depending on $R$), the polynomial $p_n$ has no zeros inside $|z| < R$.
Let us verify this concretely for $R = 1$ and $n = 5$. We have $p_5(z) = 1 + z + z^2/2 + z^3/6 + z^4/24 + z^5/120$. On $|z| = 1$: $|p_5(z) - e^z| \leq \sum_{k=6}^\infty \frac{1}{k!} = e - p_5(1) \approx e - 2.7167 \approx 0.0016$. Meanwhile $|e^z| = e^{\operatorname{Re}(z)} \geq e^{-1} \approx 0.368$ on $|z| = 1$. Since $0.0016 \ll 0.368$, Rouché's Theorem confirms $p_5$ has no zeros inside $|z| < 1$. For $|z| \leq R$ with $R$ large, higher partial sums are needed, but the conclusion always holds eventually.
[/example]
## The Logarithmic Residue and Summing Zeros
The Argument Principle does not only count zeros and poles — it can be used to compute sums of functions evaluated at zeros. If $g$ is holomorphic and $f$ is meromorphic, then $g \cdot f'/f$ is meromorphic, and its residue at a zero $z_0$ of order $m$ is $m \cdot g(z_0)$. Integrating gives a formula that sums $g$ over the zeros and poles of $f$.
[quotetheorem:3359]
Taking $g(z) = z$ gives a formula for the sum of the zeros of $f$ inside $\gamma$ (minus the sum of the poles, each weighted by order). This has two notable applications.
In control theory, the transfer function $H(s)$ of a linear time-invariant system is a rational function of the complex frequency variable $s$. The system is stable if and only if all poles of $H$ lie in the left half-plane $\operatorname{Re}(s) < 0$. The Nyquist stability criterion reformulates this as a winding number condition: plot the image of the imaginary axis under $H$ and count how many times it winds around $-1$. This is precisely the Argument Principle applied to $1 + H(s)$ along a contour enclosing the right half-plane, allowing engineers to read stability directly from the shape of the Nyquist diagram without computing poles explicitly.
In analytic number theory, the Riemann zeta function $\zeta(s) = \sum_{n=1}^\infty n^{-s}$ (for $\operatorname{Re}(s) > 1$, extended by analytic continuation) is meromorphic on $\mathbb{C}$ with a single simple pole at $s = 1$ and zeros at the negative even integers $s = -2, -4, \ldots$ (the trivial zeros) and at certain points in the critical strip $0 < \operatorname{Re}(s) < 1$ (the non-trivial zeros). The Generalized Argument Principle with $g(z) = 1$ applied to rectangles in the critical strip gives explicit formulas for the number $N(T)$ of non-trivial zeros with $0 < \operatorname{Im}(\rho) \leq T$:
\begin{align*}
N(T) = \frac{T}{2\pi} \log \frac{T}{2\pi} - \frac{T}{2\pi} + O(\log T).
\end{align*}
This asymptotic, proved by Riemann and made rigorous by von Mangoldt, is a direct application of the Argument Principle to $\zeta$. The Riemann Hypothesis — that all non-trivial zeros satisfy $\operatorname{Re}(\rho) = 1/2$ — would follow if the winding number count could be localized to a vertical line, but this remains open.
[example: Sum of Zeros of a Polynomial Via Integration]
Let $p(z) = z^2 - (1 + i)z + i = (z - 1)(z - i)$. Both zeros $z = 1$ and $z = i$ lie inside the circle $|z| = 2$. The Generalized Argument Principle with $g(z) = z$ predicts:
\begin{align*}
\frac{1}{2\pi i} \oint_{|z|=2} z \cdot \frac{p'(z)}{p(z)} \, dz = 1 + i.
\end{align*}
Let us verify: $p'(z) = 2z - (1 + i)$, so $\frac{p'(z)}{p(z)} = \frac{2z - (1+i)}{(z-1)(z-i)}$. Compute the residues of $z \cdot \frac{p'(z)}{p(z)}$ at $z = 1$ and $z = i$:
At $z = 1$:
\begin{align*}
\operatorname{Res}\!\left(z \cdot \frac{p'(z)}{p(z)}, 1\right) = \lim_{z \to 1} (z - 1) \cdot z \cdot \frac{2z - (1+i)}{(z-1)(z-i)} = 1 \cdot \frac{2 - 1 - i}{1 - i} = \frac{1 - i}{1 - i} = 1.
\end{align*}
At $z = i$:
\begin{align*}
\operatorname{Res}\!\left(z \cdot \frac{p'(z)}{p(z)}, i\right) = \lim_{z \to i} (z - i) \cdot z \cdot \frac{2z - (1+i)}{(z-1)(z-i)} = i \cdot \frac{2i - 1 - i}{i - 1} = i \cdot \frac{i - 1}{i - 1} = i.
\end{align*}
The sum of residues is $1 + i$, and by the Residue Theorem, $\frac{1}{2\pi i}\oint_{|z|=2} z \cdot \frac{p'(z)}{p(z)}\,dz = 1 + i = z_1 + z_2$, confirming the formula.
[/example]
## References
Lars Ahlfors, *Complex Analysis* (3rd ed., 1979).
Elias M. Stein and Rami Shakarchi, *Complex Analysis* (Princeton Lectures in Analysis, Vol. II, 2003).
Walter Rudin, *Real and Complex Analysis* (3rd ed., 1987).
John B. Conway, *Functions of One Complex Variable* (2nd ed., 1978).
Serge Lang, *Complex Analysis* (4th ed., 1999).