Complex Analysis
calculus over \(\mathbb{C}\) is not a cosmetic upgrade of real analysis — it is a different subject with better theorems. asking a function of a complex variable to be differentiable once forces it to be differentiable infinitely often, equal to its taylor series, and rigid enough that its values on a tiny arc determine it everywhere. the payoff for this rigidity: integrals that real methods cannot touch fall to a residue computation in three lines (Brown, James W. and Churchill, Ruel V., 2009).
the complex plane, quickly
\(z = x + iy\) with \(i^2 = -1\); conjugate \(\bar{z} = x - iy\); modulus \(|z|^2 = z\bar{z} = x^2 + y^2\); argument \(\theta = \arg z\). the polar form runs through euler’s formula:
\begin{equation} z = r e^{i\theta} = r(\cos\theta + i\sin\theta), \qquad r = |z|, \end{equation}
which turns multiplication into “multiply moduli, add arguments” — complex multiplication is rotation-and-scaling of the plane. 𐃏 the \(n\)-th roots of unity \(e^{2\pi i k/n}\), \(k = 0, \dots, n-1\), sit at the vertices of a regular \(n\)-gon — the fact underneath the fft. note one loss: \(\mathbb{C}\) has no useful order, so inequalities always live on moduli.
holomorphy and the cauchy–riemann equations
the definition
\(f\) is holomorphic at \(z_0\) if
\begin{equation} f’(z_0) = \lim_{h \to 0} \frac{f(z_0 + h) - f(z_0)}{h} \end{equation}
exists — where \(h\) is complex, so the difference quotient must agree along every direction of approach. this is a far stronger demand than differentiability in \(\mathbb{R}^2\), and it is where all the magic enters.
the derivation
write \(f(x + iy) = u(x,y) + i\,v(x,y)\) and test two approach directions.
real approach (\(h = t \to 0\) along the real axis):
\begin{equation} f’(z_0) = \frac{\partial u}{\partial x} + i\,\frac{\partial v}{\partial x}. \end{equation}
imaginary approach (\(h = it\), \(t \to 0\)):
\begin{equation} f’(z_0) = \frac{u(x, y+t) + iv(x, y+t) - u(x,y) - iv(x,y)}{it} = \frac{\partial v}{\partial y} - i\,\frac{\partial u}{\partial y}. \end{equation}
equate real and imaginary parts:
\begin{equation} \boxed{\;\frac{\partial u}{\partial x} = \frac{\partial v}{\partial y}, \qquad \frac{\partial u}{\partial y} = -\frac{\partial v}{\partial x}\;} \end{equation}
the cauchy–riemann equations: necessary for holomorphy, and together with continuity of the partials, sufficient. differentiating them once more gives \(u_{xx} + u_{yy} = 0\) — both components of a holomorphic function are harmonic, which is why complex analysis moonlights as the theory of two-dimensional electrostatics and fluid flow.
contour integration
for a curve \(\gamma : [a,b] \to \mathbb{C}\),
\begin{equation} \int_{\gamma} f(z)\,dz = \int_a^b f(\gamma(t))\,\gamma’(t)\,dt, \end{equation}
with the workhorse ml-inequality: \(\bigl|\int_{\gamma} f\,dz\bigr| \leq M L\) where \(M\) bounds \(|f|\) on \(\gamma\) and \(L\) is the arc length.
the one integral everyone must compute by hand — around the unit circle \(\gamma(t) = e^{it}\):
\begin{equation} \oint \frac{dz}{z} = \int_0^{2\pi} \frac{i e^{it}}{e^{it}}\,dt = 2\pi i, \qquad\text{while}\qquad \oint z^n\,dz = 0 \quad (n \neq -1). \end{equation}
every closed-contour integral in the subject is a bookkeeping of how many \(\tfrac{1}{z}\)-type terms it encloses; the residue theorem below is exactly that bookkeeping, industrialised.
cauchy’s theorem and integral formula
the theorem
cauchy’s integral theorem. if \(f\) is holomorphic on and inside a simple closed contour \(\gamma\), then
\begin{equation} \oint_{\gamma} f(z)\,dz = 0. \end{equation}
proof sketch (with the extra assumption that \(f’\) is continuous): split into real contour integrals and apply green’s theorem:
\begin{align*} \oint_{\gamma} f\,dz &= \oint_{\gamma} (u\,dx - v\,dy) + i \oint_{\gamma} (v\,dx + u\,dy) \\ &= \iint_D \left( -\frac{\partial v}{\partial x} - \frac{\partial u}{\partial y} \right) dA + i \iint_D \left( \frac{\partial u}{\partial x} - \frac{\partial v}{\partial y} \right) dA = 0 + i\,0, \end{align*}
both integrands vanishing by cauchy–riemann. \(\blacksquare\) goursat later removed the continuity assumption entirely (triangle subdivision argument), which matters logically: it lets the theory bootstrap \(f’\)’s regularity from nothing. 𐃏
the integral formula
for \(f\) holomorphic on and inside \(\gamma\), and \(z_0\) inside:
\begin{equation} f(z_0) = \frac{1}{2\pi i} \oint_{\gamma} \frac{f(z)}{z - z_0}\,dz. \end{equation}
proof sketch: the integrand is holomorphic in the region between \(\gamma\) and a small circle \(C_{\varepsilon}\) around \(z_0\), so by cauchy’s theorem the two integrals agree — deform \(\gamma\) down to \(C_{\varepsilon}\). on \(C_{\varepsilon}\), write \(f(z) = f(z_0) + (f(z) - f(z_0))\): the first term contributes \(f(z_0) \oint dz/(z - z_0) = 2\pi i f(z_0)\) by the unit-circle computation, and the second vanishes as \(\varepsilon \to 0\) by the ml-inequality and continuity of \(f\). \(\blacksquare\)
differentiating under the integral sign — legal, the kernel is smooth in \(z_0\) — gives every derivative for free:
\begin{equation} f^{(n)}(z_0) = \frac{n!}{2\pi i} \oint_{\gamma} \frac{f(z)}{(z - z_0)^{n+1}}\,dz, \end{equation}
so a once-differentiable complex function is infinitely differentiable. no real-variable analogue of this exists.
consequences
- cauchy estimates. if \(|f| \leq M\) on a circle of radius \(R\) about \(z_0\), the derivative formula with \(|z - z_0| = R\) gives \(|f^{(n)}(z_0)| \leq n!\,M / R^n\).
- liouville’s theorem, with proof. an entire (holomorphic on all of \(\mathbb{C}\)) bounded function is constant: the \(n = 1\) estimate gives \(|f’(z_0)| \leq M/R\) for every \(R\), so \(f’ \equiv 0\), so \(f\) is constant. \(\blacksquare\)
- the fundamental theorem of algebra, free of charge. let \(p\) be a nonconstant polynomial with no root. then \(1/p\) is entire; and since \(|p(z)| \to \infty\) as \(|z| \to \infty\), \(1/p\) is bounded outside a large disc and (being continuous) on it. liouville forces \(1/p\) constant — contradiction. every polynomial of degree \(n \geq 1\) has a root, hence exactly \(n\) with multiplicity (Courant, Richard and Robbins, Herbert, 1941). 𐃏
- maximum modulus principle. a nonconstant holomorphic function on a domain attains no interior maximum of \(|f|\) — maxima live on the boundary. (via the mean value property: \(f(z_0)\) is the average of \(f\) over any circle around \(z_0\), and an average cannot exceed its ingredients unless they are all equal.)
- rouché’s theorem (the zero-counter): if \(|g| < |f|\) on a closed contour, then \(f\) and \(f + g\) have the same number of zeros inside. standard party trick: all five zeros of \(z^5 + 3z + 1\) lie in \(|z| < 2\), run the comparison with \(f = z^5\) and \(g = 3z + 1\) on \(|z| = 2\): \(|3z+1| \leq 7 < 32 = |z^5|\), so \(z^5 + 3z + 1\) has all five zeros inside.
taylor and laurent series
taylor. holomorphic on a disc \(|z - z_0| < R\) means equal to the taylor series there:
\begin{equation} f(z) = \sum_{n=0}^{\infty} \frac{f^{(n)}(z_0)}{n!}(z - z_0)^n, \end{equation}
convergent on the largest disc avoiding singularities. (contrast real analysis, where \(e^{-1/x^2}\) is smooth yet equals no power series at \(0\).)
laurent. holomorphic on an annulus \(r < |z - z_0| < R\) means expandable with negative powers too:
\begin{equation} f(z) = \sum_{n=-\infty}^{\infty} a_n (z - z_0)^n, \qquad a_n = \frac{1}{2\pi i} \oint \frac{f(z)}{(z - z_0)^{n+1}}\,dz. \end{equation}
the coefficient \(a_{-1}\) is the residue — the one term that survives closed-contour integration.
singularities, classified
an isolated singularity \(z_0\) is judged by the principal (negative-power) part of the laurent expansion around it:
| type | principal part | behaviour | example at \(0\) |
|---|---|---|---|
| removable | none | \(f\) bounded near \(z_0\); patchable | \(\sin z / z\) |
| pole, order \(m\) | finitely many terms | \(\lvert f \rvert \to \infty\); \((z-z_0)^m f\) removable | \(1/z^2\) |
| essential | infinitely many terms | wild: image dense in \(\mathbb{C}\) | \(e^{1/z}\) |
riemann’s removability theorem says bounded near \(z_0\) already implies removable; casorati–weierstrass says an essential singularity’s image is dense in every neighbourhood (picard sharpens: it hits every value but at most one, infinitely often). 𐃏
the residue theorem
theorem. if \(f\) is holomorphic on and inside a positively-oriented simple closed contour \(\gamma\) except at finitely many interior points \(z_1, \dots, z_k\), then
\begin{equation} \oint_{\gamma} f(z)\,dz = 2\pi i \sum_{j=1}^{k} \operatorname{Res}_{z = z_j} f. \end{equation}
(shrink \(\gamma\) onto small circles around each singularity — cauchy’s theorem kills everything else — and integrate each laurent series term by term; only \(a_{-1}\) survives.) computing residues:
- simple pole: \(\operatorname{Res}_{z_0} f = \lim_{z \to z_0} (z - z_0) f(z)\); for \(f = p/q\) with simple zero of \(q\): \(p(z_0)/q’(z_0)\).
- pole of order \(m\): \(\operatorname{Res}_{z_0} f = \dfrac{1}{(m-1)!} \lim_{z \to z_0} \dfrac{d^{m-1}}{dz^{m-1}} \bigl[(z - z_0)^m f(z)\bigr]\).
a real integral, done honestly
claim. \(\displaystyle\int_{-\infty}^{\infty} \frac{dx}{(1 + x^2)^2} = \frac{\pi}{2}\).
setup. \(f(z) = \dfrac{1}{(1+z^2)^2} = \dfrac{1}{(z - i)^2 (z + i)^2}\): double poles at \(\pm i\). integrate over the closed contour \(\Gamma_R\) = segment \([-R, R]\) plus the upper semicircle \(C_R\) (radius \(R > 1\)), which encloses only \(z = i\).
residue at the double pole. with \(m = 2\), \((z-i)^2 f(z) = (z+i)^{-2}\):
\begin{equation} \operatorname{Res}_{z=i} f = \lim_{z \to i} \frac{d}{dz} (z + i)^{-2} = \lim_{z \to i} \frac{-2}{(z+i)^{3}} = \frac{-2}{(2i)^3} = \frac{-2}{-8i} = \frac{1}{4i} = -\frac{i}{4}. \end{equation}
apply the theorem.
\begin{equation} \oint_{\Gamma_R} f(z)\,dz = 2\pi i \left(-\frac{i}{4}\right) = \frac{\pi}{2}. \end{equation}
kill the arc. on \(C_R\), \(|1 + z^2| \geq |z|^2 - 1 = R^2 - 1\), so \(|f| \leq (R^2-1)^{-2}\), and by the ml-inequality
\begin{equation} \left| \int_{C_R} f\,dz \right| \leq \frac{\pi R}{(R^2 - 1)^2} \xrightarrow{R \to \infty} 0. \end{equation}
conclude. the segment contribution converges to the real integral, the arc dies, and the contour total is pinned at \(\tfrac{\pi}{2}\) for every \(R > 1\):
\begin{equation} \int_{-\infty}^{\infty} \frac{dx}{(1+x^2)^2} = \frac{\pi}{2}. \qquad \blacksquare \end{equation}
the numeric check at the bottom of the page confirms both the integral and the residue. drilling this technique on a hundred variants is what (Schaum, 2009) is for.
multivalued functions and branch cuts
\(\log z = \ln|z| + i\arg z\) is the trouble: \(\arg z\) is only defined up to \(2\pi k\), so \(\log\) (and with it \(z^{\alpha} = e^{\alpha \log z}\), for non-integer \(\alpha\)) is multivalued. the fix is surgical — choose a branch cut, a curve from the branch point \(0\) to \(\infty\) that the function is forbidden to cross, and the remaining domain carries a single-valued holomorphic branch. the standard choice cuts along the negative real axis, keeping \(\arg z \in (-\pi, \pi)\): approaching \(-1\) from above gives \(\log(-1) = i\pi\), from below \(-i\pi\) — a jump of \(2\pi i\) across the cut.
integrals with \(\log\) or fractional powers in them use keyhole contours that hug both sides of the cut and collect the \(2\pi i\) discrepancy as the answer — the cut stops being a nuisance and becomes the computational device.
conformal maps, a teaser
wherever \(f’(z_0) \neq 0\), a holomorphic map is conformal: it preserves angles between intersecting curves (locally it multiplies by \(f’(z_0)\) — a rotation-and-scale, which moves angles rigidly). the riemann mapping theorem is the astonishing global statement: every simply-connected proper subdomain of \(\mathbb{C}\) — however jagged — is the image of the unit disc under some conformal bijection. the mobius transformations \(z \mapsto \tfrac{az+b}{cz+d}\) (\(ad - bc \neq 0\)) are the conformal automorphisms of the riemann sphere, mapping circles-and-lines to circles-and-lines. applied mathematics uses all of this to teleport hard boundary-value problems onto discs, solve them there, and pull the answer back — see the harmonic-function remark under cauchy–riemann.
numerics: checking the residue computation
both claims of the worked example, verified: the real integral against \(\pi/2\), and the residue at \(z = i\) via a small numeric contour circle:
import numpy as np
# target: I = integral over R of dx / (1+x^2)^2 = pi/2 (via residue at z = i)
f = lambda x: 1.0 / (1.0 + x**2) ** 2
# (a) brute-force numeric integral on a huge interval
x = np.linspace(-2000, 2000, 8_000_001)
I_num = np.trapezoid(f(x), x)
print(f"numeric integral : {I_num:.10f}")
print(f"pi/2 : {np.pi/2:.10f}")
# (b) residue at the double pole z = i, computed numerically:
# res = (1/2 pi i) * contour integral of f around a small circle about i
t = np.linspace(0, 2 * np.pi, 400_001)
r = 0.05
z = 1j + r * np.exp(1j * t) # circle around i
dz = 1j * r * np.exp(1j * t)
fz = 1.0 / (1.0 + z**2) ** 2
res = np.trapezoid(fz * dz, t) / (2j * np.pi)
print(f"numeric residue : {res:.10f}")
print(f"analytic residue : {-0.25j}") # -i/4
print(f"2*pi*i*residue : {(2j * np.pi * res).real:.10f} (should be pi/2)")
numeric integral : 1.5707963267
pi/2 : 1.5707963268
numeric residue : 0.0000000000-0.2500000000j
analytic residue : (-0-0.25j)
2*pi*i*residue : 1.5707963268 (should be pi/2)
the numeric contour integral around a circle of radius \(0.05\) recovers the residue \(-i/4\) to ten decimals — a direct demonstration that the residue is a property of the singularity alone, not of the contour used to probe it.
see also
- real analysis — the theory this page one-ups
- single-variable calculus — improper integrals, the honest way in
- multivariable calculus — green’s theorem powers cauchy’s
- functional analysis — operator theory keeps the resolvents complex
- calculus — the family home
References
Brown, James W. and Churchill, Ruel V. (2009). Complex Variables and Applications, McGraw-Hill Education.
Courant, Richard and Robbins, Herbert (1941). What is Mathematics?, Oxford University Press.
Schaum (2009). Complex Variables with an Introduction to Conformal Mapping and Its Applications, McGraw-Hill Education.
Backlinks (4)
1. Single-Variable Calculus /wiki/mathematics/calculus/svars/
the calculus of one real variable, assembled in logical order: limits, then continuity and its two workhorse theorems (ivt, evt), then the derivative and the mean value theorem, taylor’s theorem with an honest error bound, and finally the riemann integral and both parts of the fundamental theorem. everything downstream — multivariable calculus, differential equations, every convergence argument in machine learning — leans on the theorems here. proofs are given where they are short and instructive; the deferred foundations live in real analysis (Courant, Richard, 1996).
2. Wiki /wiki/
Knowledge is a paradox. The more one understand, the more one realises the vastness of his ignorance.
3. Calculus /wiki/mathematics/calculus/
calculus is the mathematics of change: it assigns exact meaning to two questions that stumped everyone from zeno to the seventeenth century — how fast is a quantity changing right now? and how much of it has accumulated so far? 𐃏 both questions are answered by the same primitive operation, the limit, applied in two different directions. everything on the pages below is a variation on that one move.