I’d far rather be happy than right any day, Douglas Adams, The Hitchhiker’s Guide to the Galaxy.

A complex function $f(z)$ maps $z = x + iy \in \mathbb{C}$ to another complex number. For example: $f(z) = z^2 = (x + iy)^2 = x^2 - y^2 + 2ixy, f(z) = \frac{1}{z}, f(z) = \sqrt{z^2 + 7}$.
A contour is a continuous, piecewise-smooth curve defined parametrically as: $z(t) = x(t) + iy(t), \quad a \leq t \leq b$.
Definition (Smooth Contour Integral). Let ᵞ be a smooth contour (a continuously differentiable path in the complex plane), $\gamma: [a, b] \to \mathbb{C}$. Let $f: \gamma^* \to \mathbb{C}$ be a continuous complex-valued function defined on the trace $\gamma^*$ of the contour (i.e. along the image of $\gamma$). Then, the contour integral of f along $\gamma$ is defined as $\int_{\gamma} f(z)dz := \int_{a}^{b} f(\gamma(t)) \gamma^{'}(t)dt$.

Deformation of Contours. If two contours $\gamma_1$ and $\gamma_2 $ are homotopic (i.e., one can be continuously deformed into the other without crossing any singularities of f) in a domain where f(z) is analytic, then: $\int_{\gamma_1} f(z)dz = \int_{\gamma_2} f(z)dz.$
Fundamental Theorem of Calculus for Contours. Suppose $\gamma$ is a contour (piecewise smooth path) from a to b, f is defined on a domain D containing $\gamma^*$ (the image of $\gamma$) and admits a primitive (antiderivative) F on D (i.e., $F'(z) = f(z)$), then $\int_{\gamma} f(z)dz = F(\gamma(b)) - F(\gamma(a))$. In particular, if $\gamma$ is a closed contour (i.e., $\gamma(a)=\gamma(b)$), this integral evaluates to zero, $\int_{\gamma} f(z)dz = 0.$
Estimation Theorem or the Triangle Inequality for Integrals. The triangle inequality for integrals in complex analysis states thatfor any continuous complex function $f:[a,b] \to \mathbb{C}$ on a closed real interval [a,b] (f(t) = u(t) + iv(t), t a real parameter), the following holds: $∣\int_a^b f(t)dt| \leq \int_a^b |f(t)|dt$.
Estimation Lemma (ML Inequality) for contour integrals. For any continuous complex function $f:[a,b] \to \mathbb{C}$ on a closed real interval [a,b] (f(z) = u(x, y) + iv(x, y)) with f bounded by some constant M along the entire contour, |f(z)| ≤ M for all $z \in \gamma^*$ (the image/trace of the contour in the complex plane), the following holds: $∣\int_\gamma f(z)dz| \leq M \cdot l(\gamma)$ where l(γ) is the arc length of the contour γ given by $\int_a^b |\gamma^{'}(t)|dt = \int_a^b \sqrt{x'(t)^2 + y'(t)^2} \text{ where } \gamma(t) = x(t) + iy(t)$.
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 rectifiable Jordan curve is a curve $\gamma$ in the complex plane satisfying four key properties:
Rectifiability is automatic if γ is piecewise C¹ (each smooth piece has a continuous derivative) or C¹. This means the curve is composed of a finite number of segments, each of which is continuously differentiable -it has a derivative everywhere, and that derivative is continuous. γ′ ∈ L¹ (it is integrable in the Lebesgue sense: the integral of its absolute value is finite). Corners and cups are allowed; wild fractal oscillations and self-intersections are not.
How to check rectifiability quickly. If $\gamma:[a,b] \to \mathbb{C}$ is piecewise $C^1$ and $\int_a^b |\gamma'(t)|dt < \infty$, then $\gamma$ is rectifiable. If $\gamma$ is a simple polygon or a smooth perturbation of a circle, it’s rectifiable.
A fundamental result in topology is the Jordan’s curve theorem.
Jordan’s curve theorem. Any simple closed curve divides or separates the complex plane into two disjoint connected regions: one interior (bounded) and one exterior (unbounded). In other words, it partitions the plane into exactly three disjoint sets:
Examples:
Non-Examples:
Definition. Let $\gamma: [α, β] → \mathbb{C}$ be a piecewise smooth, closed curve (so γ(α) = γ(β)), the winding number of $\gamma$ about $z_0$, a complex point not on the curve $z_0$ ∉ γ([α, β]), also known as the index of $z_0$ with respect to γ, is defined as $n(\gamma, z_0) = Ind_{\gamma}(z_0) = \frac{1}{2\pi i} \oint_{\gamma} \frac{dz}{z - z_0} = \frac{1}{2\pi i} \int_{\alpha}^{\beta} \frac{\gamma'(t)}{\gamma(t) - z_0}dt$ (the total number of counterclockwise turns that the curve wraps or makes around $z_0$).
The integrand $\frac{1}{z-z_0}$ has a special property: when you integrate it around a circle centered at $z_0$, you get $2\pi i$. More generally, let $z - z_0 = re^{i\theta} \implies \frac{dz}{z-z_0} = \frac{dr}{r}+id\theta$. When you integrate around a closed curve, $\frac{dr}{r}$ integrates to zero, and $i d\theta$ accumulates the total angle change. So $\frac{1}{2\pi i} \oint_{\gamma} \frac{dz}{z - z_0} = \frac{\Delta \theta}{2\pi}=$ (total angle swept) / (full rotation) = number of winding.
Examples:
Cauchy’s Theorem for rectifiable Jordan curves. Let Γ be a rectifiable Jordan curve (simple, closed, finite length), positively oriented, and let f be analytic on an open set Ω containing both the curve and its interior, Γ* ∪ Int(Γ). Then, $\oint_{\Gamma} f(z)dz = 0.$
Proof:
This set $U_\varepsilon$ is an open “thickening” of Γ ∪ Int(Γ) — imagine drawing a curve and then shading a small, uniform band around it. Since $\Omega$ is open, then every point on $\Gamma$ and in $\text{Int}(\Gamma)$ has a little open ball around it that stays inside $\Omega$. So we can take the union of all these balls — and that union is precisely the tubular neighborhood $U_\varepsilon$. This thickening band never accidentally spills out of the domain of analyticity. Note: The distance function is $\text{dist}(z, A) := \inf_{w \in A} |z - w|$.
For any two non-empty subsets A and B, the Hausdorff distance is: $d_H(A, B) = max \{ sup_{a \in A} inf_{b \in B} d(a, b), sup_{b \in B} inf_{a \in A} d(a, b) \}$, where sup represents the supremum (least upper bound) and inf the infimum (greatest lower bound). Intuitively: It’s the smallest ε such that every point of A is within distance ε of some point of B, and vice-versa.
Construction sketch: Choose finitely many points on Γ, connect consecutive points by line segments short enough that the resulting chordal polygon stays inside $U_ε$ (by triangle inequality, any point on the line segment between two close points on Γ remains close to Γ, keeping the entire polygoin inside $U_\varepsilon$). For sufficiently small δ (the sample points are close enough), this polygon is simple (since Γ is simple, sufficiently fine sampling prevents the polygon from self-intersecting) and approximates Γ uniformly (short line segments between nearby points on Γ cannot deviate far from Γ).
What this curve looks like? This is a polar equation where the angle is t (from $e^{it}$) and the radius is $r(t) = 1+\varepsilon \cos (5t)$. As t goes from 0 to $2\pi$ (one full rotation), the $\cos(5t)$ term oscillates 5 times. This makes the radius “wobble” in and out 5 times, creating a shape like a 5-petal flower.
Take $f(z) = e^z$ (entire, meaning it is analytic on the entire complex plan). Since (f) is analytic on $\mathbb{C}, \text{ by the Cauchy-Goursat theorem, the integral must be zero } \oint_{\gamma} e^z dz = 0.$
Why this is interesting. The boundary has constant changing curvature and no straight segments, but Cauchy’s theorem cares only about analyticity inside the loop —not about the shape.
We can verify this directly by noting that f(z) has an antiderivative $F(z) = \frac{z^8}{8} - \frac{3z^2}{2} + z$. By the fundamental theorem of calculus for contour integrals: $\oint_γ f(z)dz = F(0)−F(0)=0$,since the contour starts and ends at the same point (0). This confirms the result.
Corners do not affect the conclusion; analyticity on and inside the square is all that matters. The existence of an antiderivative for entire functions provides an alternative verification method.
This is a trapezoid, a closed polygon-like shape with a “sharp” cusp at the origin (0, 0) where the curve is not differentiable. However, the curve is rectifiable (finite total length), simple, but not $C^1$ at the cusp - just piecewise $C^1$.
For any entire (f) (e.g., f(z) = sin(z), z², etc.), $\oint_{\gamma} f(z)dz = 0.$
Differentiability of the path is not required for Cauchy’s theorem; only finite length (rectifiability) and no self-intersection (simple closed curve) are needed, along with analyticity of f on and inside the contour.
The general polar equation for a rose curve is 𝑟 = 𝑎sin(𝑛𝜃) or 𝑟 = 𝑎cos(𝑛𝜃), but a modified version with a constant added, like 𝑟 = 𝑎 + 𝑏sin(𝑛𝜃), is sometimes called a “star-shaped” curve, especially when it is not centered at the origin.
What this curve looks like? This is a polar equation where the angle is t (from $e^{it}$) and the radius is $r(t) = 2+\tfrac12\sin(3t)$. As t goes from 0 to $2\pi$ (one full rotation), the value of sin(3t) oscillates between -1 and 1 three times per rotation. The radius $2+\tfrac12\sin(3t)$ varies smoothly between $2+\tfrac12(-1) = 1.5$ and $2+\tfrac12(1) = 2.5$, so γ encloses the origin but never passes through it and is obviously C¹ with |γ′(t)| bounded; hence γ has finite length.
The sin(3t) term causes the radius to vary periodically as the curve rotates. Since the period of sin(3t) is $\frac{2\pi}{3}$, the radius will oscillate three times as t goes from 0 to 2𝜋. The curve would resemble a smooth, three-leaf clover shape.
If f is any entire function f(z) = cos(z), z² + 8, e³ + sin(z) + 3z, etc., then f is analytic on and inside γ. By Cauchy–Goursat, $\oint_{\gamma} f(z)dz = 0$.
Thus, the “wiggly star” behaves exactly like a circle: no singularity inside ⇒ zero integral.
Counterexample: singularity outside. Let $\gamma$ be the circle |z -3| = 1, center at 3 and radius 1. Take $f(z)=\dfrac{1}{z}$, which is analytic on and inside $\gamma$ because the singularity at 0 is outside the loop. Then, $\oint_{\gamma}\frac{dz}{z}=0.$ If we instead take $\gamma$ as the unit circle |z| = 1, then 0 lies inside the curve, and $\oint_{\gamma}\frac{dz}{z}=2\pi i\neq 0$. Cauchy’s theorem does not apply there because f is not analytic on $Int(\gamma)$.
Piecewise circular + linear boundary (lens). Let $\gamma$ be a simple closed curve formed by the upper semicircle of |z - 1| = 1 from 0 to 2, the horizontal segment [0, 2] on the real axis, and the lower semicircle part of |z - 1| = 1 from z = 2 back to z = 0. This encloses a lens-shaped region. Though the curve is not smooth at the junction points (z = 0 and z = 2),, it is piecewise smooth and rectifiable. Cauchy’s theorem holds for such curves.
For any entire function f, e.g., $f(z) = z^3; z^2 + 3z + 5; z^n, n \in \mathbb{N}; \sum_{k=0}^m a_k z^k, a_k \in \mathbb{C}; e^{az+b}, a, b \in \mathbb{C}; \cos z; \cos(z^3 + 2z); e^{\sin z}$, $\oint_{\gamma} f(z) dz=0.$
Consider the function $f(z) = 3z^2 +2z$ so F(z) = $z^3+z^2$. For any rectifiable Jordan curve in $\mathbb{C}$, we have $\oint_{\gamma} (3z^2+2z)dz=0.$
This result is more general than Cauchy’s theorem for rectangles or polygons - it applies to any rectifiable Jordan curve. When an antiderivative exists, the integral over any closed contour vanishes, regardless of what is happening inside the loop.