Professional Documents
Culture Documents
221B Miscellaneous Notes On Contour Integrals
221B Miscellaneous Notes On Contour Integrals
Integrals
Contour integrals are very useful technique to compute integrals. For example, there are many functions whose indefinite integrals cant be written
in terms of elementary functions, but their definite integrals (often from
to ) are known. Many of them were derived using contour integrals. Sometimes we are indeed interested in contour integrals for complex parameters;
quantum mechanics brought complex numbers to physics in an intrinsic way.
This note introduces the contour integrals.
f (z)dz
(1)
f (z)dz =
(f (x + iy)dx + if (x + iy)dy).
(2)
~ d~x,
A
(3)
with
~ = (f (x + iy), if (x + iy)).
A
(4)
Now comes a crucial observation called Cauchys theorem. The contour can
be continuously deformed without changing the result, as long as it doesnt hit
a singularity and the end points are held fixed. This is a very non-trivial and
1
useful property. The proof is actually extremely simple. The vector poten~ A
~ = 0 (in two dimensions,
tial does not have a magnetic field, B =
there is only one component for the magnetic field normal to the plane),
and it is analogous to AharonovBohm effect! We can quickly check the curl
~ A
~ = x Ay y Ax = x if (x + iy) y f (x + iy) = if 0 if 0 = 0. (5)
B=
The difference between integrals along two different contours with the same
end points
Z
Z
f (z)dz
f (z)dz
(6)
C1
C2
f (z)dz.
(7)
C1 C2
Using Stokes theorem, this is given by the surface integral over the surface
D, whose boundary is the closed loop D = C1 C2 . But the integrand is
the magnetic field which vanishes identically. Now you see that continuous
deformation of the contour does not change the integral. Moreover, a contour
integral along a closed contour is always zero!
But you have to be careful about singularities in the function f (z). Suppose f (z) has a pole at z0 ,
f (z) =
R
+ g(z),
z z0
(8)
Z 2
r
r Z 2 i(n1)
r
i
dz
=
e
id
=
i
e
d = 0.
(z z0 )n
n ein
n1 0
0
(11)
Therefore, the only piece we need to pay attention to in closed-contour integrals is the single pole.
What was then wrong with the proof that contours can be continuously deformed, when the contour crosses a singularity? The function is still analytic, not
depending on z, but yet somehow we are not allowed to deform the contour across
a singularity. Why?
It turns out that 1/z secretly depends on z. It is a round-about story (thats
why this is in small fonts), but it can be seen as follows.
We first define derivatives with respect to z = x + iy and z = x iy as
= 0.
= (x iy )/2 and = (x + iy )/2 such that z = z = 1, and z = z
= 0.) This shows z and z are independent
(Also note that and commute, [, ]
under differentiation. Then a useful identity is that the Laplacian on the plane is
= 2 + 2 = 4.
x
log r2 = 2 (~r).
4
(12)
1
log(z z) = 2 (~r).
4
(13)
Because log(z z) = log z + log z, doing the derivative with respect to z gives
1 1
= 2 (~r).
2 z
(14)
Now we see that 1/z actually depends on z and its z-derivative gives a delta
function! This is precisely the contribution that gives the extra piece from the
pole when the contour crosses a singularity.
The magnetic flux of the pole 1/z is
~ A
~ = x Ay y Ax = x i 1 y 1 = 2i 1 = 2i 2 (~r).
B=
z
z
z
(15)
Now it is easy to see that the contour integral around the pole gives the magnetic
flux of 2i.
When a function of z has poles, it is said to be meromorphic, while an analytic
function without a pole is said to be holomorphic.
f (z)
dz = 2if (z0 )
z z0
(16)
for any function f (z) regular at z0 , if the contour C encircles the pole z0
counter-closewise.
If there is a multiple pole together with a regular function, the contribution comes from Taylor-expanding the integrand up to the order that gives
a single pole.
f (z)
dz
C (z z0 )n
I f (z ) + (z z )f 0 (z ) + + 1 (z z )n1 f (n1) (z ) +
0
0
0
0
0
(n1)!
=
dz
(z z0 )n
C
1
I
f (n1) (z0 )
(n1)!
=
dz
z z0
C
1
= 2i
f (n1) (z0 ).
(17)
(n 1)!
A Few Checks
Let us do a few checks to see the contour integrals gives the same result as
what you do in normal integrals.
Consider
Z
dx
.
(18)
x2 + a2
The standard way to do it is first do the indefinite integral
Z
dx
1
x
=
arctan
.
x 2 + a2
a
a
dx
=
x 2 + a2
lim
A
B
dx
x 2 + a2
(19)
A
B
1
arctan arctan
= A
lim
a
a
a
B
=
= .
a 2
2
a
(20)
(21)
I
1/(x + ia)
1
dx
=
dx = 2i
= .
2
2
x +a
x ia
ia + ia
a
C
(22)
=
dx
=
2i
=
.
(23)
x + ia
ia ia
a
C 0 x 2 + a2
C0
Here, we had to be careful about the fact that the contour C 0 encircles the
pole clockwise, that made the overall contribution of the residue come with
the coefficient 2i instead of 2i. Now we see that contour integrals indeed
work!
ia
ia
dx
.
(24)
cosh x
The standard method is to find the indefinite integral, which is known to be
Z
x
dx
= 2 arctan tanh ,
(25)
cosh x
2
which is easy to verify by differentiating it. Given this indefinite integral,
the definite integral is simply
Z
dx
x
= 2 arctan tanh
cosh x
2
=
2
2
= .
(26)
ex+i + e(x+i)
ex ex
=
= cosh x.
2
2
(27)
Therefore, the integral along C2 must be the same as that along C1 . Finally,
we can close the contour at and because cosh x grows exponentially
and hence 1/ cosh x is exponentially damped there. Then the closed contour
integral, first along the real axis C1 , up to the imaginary part i at , then
back parallel to the real axis C2 , and down to the real axis at , must give
twice of the original integral we wanted.
x
i
i/2
(28)
I
1
dx
dx0
=
= 2i = 2.
0
cosh x
i
0 ix
(29)
New Integrals
There are many integrals I cannot imagine doing without using contour integrals. Here is one simple example,
Z
eiqx
dq.
q 2 + a2
(30)
I
eax
eax
eiqx
eiqx
dq
=
dq
=
2i
=
.
q 2 + a2
2ia
a
ia (q + ia)(q ia)
(31)
On the other hand, when x < 0, the same added section is exponentially
enhanced instead of damped, and we cannot add it. Instead, we add a
section at the infinity on the lower half plane. Then the contour encircles
the pole at q = ia clockwise, and hence
Z
I
eiqx
eax
eax
eiqx
dq
=
dq
=
2i
=
.
q 2 + a2
2ia
a
ia (q + ia)(q ia)
(32)
(33)
Z
(q 2 a2 )eiqx
eiqx
dq
=
dq
q 2 + a2
q 2 + a2
eiqx dq
= 2(x).
(34)
The result of the contour integral can be verified to satisfy this equation,
Here we used
x |x| = sign x =
+1
1
x>0
,
x<0
(36)
ia
ia
Figure 3: The contour for the integrand eiqx /(q 2 +a2 ) when x > 0. The added
arc section on the upper half plane is exponentially damped and vanishes in
the limit of taking the arc to infinity. When x < 0, an arc on the lower half
plane is added instead.
If we have only one pole instead of one, e.g.,
G(x) =
eiqx
dq,
q ia
(37)
the result is more interesting: it vanishes when k < 0 because the contour
on the lower half plane does not encirle a pole. The result is therefore
G(x) = 2i(x)eax ,
(38)
(x) =
1
0
9
x>0
x < 0.
(39)
Z
(iq + a)eiqx
ieiqx dq = 2i(x).
dq =
q ia
(40)
Real-Life Examples
5.1
This is an example well-known to you. The scalar potential in electromagnetism satisfies the Poisson equation
= 4,
(41)
where is the charged density. (In MKSA system, the r.h.s. is /0 .) The
standard way to solve this equation is to first solve the Greens equation
G(~x ~x0 ) = (~x ~x0 ).
(42)
Once you have a solution Greens function, the solution to the original
equation is given simply by
(~x) = 4
(43)
d~q
G(~q)ei~q~x .
3
(2)
(44)
d~q i~q~x
e .
(2)3
10
(45)
(46)
d~q 1 i~q~x
e .
(2)3 ~q2
(47)
G(~x) =
(48)
The integral over the azimuth is trivial: just a factor of 2. Then the integral
over cos can be done and we find
G(~x) =
Z
0
dq 1 iqr
iqr
e
e
.
(2)2 iqr
(49)
Of course I can write the integrand in terms of sin qr, but let me keep it that
way. The integration over q is from 0 to , but the integrand is an even
function of q, and we can extend it to the entire real axis with a factor of a
half,
1 1 Z eiqr eiqr
dq
.
(50)
G(~x) = 2
8 i r
q
The integrand is regular at q = 0 because of the numerator. Therefore,
we can safely regard it as a limit of the integral
Z
dq
eiqr eiqr
.
q + i
(51)
There is now a pole at q = i. Let us assume > 0 for the moment. Note
that r > 0. Therefore, for the piece eiqr , we can extend the contour on the
upper half plane. This contour does not encirle the pole. On the other hand,
for the piece eiqr , we can extend the contour on the lower half plane, and
pick up the pole. Therefore,
Z
dq
eiqr eiqr
= 2i(er ).
q + i
11
(52)
Suppose now that < 0. In this case the opposite happens. We now get the
contribution from the pole for the piece eiqr , and we find
Z
eiqr eiqr
= 2i(er ).
q + i
dq
(53)
1 1
1 1
2i
=
.
8 2 i r
4 r
(54)
dq
sin qr
= ,
q
(55)
5.2
LippmannSchwinger Kernel
1
|~x0 i
E H0 + i
(57)
h
2
1
E+
h~x|
|~x0 i
2m
E H0 + i
!
p~2
1
= h~x| E
|~x0 i
2m E H0 + i
= h~x|~x0 i
= (~x ~x0 ).
!
12
(58)
d~ph~x|~pi
1
E
p~2 /2m
+ i
h~p|x~0 i
~0
ei~x~p/h
1
eix ~p/h
d~p
(2
h)3/2 E p~2 /2m + i (2
h)3/2
~0
d~p
1
ei(~xx )~p/h
.
(2
h)3 E p~2 /2m + i
(59)
There are many ways to do this integration. One way is to use polar coordinates for p~ defining the polar angle relative to the direction of ~r = ~x x~0
such that
eipr cos /h
1
3
2
(2
h) E p /2m + i
0
1
0
Z
ipr/
h
ipr/
h
2
e
e
1
2
=
p
dp
(2
h)3 0
ipr/
h
E p2 /2m + i
Z
eipr/h
2m
1
pdp
=
2
2
(2
h)
ir p 2mE i
Z
1 2mi
peipr/h
=
dp
. (60)
(2
h)2 r (p 2mE i)(p + 2mE + i)
G(~r) =
p2 dp
d cos
G(~r) =
(61)
This Greens function describes the wave propagating outwards from a point
source.
If we had approached the pole from the opposite side, we had gotten a
different result. The contour on the upper half plane would pick the pole at
13
p = 2mE =
hk instead, and we find
hkeikr
1 2mi
2i
(2
h)2 r
2
hk
ikr
2m e
= 2
.
h
4r
G(~r) =
(62)
This Greens function describes the wave propagating towards a point sink.
It is hard to imagine setting up an initial condition so that the wave would
converge exactly to a point. Because of this reason, this Greens function is
not used in the scattering problem.
(63)
f (x)
dx
x
(64)
+0
f (x)
dx.
x i
(65)
It turns out that the result depends on which way you avoid the singularity
(choice of the sign of i in the denominator). It is always assumed that > 0
and hence the one-sided limit +0.
Let us first study the limit
lim
+0
f (x)
dx.
x i
(66)
In this case, the pole is at x = +i and above the real axis. Therefore, the
limit 0 defines the integral along the contour shown in the figure Fig. 4.
14
Z b#
dx
f (x)
.
x
(67)
By taking infinitesimally small, the singularity cancels between the contributions from the left and right of the pole. This way, the integral is made
well-defined. This contribution is called the principal value integral , and
denoted by
"Z
Z b
Z b#
f (x)
f (x)
P
dx =
+
dx
.
(68)
x
a x
a
Second, there is an arc below the pole. By taking the radius of the circle
infinitesimally small, we can take f (x) to be constant f (0), and the integral along the semi-circle is a half of that from a closed contour integral.
Therefore, the additional piece is
if (0) =
i(x)f (x)dx.
(69)
0 a
Z b
Z b
f (x)
f (x)
dx = P
dx +
i(x)f (x)dx.
x i
a x
a
(70)
(71)
dx
cos x
.
x i
(73)
Writing cos x = (eix + eix )/2, the first term allows us to add a semi-circle on
the upper half plane, while the second term on the lower half plane. Because
the pole is at x = +i, only the semi-circle on the upper half plane encirles
the pole. Therefore,
Z
cos x
1
= 2i = i.
x i
2
dx
(74)
dx
cos x
= 0.
x
(75)
cos x
dx
P
= lim
0
x
cos x Z cos x
dx
dx
+
x
x
Z
(76)
= lim
0
cos x Z cos x
= 0.
dx
+
dx
x
x
(77)
Putting Eqs. (74,77,78) together, the formula Eq. (71) indeed holds.
16
!
Z bi
1
f (x) Z b+i f (x)
f (x)
= lim
dx
+
dx
,
dx
x
2 0 ai
x
x
a+i
(80)
Figure 5: The principal value integral is the same as the average of integrals
just above and just below the pole.
Crazy Examples
Now equipped with contour integrals and principal value integrals, we can
prove some crazy examples I found in math books. For example,
Z
sinh a
sin ax 1
=
if |a| < |b|.
(81)
dx
sin bx 1 + x2
2 sinh b
0
This looks really crazy; how come is the integral of an oscillating function
given in terms of hyperbolic functions?
First of all, the integrand has many poles along the real axis, x = n/b.
The prescription employed in math books is often the principal value prescription. Using the idea in Fig. 5, we first rewrite the integral as
Z +i
Z i
1
sin ax 1
sin ax 1
= lim
dx
+
dx
.
(82)
2 0
sin bx 1 + x2
sin bx 1 + x2
Then we change the variable from x to x in the second term,
Z +i
Z
1
sin ax 1
sin ax 1
=
lim
dx
+
dx
2 0
sin bx 1 + x2
sin bx 1 + x2
+i
Z +i
1
sin ax 1
=
lim
dx
.
(83)
0
2
sin bx 1 + x2
+i
17
The integration is above the real axis. Now the trick is to use the pole at
x = +i. Because of the assumption |a| < |b|, the behavior of sin ax/ sin bx
on the infinite semi-circle on the upper half plane is (for example when both
a, b are positive),
eiax eiax
sin ax
eiax
= ibx
= ei(ab)x 0.
sin bx
e eibx
eibx
(84)
Cases with other signs of a, b can also be seen easily and sin ax/ sin bx 0.
Therefore, we can add the inifinite semi-circle on the upper half plane to
the integration contour, which closes the contour. The only pole inside the
contour is at x = +i, and the by-now-standard steps lead to the result
sin ia 1
sinh a
1
lim 2i
=
.
2 0
sin ib 2i
2 sinh b
Exactly the same method proves another formula
=
dx
sin ax x
sinh a
=
2
cos bx 1 + x
2 cosh b
(85)
(86)
The next one can be done with an indefinite integral, but is much easier
with a contour integral:
Z
0
dx
2
=
1 2a cos x + a2
|1 a2 |
(a 6= 1).
(87)
We assume a > 0 for the discussions below, but the case a < 0 can be done
the same way.
Along the real axis, 1 2a cos x +a2 = (1 a)2 +2a(1 cos x) = (1 a)2 +
4a sin2 x2 > 0. However, along the imaginary axis x = i, 1 2a cos x + a2 =
2
1 2a cosh + a2 = 0 at = cosh1 1+a
. Therefore there is a pole along
2a
the imaginary axis.
Let us first shift the integration region to [, ] using the periodicity of
cos x. Then further consider a rectangle as shown in Fig. 6. We will send the
top side all the way to infinite in the end. The main point is that left and right
sides cancel due to the periodicity in cos x. Moreover, the integral along the
top side goes to zero in the limit because cos x = cosh . Therefore, the
integration along the real axis (the bottom side) is the same as the contour
integral along the rectangle. Then the contour integral encircles the pole at
2
x0 = i0 = i cosh1 1+a
, where
2a
1 2a cos x + a2 = 0 + (x x0 )2ai sinh 0 + O(x x0 )2 .
18
(88)
dx
1
.
= 2i
2
1 2a cos x + a
2a sin x0
(89)
dx
2
1
=
.
= 2i
2
1 2a cos x + a
2ai sinh 0
|1 a2 |
19
(90)