Complex Analysis/Contour integrals

Integrals of complex-valued functions on real intervals
In calculus, we learned how to integrate (say, continuous) functions $$f: \mathbb R \to \mathbb R$$ on a finite interval $$[a, b]$$. What happens now if the function $$f$$ we wish to integrate has values in the complex numbers (that is, $$f: \mathbb R \to \mathbb C$$)? The answer is straightforward. We decompose $$f$$ by the formula $$f(x) = \operatorname{Re} f(x) + i \operatorname{Im} f(x)$$ and define the integral as follows:

The idea behind contour integrals
In this chapter, given a function $$f: O \to \mathbb C$$, we want to integrate $$f$$ along a differentiable curve; roughly speaking, we want to determine the measure of the area under the graph which arises when flattening out the curve as indicated in the following animation:
 * [[File:Line_integral_of_scalar_field.gif]]

We now want to figure out which formula could make sense for obtaining this measure (note that as in normal integration, we want the area where the function is negative to be subtracted from the value of the integral, instead of being added to it). The idea is to approximate the desired integral. Let a differentiable curve $$\gamma: [0, 1] \to O$$ be given. We choose a certain decomposition
 * $$[0, 1] = [0 = t_0, t_1] \cup [t_1, t_2] \cup \cdots \cup [t_{n-1}, t_n = 1]$$

where $$t_0 < t_1 < \cdots < t_n$$. Then we approximate the desired integral, which we denote by $$\int_\gamma f(z) dz$$, by a finite sum as follows:
 * $$\int_\gamma f(z) dz \approx \sum_{j=0}^{n-1} (\gamma(t_j) - \gamma(t_{j+1})) f(\gamma(t_j))$$.

This sum sums small squares which approximate the integral, just like Riemann sums. As the maximum distance between consecutive $$t_j$$ gets smaller, we obtain better and better approximations. On the other hand,
 * $$\sum_{j=0}^{n-1} (\gamma(t_j) - \gamma(t_{j+1})) f(\gamma(t_j)) = \sum_{j=0}^{n-1} f(\gamma(t_j)) \int_{t_j}^{t_{j+1}} \gamma'(t) dt$$,

where the latter integral converges to
 * $$\int_0^1 f(\gamma(t)) \gamma'(t) dt$$

as $$n \to \infty$$. This is why we define:

In fact, even before talking about cycles (chapter 10) and related things we need a more general, but not much more difficult, definition of contour integrals, namely one which also holds for piecewise $$\mathcal C^1$$ curves.

Rules for contour integrals
In this section, we state and prove some formulas which hold for contour integrals and which we shall extensively use throughout the subsequent chapters.