What is contour integration So I recently took a course that involves contour integration.  I understood how to perform the integrals out, but I never got a hold of what the physical meaning was.  I understand the introductory meaning of the integral $\int_a^b f(x)\space dx$ as the area under the curve f(x). 
However, once I got into complex analysis, we dealt with nasty integrals (such as Cauchy)
$$f(a)=\frac 1 {2\pi i} \oint_C \frac {f(z)} {z-a} dz$$
I do not quite understand what the meaning of this is.  The result of the integral depends on C, just as any integral depends on the bounds.  But what is this saying.  It is not the area under f(z), but what is it?  
 A: It's a line integral, which you will recognize from multivariable calculus.  Usually, a line integral is written
$$\int_C P(x,y) \, dx + Q(x,y) \, dy$$
for real-valued functions $P$ and $Q$ of two real variables.  You can turn a complex contour integral into something resembling this using naive algebra, writing $f = u + iv$ and $z = x + iy$ (thus $dz = dx + i \, dy$) as real and imaginary parts:
$$\int_C f(z) \, dz = \int_C \bigl(u(x + iy) + i v(x + iy)\bigr) (dx + i\, dy) \\
= \int_C \bigl(u(x + iy) \, dx - v(x + iy) \, dy\bigr) + i \int_C \bigl(u(x + iy) \, dy + v(x + iy) \, dx\bigr)$$
where everything is now a function of $x$ and $y$.  Not every line integral is a complex contour integral, though.
A: I think of contour integration as complex displacement.
To motivate this, recall the real fundamental theorem of calculus:
$$\int_a^b f(x)\;dx=F(b)-F(a)$$
The fundamental theorem gives us a way to reinterpret a value which, intuitively, expresses a signed area as a value which represents cumulative displacement for the antiderivative. The formula below probably better expresses this standpoint:
$$\int_a^b f'(x)\;dx=f(b)-f(a)$$
And this interpretation is emphasized greater if we interpret the left-hand side as a contour integral contained entirely on the real line.
This extends to the complex case. If $\gamma$ is a path (sufficiently nice) and $f$ happens to have an antiderivative $F$ on some open set containing the image of $\gamma$, then
$$\int_\gamma f(z)\;dz=F(\gamma(1))-F(\gamma(0))$$
In particular,
$$\int_\gamma 1\;dz=\gamma(1)-\gamma(0)$$
which represents the relative total change of position (which is quite apparent for a polygonal path).
This interpretation takes an interesting meaning when you consider a circular path in a simply-connected subset $E$ of $\mathbb{C}$ and a function $f$ thereon which happens to be analytic. Cauchy's Theorem says that
$$\oint_\gamma f(z)\;dz=0$$
which intuitively says that as you travel through 4-space on the graph of $F$ in a circular manner (down in the domain), you end up back where you started (in the codomain). Or, analytic functions on simply connected domains take "circles" to "circles" (i.e. no total displacement in the domain means no total displacement in the codomain).
Let's contrast this with one of the most important contour integrals:
$$\oint_\gamma\frac{dz}{z}=2\pi i$$
where
$$\gamma:[0,2\pi]\rightarrow\mathbb{C}\quad\text{ is defined by }\quad\gamma(t)=e^{i(\theta-\pi)}$$
(the rotation incorporated above is to match with the canonical branch cut of the Log). Now consider
$$\gamma_\epsilon=\gamma|_{[\epsilon, 2\pi-\epsilon]}$$
We recall that $1/z$ does have an antiderivative $\log$ on the set $\mathbb{C}-(-\infty, 0]$. And we can directly compute
$$\oint_{\gamma_{\epsilon}}\frac{dz}{z}=2\pi i-f(\varepsilon)$$
for some complex function $f$ which goes to zero as $\epsilon$ tends to zero. What is happening here is that $\log$ is wrapping $\gamma_\epsilon$ upwards on a helicoid like so (the blue curve):

And altogether
$$\oint_{\gamma}\frac{dz}{z}=2\pi i=\lim_{\epsilon\rightarrow 0}\oint_{\gamma_\epsilon}\frac{dz}{z}$$
intuitively means that $\log$ "breaks" the circular path into a path which doesn't end where it started. And the total displacement from where it started is $2\pi i$.
A: The Cauchy integral formula is a profound result. It tells us that the behaviour of an analytic function f(z) inside the region enclosed by a contour C depends only on how the function behaves on the contour itself. So if you know that the function is analytic on C and in the region enclosed by C, you don't need to think of any of the interior points. The corollary to this (Cauchy's differentiation formula) is more interesting:
$$f^{(n)}(a)=\frac {n!} {2\pi i} \oint_C \frac {f(z)} {(z-a)^{n+1}} dz$$
where, $f^{(n)}(a)$ is the n-th order derivative of f(z) at $z = a$. It shows that for analytic functions, differentiation and integration are equivalent operations on the complex plane in the sense that you can perform a differentiation to know the value of an integral or conversely you can perform an intergation to find the differential. It also tells you that an analytic function is infinitely differentiable. So, this formula tells you a lot of things which has several interesting applications.
