The only way to learn mathematics is to do mathematics, Paul Halmos

Cauchy’s theorem (Classical “Green’s theorem” version). Let $\Omega \subset \mathbb{C}$ be an open domain. Suppose f = u + iv is analytic in $\Omega$ and its partial derivatives ( $u_x,u_y,v_x,v_y$) are continuous in $\Omega$. If $\gamma$ is a positively oriented, piecewise-smooth $C^1$, simple closed contour with $\gamma^* \cup \operatorname{Int}(\gamma) \subset \Omega$ (its path and interior both lie inside Ω), then $\oint_{\gamma} f(z)dz = 0.$
Cauchy’s Theorem (Cauchy–Goursat). This is the more powerful version, as it removes the need for continuous partial derivatives. If f is analytic in an open set containing a simple closed contour γ and its interior $\gamma^*\cup\operatorname{Int}(\gamma)$, then $\oint_{\gamma} f(z)dz = 0$.
Definition. A domain in complex analysis is a subset $D \subseteq \mathbb{C}$ that is simultaneously:
Examples of domains: The entire complex plane $\mathbb{C}$; any open disk $\{z : |z - z_0| < r\}$; any open half-plane such as $\{z : \operatorname{Re}(z) > 0\}$; the interior of any simple closed curve; any open strip $\{z : a < \operatorname{Im}(z) < b\}$.
Non-examples: A closed disk $\{z : |z| \le 1\}$ (not open — boundary points like $z = 1$ have no open neighborhood inside the set); the union of two disjoint open disks (open but not connected); a single point $\{0\}$ (not open); the real line $\mathbb{R} \subset \mathbb{C}$ (not open in $\mathbb{C}$).
Definition. A domain $D$ is simply connected if it has no holes. Intuitively, $D$ is a “solid” region: there is no missing point, puncture, or gap that a closed loop could wind around. Formally, every simple closed curve (a loop that does not cross itself) lying entirely within $D$ can be continuously shrunk to a single point without ever leaving $D$.
This shrinking process is called a null-homotopy. The closed curve is null-homotopic (or contractible) if such a continuous deformation exists. A domain is simply connected if and only if every closed curve in it is null-homotopic.
Geometric intuition. Imagine the domain is a rubber sheet and the closed curve is a rubber band lying on it. If you can contract the rubber band down to a dot without it ever sliding off the edge of the sheet, the domain is simply connected. If the sheet has a hole (like a ring or a punctured disk), a rubber band looped around that hole gets “stuck” — it cannot shrink past the missing region.
Equivalent characterizations. For a domain $D \subseteq \mathbb{C}$, the following are equivalent:
Examples of simply connected domains:
Definition. A domain is multiply connected if it is not simply connected, i.e., it has at least one “hole.”. More formally, there exists at least one simple closed curve in the domain that cannot be continuously shrunk to a single point while staying within the domain. The curve will get stuck around a hole.
Geometric intuition. Think of a multiply connected domain as a surface with one or more islands removed. A rubber band looped around an island cannot shrink to a point. Different loops can wind around different islands, and the topology of the domain determines which integrals vanish and which do not.
Examples of multiply connected domains:
In a simply connected domain where $f$ is analytic:
In a multiply connected domain, all of these properties can fail:
Cauchy’s Theorem for simply connected domains. If a function f is analytic (a function that is complex-differentiable at every point within a domain, i.e., well-behaved and smooth, with no sharp corners, breaks, or singularities like division by zero) throughout a simply simple connected domain D then $\oint_C f(z)dz = 0$ for every closed contour C lying in D.
Cauchy’s Theorem for a Multiply Connected Domain. Let C be a positively oriented (counterclockwise) simple closed contour. Let $C_1, C_2, \cdots, C_n$ be positively oriented simple closed contours lying strictly inside C with pairwise disjoint interiors (no two inner contours overlap, and no inner contour lies inside another). Let $R$ be the multiply connected region (with n holes) inside $C$ but outside of every $C_k$ (each $C_k$ surrounds or bounds one and only one hole in the domain), $R = Int(C) \setminus \bigcup_{k=1}^n \overline{Int(C_k)}$. If f(z) is analytic on an open set containing $\overline{R}$ (hence analytic on each boundary component $C, C_1, \ldots, C_n$ and throughout $R$), then: $\oint_C f(z)dz = \sum_{k=1}^n \oint_{C_k} f(z)dz$ where all contours — the outer boundary $C$ and every inner boundary $C_k$ — are traversed in the same direction (e.g., all counter-clockwise).
The integral over the outer boundary equals the sum of the integrals over the inner boundaries. Each hole contributes independently. If $f$ happens to be analytic inside some $C_k$ as well (i.e., there is no actual singularity in that hole), then $\oint_{C_k} f\,dz = 0$ by the ordinary Cauchy–Goursat theorem, and that hole contributes abolutely nothing to the total sum.
Proof:
The idea is to transform the multiply connected region $R$ into a simply connected region by introducing “cuts,” apply Cauchy’s theorem on the resulting simply connected region, and then observe that the cuts cancel (Figure ii).

1. Introducing the Cuts. Imagine our region $R$ as a piece of paper with $n$ holes punched through it. A loop within this region cannot be contracted to a point if it surrounds a hole — the hole gets in the way. To resolve this, we create a series of “cuts” or “bridges.” We will choose $n$ pairwise disjoint polygonal arcs (cuts), $L_k$, each one connecting the outer contour $C$ to one of the inner contours $C_k$.
For each $k = 1, 2, \ldots, n$, choose a polygonal arc $L_k$ satisfying:
$L_k$ connects a point on the outer contour $C$ to a point on the inner contour $C_k$.
$L_k$ lies entirely in $R$, except at its two endpoints (which lie on $C$ and $C_k$ respectively).
The arcs $L_1, L_2, \ldots, L_n$ are pairwise disjoint (no two cuts intersect each other), and each $L_k$ does not touch any boundary component other than $C$ and $C_k$. The arcs lie entirely in R except at their endpoints.
Such arcs always exist because $R$ is open and connected.
2. The Slit Region Is Simply Connected Now, consider the region $R'$ formed by “cutting” $R$ along these lines, $R' = R \setminus \bigcup_{k=1}^n L_k$ This new region is simply connected. Why is that? Because any loop you could possibly draw in it can be shrunk to a point. If a loop attempts to encircle the $k$-th hole, it would have to cross the cut $L_k$ — but $L_k$ has been removed from $R'$, so the loop cannot complete its circuit around the hole.
In other words, any loop that tries to wind around a hole is forced to cross its cut and thus cannot remain in R′.
3. Tracing the Boundary of $R'$. Now that we have a simply connected region R’, let’s trace its entire boundary. We will create one single, continuous, non-intersecting (simple) contour, which we’ll call $\Gamma$ that traces the entire boundary of the simply connected region $R'$.
Let’s trace $\Gamma$ so that the region $R'$ is always on our left side (positive orientation with respect to $R'$). Here is the path of $\Gamma$:
The resulting Γ is a simple closed contour (the boundary of the simply connected region R′).
4. Applying Cauchy–Goursat. Since R’ is simply connected, f(z) is analytic everywhere inside and on the boundary of R’ (since we only cut through $R$, where $f(z)$ was already analytic). Our new contour $\Gamma$ is the boundary of R’. By the standard Cauchy-Goursat theorem (for simple contours), the integral of $f(z)$ over this entire path $\Gamma$ must be zero: $\oint_{\Gamma} f(z)dz = 0$
5. Expanding and Cancelling. Now, let’s write out what $\oint_{\Gamma} f(z)dz$ actually is. It’s the sum of all the pieces we traveled:
$$ \begin{aligned} \oint_{\Gamma} f(z)dz &=\oint_C f(z)dz \text{( The outer loop, CCW )} \\[2pt] &+\sum_{k=1}^n\Bigl(\int_{L_k} f(z)dz \text{ [The cut "in"] } + \oint_{C_k'} f(z)dz \text{ [The inner loop, clockwise] } + \int_{-L_k} f(z)dz \text{ [The cut "out"] } \Bigr). \end{aligned} $$A fundamental property of contour integrals is that reversing the path negates the value, $\int_{-L_k} f(z)dz = - \int_{L_k} f(z)dz$, so each cut contributes zero. Hence, $0 = \oint_{\Gamma} f(z)dz = \oint_C f(z)dz + \sum_{k=1}^n\oint_{C_k'} f(z)dz \text{ clockwise}$
So, we have: $\oint_C f(z)dz + \sum_{k=1}^n \oint_{C_k'} f(z)dz = 0$ where $C$ is counter-clockwise (CCW) and all the $C_k'$ are clockwise (CW).
6. Reversing to CCW Orientation. Let $C_k$ (without the superscript) be the counter-clockwise (CCW) path around the $k$-th hole. By the path-reversal rule, $\oint_{C_k'} f(z)dz = - \oint_{C_k} f(z)dz$.
Now, substitute this into our previous equation: $\oint_C f(z)dz + \sum_{k=1}^n \left( - \oint_{C_k} f(z)dz \right) = 0$
Or alternatively, $\boxed{\oint_C f(z)\,dz = \sum_{k=1}^n \oint_{C_k} f(z)\,dz} \qquad \blacksquare$
Instead of n separate cuts from C to each $C_k$ (Figure iii), one can use a single chain of cuts that threads through all the holes in sequence. This produces the same result but with a different topology for the slit region.

For each inner boundary $C_k$, let: $p_k$ be the endpoint of $L_k$ on $C_k$, $q_k$ be the endpoint of $L_{k+1}$ on $C_k$. Decompose $C_k$ (with clockwise orientation) into two subarcs: (i) $A_k$. the CW arc on $C_k$ from $p_k$ to $q_k$ (traversed on the forward pass); $B_k$, the CW complementary arc from $q_k$ back to $p_k$ (traversed on the return pass). Similarly, C (with CCW orientation) is split by the endpoints of $L_1$ and $L_{n+1}$ into two CCW arcs:
Boundary $\Gamma=\partial R'$ with region on the left:
This produces a single “stitch” that opens every hole. The boundary $\Gamma$ of the resulting simply connected region consists of C, each $C_k$ (clockwise), and the cuts $L_j$ (each used once forward and once backward). The same cancellation of the cut integrals yields exactly the same identity.
You don’t traverse each $C_k$ entirely on the forward pass. You take the CW subarc $A_k$ from where you enter $C_k$ via $L_k$ to where you leave it via $L_{k+1}$, and you finish the complementary CW subarc $B_k$ on the way back.
TL;DR. On the forward pass you traverse only the first half $A_k$ of each inner boundary (CW), then on the return pass you traverse the second half $B_k$ (also CW). Together they make the full clockwise loop $C_k$. All cut integrals cancel pairwise.
For $k \ge 2$: the singularity $a$ lies outside $C_k$ (since $a$ is inside $C_1$, whose interior is disjoint from the interiors of all other $C_k$). Therefore $\frac{1}{z-a}$ is analytic on and inside $C_k$, and by the ordinary Cauchy–Goursat theorem: $\oint_{C_k} \frac{dz}{z-a} = 0 \qquad \text{for } k = 2, 3, \ldots, n.$
For $k = 1$: the singularity $a$ lies inside $C_1$. By the Cauchy Integral Formula (with $g(z) = 1$): $\oint_{C_1} \frac{dz}{z-a} = 2\pi i \cdot g(a) = 2\pi i.$ The outer integral detects the singularity inside $C_1$ and is completely indifferent to the other holes. Each hole contributes independently, and only those holes containing singularities of $f$ produce nonzero contributions.

Solution: The function is not analytic where the denominator is zero, so we have two simple poles at z = 0 and z = 1. $C$ is a simple closed contour (positively oriented) that encloses both singularities. The region $R$ inside $C$ but outside the singularities is a multiply connected domain (a region with two “holes”).
To apply this theorem, we can take small clockwise circles $C_1$ and $C_2$ around the points 0 and 1 where $C_1$ is a circle around $z = 0$, small enough to exclude $z = 1$ and $C_2$ is also a circle around $z = 1$, small enough to exclude $z = 0$. This theorem states that the integral over the outer boundary C is equal to the sum of the integrals over the inner boundaries $C_1$ and $C_2$, $\oint_C \frac{dz}{z(z-1)} = \oint_{C_1} \frac{dz}{z(z-1)} + \oint_{C_2} \frac{dz}{z(z-1)}$.
We use partial fractions to simplify the integrand: $\frac{1}{z(z-1)} = \frac{1}{z-1} - \frac{1}{z}$.
Thus,
$$ \begin{aligned} \oint_C \frac{dz}{z(z-1)} &=[\text{The Cauchy Theorem for Multiply Connected Domains}] \\[2pt] &=\oint_{C_1} \frac{dz}{z(z-1)} + \oint_{C_2} \frac{dz}{z(z-1)} \\[2pt] &=\oint_{C_1}\frac{dz}{z-1} - \oint_{C_1}\frac{dz}{z} + \oint_{C_2}\frac{dz}{z-1} - \oint_{C_2}\frac{dz}{z}\\[2pt] &=0 - 2\pi i + 2\pi i - 0\\[2pt] &=0. \end{aligned} $$$\oint_{C_1}\frac{dz}{z-1} = \oint_{C_2}\frac{dz}{z} = 0$ because we are integrating around $C_1$ and $C_2$, the circles around z = 0 and z = 1, respectively. The functions $\frac{dz}{z-1}$ and $\frac{dz}{z}$ are analytic everywhere inside $C_1$ and $C_2$ respectively, since their only singularities are at z = 1 and z = 0 respectively, which are obviously (they were chosen small circles) outside $C_1$ and $C_2$. By the Cauchy-Goursat Theorem, the integral of an analytic function over a simple closed contour is 0.
$\oint_{C_1}\frac{dz}{z} = 2\pi i$. We are integrating around $C_1$, which encloses the singularity at $z=0$. By the Cauchy Integral Formula (with $f(z)=1$ and $a=0$), this integral is $\oint_{C_1} \frac{dz}{z-0} = 2\pi i \cdot f(0) = 2\pi i \cdot 1 = \mathbf{2\pi i}$. Similarly, by the Cauchy Integral Formula with f(z) = 1 and $a=1, \oint_{C_2} \frac{dz}{z-1} = 2\pi i \cdot f(1) = 2\pi i \cdot 1 = \mathbf{2\pi i}$.
Why the answer is zero. The two singularities contribute equal and opposite residues. The residue at $z = 0$ is $\lim_{z \to 0} z \cdot \frac{1}{z(z-1)} = \frac{1}{0-1} = -1$, and the residue at $z = 1$ is $\lim_{z \to 1}(z-1) \cdot \frac{1}{z(z-1)} = \frac{1}{1} = +1$. The total integral is $2\pi i \cdot (\text{sum of residues}) = 2\pi i \cdot (-1 + 1) = 0$. This foreshadows the Residue Theorem, which generalizes this calculation.

Solution: The function is not analytic where the denominator is zero, z²+1 = (z - i)(z + i) so we have two simple poles z = i and z = -i. C is a simple closed contour (positively oriented) that encloses both singularities. The region R inside C but outside the singularities is a multiply connected domain (a region with two “holes”).
To apply this theorem, we can take _small clockwise circles $C_1$ and $C_2$ around the points i and -i. Choose small positively oriented circles: $C_1$ let be a circle around $z = i$ (small enough to exclude $z = -i$, e.g., $|z - i| = 0.5$), and $C_2$ be a circle around $z = -i$ (small enough to exclude $z = i$, e.g., $|z + i| = 0.5$). This theorem states that the integral over the outer boundary C is equal to the sum of the integrals over the inner boundaries $C_1$ and $C_2$, $\oint_C \frac{dz}{z^2+1} = \oint_{C_1} \frac{dz}{z^2+1} + \oint_{C_2} \frac{dz}{z^2+1}$.
We use partial fractions to simplify the integrand: $\frac{1}{z²+1} = \frac{1}{2i}(\frac{1}{z-i}) - \frac{1}{2i}(\frac{1}{z+i})$.
Thus,
$$ \begin{aligned} \oint_C \frac{dz}{z²+1} &=[\text{The Cauchy Theorem for Multiply Connected Domains}] \\[2pt] &=\oint_{C_1} \frac{dz}{z²+1} + \oint_{C_2} \frac{dz}{z²+1} \\[2pt] &=\frac{1}{2i}\oint_{C_1}\frac{1}{z-i } - \frac{1}{2i}\oint_{C_1}\frac{1}{z+i} + \frac{1}{2i}\oint_{C_2}\frac{1}{z-i} - \frac{1}{2i}\oint_{C_2}\frac{1}{z+i}\\[2pt] &=\frac{1}{2i}(2\pi i) - 0 + 0 - \frac{1}{2i}(2\pi i)\\[2pt] &=\pi - \pi = 0. \end{aligned} $$Note: $\oint_{C_1}\frac{dz}{z-i} = 2\pi i$. The pole $z = i$ is inside $C_1$. $\oint_{C_1}\frac{dz}{z+i} = 0$. The function $\frac{1}{z+i}$ is analytic inside $C_1$ (since $z = -i$ is outside $C_1$). By Cauchy–Goursat, $\oint_{C_2}\frac{dz}{z-i} = 0$. The function $\frac{1}{z-i}$ is analytic inside $C_2$ (since $z = i$ is outside $C_2$). $\oint_{C_2}\frac{dz}{z+i} = 2\pi i$. The pole $z = -i$ is inside $C_2$. By the Cauchy Integral Formula, $\oint_{C_2} \frac{dz}{z^2+1} = 0 - \frac{1}{2i}(2\pi i) = -\pi$.
Residue check. The residue at $z = i$ is $\lim_{z \to i}(z-i)\cdot\frac{1}{(z-i)(z+i)} = \frac{1}{2i}$, and the residue at $z = -i$ is $\lim_{z \to -i}(z+i)\cdot\frac{1}{(z-i)(z+i)} = \frac{1}{-2i} = -\frac{1}{2i}$. The sum of residues is zero, confirming $\oint_C \frac{dz}{z^2+1} = 2\pi i \cdot 0 = 0$.
The basic theorem above handles the case where $\Gamma$ is the outer boundary $C$ of a multiply connected region, traversed once counterclockwise. But what if $\Gamma$ is a general closed contour in $R$ — one that might wind around different holes different numbers of times, possibly in different directions?
General Cauchy Theorem for Multiply Connected Domains. Let $R$ be a multiply connected region (with n holes) inside $C$ but outside of every $C_k$ (each $C_k$ surrounds only one hole in the domain), $R = Int(C) \setminus \bigcup_{k=1}^n \overline{Int(C_k)}$, and let $f(z)$ be analytic on $R$. Now, let $\Gamma$ be any general closed contour (not necessarily simple) that lies entirely in R. This $\Gamma$ can wind around the “holes” (the regions inside each $C_k$) in any way it likes (this is the winding number or index of $\Gamma$ around each hole), the integral over $\Gamma$ is: $\oint_{\Gamma} f(z)dz = \sum_{k=1}^n m_k \oint_{C_k} f(z)dz$.
Definition. Let $a_k$ be any point inside the $k$-th hole (the region bounded by $C_k$). The winding number or index of a closed curve $\Gamma$ around $a_k$ is the total (net) number of counterclockwise turns that the object makes around $a_k$, $m_k = \text{Ind}_{\Gamma}(a_k) = \frac{1}{2\pi i} \oint_{\Gamma} \frac{dz}{z-a_k}$.
$m_k = 1$ means $\Gamma$ loops once counter-clockwise around the $k$-th hole and $m_k = -1$ means $\Gamma$ loops once clockwise around the $k$-th hole. Similarly, $m_k = 2$ means $\Gamma$ loops twice counter-clockwise. In general, $m_k \in \mathbb{Z}$ (the winding number is always an integer). $m_k = 0$ means $\Gamma$ does not enclose the $k$-th hole at all.
Proof
This theorem is a direct consequence of the Deformation Principle. This means we can freely “deform” the contour $\Gamma$ anywhere within R without changing the value of the integral $\oint_{\Gamma} f(z)dz$. We can stretch it, shrink it, and move it, as long as we don’t cross any of the “holes” (the regions $Int(C_k)$, singularities) or the outer boundary $C$.
Besides, as we have previously demonstrated, any general contour $\Gamma$ in $R$ can be continuously deformed within $R$ into a new path that is just a combination of the inner boundary contours $C_k$.
How does the deformation work?
If $\Gamma$ loops $m_1$ times around the $C_1$ hole, $m_2$ times around $C_2$, and so on, we can deform $\Gamma$ (using the “cut” logic from the previous proof) so that it becomes a path that:
Traces $C_1$ exactly $m_1$ times. Traces $C_2$ exactly $m_2$ times … Traces $C_n$ exactly $m_n$ times.
The integrals over the “bridges” or “cuts” used to do this deformation all cancel out, just as they did in the previous proof. Since the integral is unchanged by this deformation, the integral over the original Γ must be equal to the integral over this new, “simplified” path:
$\oint_{\Gamma} f(z)dz = \int_{m_1 C_1 + m_2 C_2 + \cdots + m_n C_n} f(z)dz$
By the linearity of integrals, we can pull the constants (the winding numbers) out: $\oint_{\Gamma} f(z)dz = m_1 \oint_{C_1} f(z)dz + m_2 \oint_{C_2} f(z)dz + \cdots + m_n \oint_{C_n} f(z)dz$
This is precisely the theorem: $\oint_{\Gamma} f(z)dz = \sum_{k=1}^n m_k \oint_{C_k} f(z)dz$