4.10.2Advanced Topics (Elite Level)

Complex integration — contour integrals

1,657 words8 min readdifficulty · medium

WHAT is a contour integral?


Deriving the key results from scratch

Step 1 — The fundamental example dzz\displaystyle\oint \frac{dz}{z}

Take the unit circle z(t)=eitz(t)=e^{it}, t[0,2π]t\in[0,2\pi], counterclockwise. Then z(t)=ieitz'(t)=ie^{it}.

z=1dzz=02π1eit(ieit)dt=02πidt=2πi.\oint_{|z|=1}\frac{dz}{z}=\int_0^{2\pi}\frac{1}{e^{it}}\,(ie^{it})\,dt=\int_0^{2\pi} i\,dt = 2\pi i.

Why this step? We substituted the parametrisation and let the eite^{it} cancel. The leftover idt\int i\,dt is trivial. The answer 2πi02\pi i \neq 0 — this is the seed of all residue theory.

Step 2 — The power znz^n, n1n\neq -1

With the same circle, zndz=02πeintieitdt=i02πei(n+1)tdt.\displaystyle\oint z^n\,dz=\int_0^{2\pi}e^{int}\,ie^{it}\,dt = i\int_0^{2\pi}e^{i(n+1)t}\,dt.

For integer n1n\neq-1, ei(n+1)te^{i(n+1)t} is periodic over [0,2π][0,2\pi], so its integral is 00.

  z=1zndz={2πi,n=10,nZ, n1  \boxed{\;\oint_{|z|=1} z^n\,dz=\begin{cases}2\pi i,& n=-1\\[2pt]0,& n\in\mathbb Z,\ n\neq-1\end{cases}\;}

Why this step? Only the 1/z1/z term survives a loop. Every residue formula is just this fact in disguise.

Step 3 — Path independence for analytic ff (Cauchy's theorem idea)

Write f=u+ivf=u+iv, z=x+iyz=x+iy, dz=dx+idydz=dx+i\,dy: γfdz=γ(udxvdy)+iγ(vdx+udy).\int_\gamma f\,dz=\int_\gamma (u\,dx - v\,dy)+i\int_\gamma(v\,dx+u\,dy). Apply Green's theorem to each piece over the region DD enclosed by a closed γ\gamma:

+i\iint_D\!\Big(\tfrac{\partial u}{\partial x}-\tfrac{\partial v}{\partial y}\Big)dA.$$ If $f$ is **analytic**, the ==Cauchy–Riemann equations== $u_x=v_y,\ u_y=-v_x$ make **both** integrands vanish. > [!formula] Cauchy's Integral Theorem > If $f$ is analytic on and inside a closed contour $\gamma$, then > $$\oint_\gamma f(z)\,dz = 0.$$ > **WHY:** analyticity = Cauchy–Riemann = both Green's-theorem integrands are zero. ### Step 4 — Cauchy's Integral Formula Take $f$ analytic, $a$ inside $\gamma$. Consider $\dfrac{f(z)}{z-a}$, which has one bad point at $a$. Deform $\gamma$ to a tiny circle $z=a+\varepsilon e^{it}$ (allowed, since $f/(z-a)$ is analytic in the ring between them, so the loop integral there is $0$). Then $$\oint_\gamma\frac{f(z)}{z-a}dz=\int_0^{2\pi}\frac{f(a+\varepsilon e^{it})}{\varepsilon e^{it}}\, i\varepsilon e^{it}\,dt = i\int_0^{2\pi}f(a+\varepsilon e^{it})\,dt \xrightarrow{\varepsilon\to0} 2\pi i\,f(a).$$ > [!formula] Cauchy Integral Formula & Residue Theorem > $$f(a)=\frac{1}{2\pi i}\oint_\gamma\frac{f(z)}{z-a}\,dz,\qquad > \oint_\gamma f\,dz = 2\pi i\sum_k \operatorname{Res}_{z=z_k} f.$$ > A **residue** $\operatorname{Res}_{z_0}f$ is the coefficient $c_{-1}$ in the Laurent series of $f$ > about $z_0$ — exactly the only term that survived Step 2. ![[4.10.02-Complex-integration-—-contour-integrals.png]] --- ## Worked examples > [!example] Example 1 — Direct parametrisation > Evaluate $\displaystyle\int_\gamma \bar z\,dz$, $\gamma$ = straight line from $0$ to $1+i$. > - Parametrise $z(t)=t(1+i)$, $t\in[0,1]$, so $\bar z = t(1-i)$, $z'=1+i$. **Why?** straight line = linear $z(t)$. > - $\int_0^1 t(1-i)(1+i)\,dt = \int_0^1 t\cdot 2\,dt = 1.$ **Why?** $(1-i)(1+i)=2$. > - Note: $\bar z$ is **not analytic**, so the answer *does* depend on the path. Contrast with $z$. > [!example] Example 2 — Using the residue theorem > $\displaystyle\oint_{|z|=2}\frac{z}{z^2+1}\,dz$. > - Poles where $z^2+1=0\Rightarrow z=\pm i$; both lie inside $|z|=2$. **Why?** $|{\pm i}|=1<2$. > - $\operatorname{Res}_{z=i}=\dfrac{z}{2z}\Big|_{i}=\tfrac12$, likewise at $-i$ gives $\tfrac12$. > **Why?** simple pole rule $\operatorname{Res}=\dfrac{p(z)}{q'(z)}$ with $q'=2z$. > - Sum $=1$, so integral $=2\pi i\cdot 1 = 2\pi i.$ > [!example] Example 3 — A real integral via a contour > $\displaystyle\int_{-\infty}^{\infty}\frac{dx}{x^2+1}$. > - Close with a big semicircle in the upper half-plane (radius $R\to\infty$). **Why?** the arc's > contribution $\to 0$ since $|f|\sim 1/R^2$ and arc length $\sim \pi R$. > - Only pole inside is $z=i$: $\operatorname{Res}_{i}\frac{1}{z^2+1}=\frac{1}{2i}$. > - Integral $=2\pi i\cdot\frac{1}{2i}=\pi.$ Matches $\arctan x\big|_{-\infty}^{\infty}=\pi.$ ✔ --- ## Forecast-then-Verify > [!recall]- Forecast before computing $\oint_{|z|=1}\frac{e^z}{z}dz$ > Guess first: which term of the Laurent series of $e^z/z$ controls it? … The $1/z$ coefficient is > $e^0=1$, so by CIF $f(0)=1$ and the integral $=2\pi i\cdot 1 = 2\pi i$. Did you predict $2\pi i$? --- ## Common mistakes (Steel-man + fix) > [!mistake] "All closed loop integrals are zero." > **Why it feels right:** Cauchy's theorem says $\oint f=0$. **The catch:** that requires $f$ > **analytic inside**. $\oint dz/z = 2\pi i \neq 0$ because $z=0$ is a singularity *inside*. > **Fix:** check for poles before declaring $0$. > [!mistake] "$\int_\gamma f\,dz$ depends only on endpoints, always." > **Why it feels right:** real integrals only need endpoints; and it's *true for analytic* $f$. > **Fix:** path-independence needs analyticity. $\int_\gamma \bar z\,dz$ (Example 1) is path-dependent. > [!mistake] Forgetting $z'(t)$ (the $dz$ factor). > **Why it feels right:** in real calculus $dx$ is "just there". **Fix:** $dz=z'(t)\,dt$ always; > dropping $ie^{it}$ kills the answer. > [!mistake] Orientation sign. > Counterclockwise gives $+2\pi i$; clockwise flips the sign. **Fix:** standard positive orientation > is counterclockwise; reversing $\gamma$ multiplies the integral by $-1$. --- ## 80/20 — the 20% that gives 80% 1. $dz=z'(t)\,dt$, then it's a real integral in $t$. 2. $\oint z^n dz = 2\pi i$ iff $n=-1$, else $0$. 3. Analytic everywhere inside $\Rightarrow \oint=0$. 4. Otherwise $\oint = 2\pi i\sum\text{Res}$, and simple-pole residue $=\frac{p}{q'}$. --- ## #flashcards/maths What is $dz$ in terms of a parametrisation $z(t)$? ::: $dz=z'(t)\,dt$. Value of $\oint_{|z|=1} z^n\,dz$? ::: $2\pi i$ if $n=-1$, otherwise $0$ (integer $n$). State Cauchy's Integral Theorem. ::: If $f$ is analytic on and inside closed $\gamma$, then $\oint_\gamma f\,dz=0$. What property of $f$ makes both Green's-theorem integrands vanish? ::: The Cauchy–Riemann equations $u_x=v_y,\ u_y=-v_x$. State Cauchy's Integral Formula. ::: $f(a)=\frac{1}{2\pi i}\oint_\gamma \frac{f(z)}{z-a}\,dz$, $a$ inside $\gamma$. Residue Theorem statement. ::: $\oint_\gamma f\,dz = 2\pi i\sum_k \operatorname{Res}_{z_k} f$. Residue at a simple pole $z_0$ of $p/q$ (with $q(z_0)=0$)? ::: $\operatorname{Res}=p(z_0)/q'(z_0)$. Why is $\int_\gamma \bar z\,dz$ path-dependent? ::: Because $\bar z$ is not analytic, so Cauchy's theorem doesn't apply. $\oint_{|z|=1} e^z/z\,dz$ = ? ::: $2\pi i$ (since $f(0)=e^0=1$ via CIF). Effect of reversing contour orientation? ::: Multiplies the integral by $-1$. --- > [!recall]- Feynman: explain to a 12-year-old > Imagine walking around a flat field while collecting "arrows" (each point gives you a little arrow). > If the field is perfectly smooth, walking all the way around a loop, the arrows cancel and you end > with **nothing** ($0$). But if there's a magic spike (a "pole") inside your loop, you can never > cancel it — every loop around it gives the **same fixed amount**, $2\pi i$ times its strength. So > doing a hard sum becomes just counting the spikes inside your loop! > [!mnemonic] > **"Only $1/z$ survives the loop; everything analytic dies to zero."** > And: **R**esidue **T**heorem = **R**ound **T**rip counts the spikes ($2\pi i\sum$Res). ## Connections - [[Cauchy–Riemann equations]] — why analyticity kills the loop integral. - [[Laurent series]] — residue = coefficient $c_{-1}$. - [[Green's theorem]] — the real-analysis engine behind Cauchy's theorem. - [[Residue theorem applications]] — evaluating real definite integrals. - [[Analytic functions]] — the class for which paths don't matter. ## 🖼️ Concept Map ```mermaid flowchart TD P[Parametrise contour z of t] -->|converts 2D walk to| I[Contour integral in t] I -->|integrate 1/z on circle| S[Seed result 2 pi i] I -->|integrate z^n n not -1| Z[Result 0] S -->|only 1/z survives loop| R[Residue idea] Z -->|only 1/z survives loop| R A[Analytic f] -->|satisfies| CR[Cauchy-Riemann equations] CR -->|kills Green integrands| CT[Cauchy Integral Theorem loop = 0] I -->|split u+iv and Green| CT CT -->|deform around bad point a| CIF[Cauchy Integral Formula] S -->|supplies 2 pi i factor| CIF A -->|f over z minus a| CIF ``` ## 🔊 Hinglish (regional understanding) > [!intuition]- Hinglish mein samjho > Dekho, complex integration mein hum function ko ek **path (contour)** ke along integrate karte hain, > seedhi real line par nahi. Trick simple hai: pehle path ko parametrise karo, $z=z(t)$, aur phir > $dz=z'(t)\,dt$ likh do — bas yeh ek normal real integral ban jaata hai $t$ mein. Yaad rakho, $z'(t)$ > wala factor kabhi mat bhoolo, warna answer galat aata hai. > > Sabse important fact: agar tum unit circle par $z^n$ ko integrate karo, to sirf $n=-1$ wala term > zinda bachta hai aur $2\pi i$ deta hai; baaki sab zero. Isi se poori **residue theory** banti hai. > Agar function pure region ke andar **analytic** (smooth, Cauchy–Riemann satisfy karta) hai, to > closed loop ka integral seedha **zero** — yeh Cauchy ka theorem hai. Lekin agar andar koi **pole** > (spike) hai, to integral $=2\pi i\times(\text{residues ka sum})$. > > Yeh kyun important hai? Kyunki bahut saare mushkil **real** integrals, jaise $\int dx/(x^2+1)=\pi$, > ko hum contour band karke, sirf andar ke poles ke residues gin kar, seconds mein solve kar dete hain. > Yaani ek hard real problem ko bookkeeping bana diya. Common galti: yeh maan lena ki har closed loop > zero hota hai — nahi! Pehle andar pole check karo. Aur orientation: counterclockwise positive, > clockwise se sign ulta ho jaata hai. ![[audio/4.10.02-Complex-integration-—-contour-integrals.mp3]]

Go deeper — visual, from zero

Test yourself — Advanced Topics (Elite Level)

Connections