# Methods of contour integration

In complex analysis, the evaluation of integrals of real-valued functions along intervals on the real line, is not readily found with certain integrands and methods involving only real variables. Complex analysis methods described below give means of calculating these real-valued integrals by means of contour integrals in the complex plane.

These methods include

One method can be used, or a combination of these methods, or various limiting processes, for the purpose of finding these integrals or sums.

 Contents

## Direct methods

Direct methods involve the calculation of the integral by means of methods similar to those in calculating line integrals in several-variable calculus. This means that we use the following method:

• parametrizing the contour
The contour is parametrized by a differentiable complex-valued function of real variables, or the contour is broken up into pieces and parametrized separately
• substitution of the parametrization into the integrand
Substituting the parametrization into the integrand transforms the integral into an integral of one real variable.
• direct evaluation
The integral is evaluated in a method akin to a real-variable integral.

### Example

A fundamental result in complex analysis is that the integral around the contour C which is the unit circle (or any Jordan curve about 0) of z-1 is 2πi. Let us evaluate the integral:

[itex]\oint_C {1 \over z}\,dz[itex]

In evaluating this integral, we use the unit circle |z| = 1 as our contour, which we can parametrize by γ(t) = eit, with t ∈ [0, 2π]. Observe that γ'(t) = ieit. Now, substituting this for z, we have

[itex]\oint_C {1 \over z}\,dz = \int_0^{2\pi} {1 \over e^{it}} ie^{it}\,dt = i\int_0^{2\pi} e^{-it}e^{it}\,dt = i\int_0^{2\pi} 1 \,dt[itex]
[itex]= \left.t\right]_0^{2\pi} i=(2\pi-0)i = 2\pi i[itex]

which is the value of the integral.

## Applications of integral theorems

Applications of integral theorems are also often used to evaluate the contour integral along a contour, which means that the real-valued integral is calculated simultaneously along with calculating the contour integral.

Integral theorems such as the Cauchy integral formula or residue theorem are generally used in the following method:

• a specific contour is chosen:
The contour is chosen so that the contour follows the part of the complex plane that describes the real-valued integral, and also encloses singularities of the integrand so application of the Cauchy integral formula or residue theorem is possible
The integral is reduced to only an integration around a small circle about each pole.
Application of these integral formula gives us a value for the integral around the whole of the contour.
• division of the contour into a contour along the real part and imaginary part
The whole of the contour can be divided into the contour that follows the part of the complex plane that describes the real-valued integral as chosen before (call it R), and the integral that crosses the complex plane (call it I). The integral over the whole of the contour is the sum of the integral over each of these contours.
• demonstration that the integral that crosses the complex plane plays no part in the sum
If the integral I can be shown to be zero, or if the real-valued integral that is sought is improper, then if we demonstrate that the integral I as described above tends to 0, the integral along R will tend to the integral around the contour R+I.
• conclusion
If we can show the above step, then we can directly calculate R, the real-valued integral.

### Example (I)

Consider

[itex]\int_{-\infty}^{\infty} {1 \over (x^2+1)^2}\,dx[itex]
Missing image
ContourDiagram.png
the contour

To evaluate this integral, we look at the complex-valued function

[itex]f(z)={1 \over (z^2+1)^2}[itex]

which has singularities at i and -i. However, we will want to choose a contour that will enclose the real valued integral, so we choose a semicircle as the one to the left, which we will let expand as to contain the whole real axis (a will tend to infinity). Call this contour C.

Now, there are two ways of proceeding, using the Cauchy integral formula or by the method of residues.

#### Using the Cauchy integral formula

Observe that

[itex]f(z)={1 \over (z^2+1)^2}={1 \over (z+i)^2(z-i)^2}[itex]

Since the only singularity in the contour is the one at i, then we can write

[itex]f(z)={{1 \over (z+i)^2} \over (z-i)^2}[itex]

which puts the function in the form for direct application of the formula.

By the formula, then,

[itex]\oint_C f(z)\,dz = \oint_C {1 \over (z^2+1)^2}\,dz = \oint_C {{1 \over (z+i)^2} \over (z-i)^2} = 2\pi i D \left(\left.{1 \over (z+i)^2}\right)\right|_{z=i}[itex]
[itex]=2 \pi i \left.\left({-2 \over (z+i)^3}\right)\right|=2 \pi i (-i/4)={\pi\over 2}[itex]

If we call the arc of the semicircle A, we need to show that the integral over A tends to zero as a tends to infinity - using the estimation lemma

[itex]\left|\oint_A f(z)\,dz\right| \le ML[itex]

where M is an upper bound on |f(z)| and L the length of A. Now,

[itex]\int_A f(z)\,dz \le {a\pi \over (a^2+1)^2} \rightarrow 0\ \mathrm{as}\ a \rightarrow \infty[itex]

So

#### Using the method of residues

Consider the Laurent series of f(z) about i, the only singularity we need to consider. We then have

[itex]f(z) = {1 \over 4(x-i)^2} + {-i \over 4(x-i)} + {3 \over 16} + {i \over 8}(x-i) + {-5 \over 64}(x-i)^2 + \cdots[itex]

It is clear by inspection that the residue is -i/4, so, by the residue theorem, we have

[itex] \oint_C f(z)\,dz = \oint_C {1 \over (z^2+1)^2}\,dz = 2 \pi i \mathrm{Res}_{z=i} f = 2 \pi i (-i/4)={\pi\over 2}\quad\square[itex]

If we call the arc of the semicircle A, we need to show that the integral over A tends to zero as a tends to infinity - using the estimation lemma

[itex]|\oint_A f(z)\,dz| \le ML[itex]

where M is an upper bound on |f(z)| and L the length of A. Now,

[itex]\oint_A f(z)\,dz \le {a\pi \over (a^2+1)^2} \rightarrow 0 \quad \mathrm{as}\ a \rightarrow \infty[itex]

So

and we get the same result as before.

#### Contour note

As an aside, a question can arise whether we do not take the semicircle to include the other singularity, enclosing -i. To have the integral along the real axis moving in the correct direction, the contour must travel clockwise, ie., in a negative direction, reversing the sign of the integral overall.

This does not affect the use of the method of residues by series.

### Example (II) – Cauchy distribution

The integral

[itex]\int_{-\infty}^\infty {e^{itx} \over x^2+1}\,dx[itex]
Missing image
ContourDiagram.png
the contour

(which arises in probability theory as (a scalar multiple of) the characteristic function of the Cauchy distribution) resists the techniques of elementary calculus. We will evaluate it by expressing it as a limit of contour integrals along the contour C that goes along the real line from -a to a and then counterclockwise along a semicircle centered at 0 from a to -a. Take a to be greater than 1, so that the imaginary unit i is enclosed within the curve. The contour integral is

[itex]\int_C {e^{itz} \over z^2+1}\,dz.[itex]

Since eitz is an entire function (having no singularities at any point in the complex plane), this function has singularities only where the denominator z2 + 1 is zero. Since z2 + 1 = (z + i)(z - i), that happens only where z = i or z = -i. Only one of those points is in the region bounded by this contour. The residue of f(z) at z = i is

[itex]\lim_{z\to i}(z-i)f(z)=\lim_{z\to i}(z-i){e^{itz} \over z^2+1}=\lim_{z\to i}(z-i){e^{itz} \over (z-i)(z+i)}[itex]
[itex]=\lim_{z\to i}{e^{itz} \over z+i}={e^{iti} \over i+i}={e^{-t}\over 2i}.[itex]

According to the residue theorem, then, we have

[itex]\int_C f(z)\,dz=2\pi i\cdot\operatorname{Res}_{z=i}f(z)=2\pi i{e^{-t} \over 2i}=\pi e^{-t}.[itex]

The contour C may be split into a "straight" part and a curved arc, so that

[itex]\int_{\mbox{straight}}+\int_{\mbox{arc}}=\pi e^{-t},[itex]

and thus

[itex]\int_{-a}^a =\pi e^{-t}-\int_{\mbox{arc}}.[itex]

It can be shown that if t > 0 then

[itex]\int_{\mbox{arc}}{e^{itz} \over z^2+1}\,dz

\rightarrow 0\ \mbox{as}\ a\rightarrow\infty.[itex]

Therefore if t > 0 then

[itex]\int_{-\infty}^\infty{e^{itz} \over z^2+1}\,dz=\pi e^{-t}.[itex]

A similar argument with an arc that winds around -i rather than i shows that if t < 0 then

[itex]\int_{-\infty}^\infty{e^{itz} \over z^2+1}\,dz=\pi e^t,[itex]

and finally we have

[itex]\int_{-\infty}^\infty{e^{itz} \over z^2+1}\,dz=\pi e^{-\left|t\right|}.[itex]

(If t = 0 then the integral yields immediately to real-valued calculus methods and its value is π.)

### Example (III) – trigonometric integrals

Certain substitutions can be made to integrals involving trigonometric functions, so the integral is transformed into a rational function of a complex variable and then the above methods can be used in order to evaluate the integral.

As an example, consider

[itex] \int_{-\pi}^{\pi} {1 \over 1 + 3 (\cos{x})^2} \,dx[itex]

We seek to make a substitution of z = eit.

Now, recall

[itex] \cos{x} = {1 \over 2} e^{it}+e^{-it} = {1 \over 2} \left(z+{1 \over z}\right)[itex]

and

[itex] {dz \over dt} = iz,\ dt = {dz \over iz} [itex]

Taking C to be the unit circle, we substitute to get:

[itex] \oint_C {1 \over 1 + 3 ({1 \over 2} (z+{1 \over z}))^2} \,{dz\over iz}[itex]
[itex] = \oint_C {1 \over 1 + {3 \over 4} (z+{1 \over z})^2}{1 \over iz} \,dz

= \oint_C {-i \over z+{3\over 4}z(z+{1\over z})^2}\,dz = -i \oint_C { 1 \over z+{3\over 4}z(z^2+2+{1\over z^2})} \,dz[itex]

[itex] = -i \oint_C {1\over z+{3\over 4}(z^3+2z+{1 \over z})} \,dz = -i \oint_C {1 \over {3\over 4 }z^3+{5 \over 2}z+{3 \over 4z}} \,dz[itex]
[itex] = -i \oint_C {4 \over 3z^3+10z+{3\over z}}\,dz = -4i \oint_C {1 \over 3z^3+10z+{3\over z}}\,dz [itex]
[itex] = -4i \oint_C { z \over 3z^4+10z^2+3 } \,dz [itex]

We use the Cauchy integral formula. Factorize the denominator:

[itex] = -4i \oint_C { z \over 3z^4+10z^2+3 } \,dz = -4i \oint_C {z \over (z^2+3)(z^2+1/3)}\,dz [itex]
[itex] = -4i \oint_C {z \over 3(z+\sqrt{3}i)(z-\sqrt{3}i)(z+\sqrt{1\over 3}i)(z-\sqrt{1\over 3}i)}\,dz [itex]
[itex] = -{4\over 3}i \oint_C {z \over (z+\sqrt{3}i)(z-\sqrt{3}i)(z+\sqrt{1\over 3}i)(z-\sqrt{1\over 3}i)}\,dz [itex]

The singularities then to be considered are at 31/2i, -31/2i. We can now reduce the integral:

[itex] = -{4\over 3}i \oint_{C_1} {\,{z \over (z+\sqrt{3}i)(z-\sqrt{3}i)(z+\sqrt{1\over 3}i)}\, \over (z-\sqrt{1\over 3}i)}\,dz +
          -{4\over 3}i \oint_{C_2} {\,{z \over (z+\sqrt{3}i)(z-\sqrt{3}i)(z-\sqrt{1\over 3}i)}\, \over (z+\sqrt{1\over 3}i)} [itex]


where C1 is a small circle about 31/2i, and C2 is a small circle about -31/2i. We can now apply the formula:

[itex] = -{4\over 3}i \left(
  2\pi i \left.\left({z \over (z+\sqrt{3}i)(z-\sqrt{3}i)(z+\sqrt{1\over 3}i)}\right)\right|_{z=\sqrt{1 \over 3}i} \right.[itex]

[itex]
\left.  +  2\pi i \left.\left({z \over (z+\sqrt{3}i)(z-\sqrt{3}i)(z-\sqrt{1\over 3}i)}\right)\right|_{z=-\sqrt{1 \over 3}i}


\right)[itex]

[itex] = -{4\over 3}i \left( 2\pi i \left( { \sqrt{1\over 3}i \over (\sqrt{1\over 3}i+\sqrt{3}i)(\sqrt{1\over 3}i-\sqrt{3}i)(\sqrt{1\over 3}i+\sqrt{1\over 3}i)} \right) \right.[itex]
[itex]\left. +2\pi i \left( { -\sqrt{1\over 3}i \over (-\sqrt{1\over 3}i+\sqrt{3}i)(-\sqrt{1\over 3}i-\sqrt{3}i)(-\sqrt{1\over 3}i-\sqrt{1\over 3}i } \right)\right)[itex]
[itex] = -{4\over 3}i \left( 2\pi i

\left( {\sqrt{1\over 3}i \over ({4 \over \sqrt{3}}i)(-{2 \over \sqrt{3}}i)({2 \over \sqrt{3}}i)} \right) + 2 \pi i \left( {-\sqrt{1\over 3}i \over ({2 \over \sqrt{3}}i)(-{4 \over \sqrt{3}}i)(-{2 \over \sqrt{3}}i)} \right) \right)[itex]

[itex] = -{4\over 3}i \left(

2\pi i \left( {\sqrt{1\over 3}i \over i({4 \over \sqrt{3}})({2 \over \sqrt{3}})({2 \over \sqrt{3}})} \right) + 2\pi i \left( {-\sqrt{1\over 3}i \over -i({2 \over \sqrt{3}})({4 \over \sqrt{3}})({2 \over \sqrt{3}})} \right) \right) [itex]

[itex] = -{4\over 3}i \left(

2\pi i \left( {\sqrt{1\over 3} \over ({4 \over \sqrt{3}})({2 \over \sqrt{3}})({2 \over \sqrt{3}})} \right) + 2\pi i \left( {\sqrt{1\over 3} \over ({2 \over \sqrt{3}})({4 \over \sqrt{3}})({2 \over \sqrt{3}})} \right) \right) [itex]

[itex] = -{4\over 3}i \left(

2\pi i \left( { \,\sqrt{1\over 3} \,\over {16 \over 3\sqrt{3}} } \right) + 2\pi i \left( {\, \sqrt{1\over 3} \,\over {16 \over 3\sqrt{3}} } \right) \right) [itex]

[itex] = -{4\over 3}i \left(2 \pi i \left({3\over 16}\right) + 2 \pi i \left({3\over 16}\right)\right) = -{4\over 3}i \left(\pi i \left({3 \over 8}+{3 \over 8}\right)\right) = {4\over 3}\left({3 \over 4}\right)\pi = \pi[itex]

### Example (IV) – branch cuts

Consider

[itex]\int_0^\infty {\sqrt{x} \over x^2+6x+8}\,dx[itex]

We can begin by formulating the complex integral

[itex]\int_C {\sqrt{z} \over z^2+6z+8}\,dz=I[itex]
Missing image
Keyhole_contour.png

We can use the Cauchy integral formula or residue theorem again to obtain the relevant residues. However, the important thing to note is that z1/2=e1/2 Log(z), so z1/2 has a branch cut. This affects our choice of the contour C. Normally the logarithm branch cut is defined as the negative real axis, however, this makes the calculation of the integral slightly more complex, so we define it to be the positive real axis.

Then, we use the so-called keyhole contour, which consists of a small circle about the origin of radius ε say, extending to a line segment parallel and close to the positive real axis but not touching it, to an almost full circle, returning to a line segment parallel, close, and below the positive real axis in the negative sense, returning to the small circle in the middle.

Let γ be the small circle of radius ε, Γ the larger, with radius r, then

[itex]\int_C {\sqrt{z} \over z^2+6z+8}\,dz=\int_\epsilon^R {\sqrt{z} \over z^2+6z+8}\,dz+\int_\Gamma {\sqrt{z} \over z^2+6z+8}\,dz+\int_R^\epsilon {\sqrt{z} \over z^2+6z+8}\,dz+\int_\gamma {\sqrt{z} \over z^2+6z+8}\,dz[itex]

Since z1/2=e1/2 Log(z), along the contour below the branch cut, we have gained 2π in argument along Γ, so

[itex]\int_R^\epsilon {\sqrt{z} \over z^2+6z+8}\,dz=\int_R^\epsilon {e^{{1\over 2} \mathrm{Log}(z)} \over z^2+6z+8}\,dz=\int_R^\epsilon {e^{{1\over 2}(\log{|z|}+i \arg{z})} \over z^2+6z+8}\,dz[itex]
[itex]=\int_R^\epsilon { e^{{1\over 2}\log{|z|}}e^{1/2(2\pi i)} \over z^2+6z+8}\,dz=\int_R^\epsilon { e^{{1\over 2}\log{|z|}}e^{\pi i} \over z^2+6z+8}\,dz[itex]
[itex]=\int_R^\epsilon {-\sqrt{x} \over x^2+6x+8}\,dx=-\int_\epsilon^R {-\sqrt{x} \over x^2+6x+8}\,dx[itex]

simplifying,

[itex]=\int_\epsilon^R {\sqrt{x} \over z^2+6z+8}\,dx[itex]

and then

[itex]\int_C {\sqrt{z} \over z^2+6z+8}\,dz=\int_\epsilon^R {\sqrt{z} \over z^2+6z+8}\,dz+\int_\Gamma {\sqrt{z} \over z^2+6z+8}\,dz+\int_\epsilon^R {\sqrt{z} \over z^2+6z+8}\,dz+\int_\gamma {\sqrt{z} \over z^2+6z+8}\,dz[itex]

It can be shown that the integrals over Γ and γ both tend to zero as ε tends to zero and R tends to infinity, by an estimation argument above. Thus, then,

[itex]\int_C {\sqrt{z} \over z^2+6z+8}\,dz=2\int_0^\infty {\sqrt{z} \over z^2+6z+8}\,dz[itex]

By using the residue theorem or the Cauchy integral formula one obtains

[itex]\pi i ({i\over \sqrt{2}}-i)=\int_0^\infty {\sqrt{z} \over z^2+6z+8}\,dz[itex]
[itex]=\pi\left(1-{1\over\sqrt{2}}\right)[itex]

• Art and Cultures
• Countries of the World (http://www.academickids.com/encyclopedia/index.php/Countries)
• Space and Astronomy