# Residue theorem for integral of real sinusodial function

• Jun 8th 2007, 08:34 AM
Residue theorem for integral of real sinusodial function
I've seen a few examples but don't understand how the contour is chosen.

We use the substitution z=e^(i*theta)

If the integral is over -pi to pi, or over 0 to 2*pi, then the contour is the unit circle centred on the origin.

My questions:

1.) Why?

2.) What would the contour be if we were integrating over 0 to pi?

1.) Is it because the subtitution we use is the usual parameterization of the unit circle? (I read that somewhere but to be honest I don't really understand what it means). Or is it a full circle because we are integrating over a full circle (0 to 2*pi) in the original limits of integration? In which case why is it a unit circle, why couldn't its radius be larger or smaller? How do we chose the radius of the circle contour?

2.) Would it be a unit semi-circle centred on the origin? If so which 2 quartiles of the imaginary plane would it cover? Or would it still be a unit circle centred on the axis?

Also I think the Cauchy theorem tells us that any integral over a closed contour in the complex plane is equal to zero if the function is regular on or within that contour. If there are singularities (poles) within the contour then we apply the residue theorem and find the value of the integral equal to 2*pi*i * [sum of residues of the poles]. Right?

All very well, but some integrals have several poles, and depending on which contour you choose you may or may not enclose these singularities. You have to choose a contour that is regular at all points for that function. But in all the examples I looked at they chose the unit circle centred on the radius, and in one of them this meant the pole at z = 2 wasn't enclosed, but they could have chosen a circle of radius 3 or 4 or even infinity and the function would still be regular at all points on the contour. I'm confused.

Any answers/help/hints/tips would be much appreciated. Thanks.
• Jun 8th 2007, 08:39 AM
ThePerfectHacker
Quote:

I've seen a few examples but don't understand how the contour is chosen.

We use the substitution
z=e^(i*theta)

If the integral is over -pi to pi, or over 0 to 2*pi, then the contour is the unit circle centred on the origin.

$z = e^{i \theta} = \cos \theta + i \sin \theta$
Now if $0\leq \theta \leq 2\pi$
That means the curve follows the path:
$x = \cos \theta \mbox{ and } y=\sin \theta$
Which is indeed a unit circle.
• Jun 8th 2007, 08:59 AM
^^ Thanks again ThePerfetHacker.

So if we were integrating from 0 to pi now the curve would follow an arc from (1,0) to (0,1) to (-1,0). That isn't a closed contour. Don't we need a closed contour to apply the residue theorem? What would be the correct closed contour for such an integral over 0 to pi, and how would we choose it?
• Jun 8th 2007, 09:30 AM
ThePerfectHacker
Quote:

^^ Thanks again ThePerfetHacker.

So if we were integrating from 0 to pi now the curve would follow an arc from (1,0) to (0,1) to (-1,0). That isn't a closed contour. Don't we need a closed contour to apply the residue theorem? What would be the correct closed contour for such an integral over 0 to pi, and how would we chose it?

Thanks.

You can connect the line segment from (-1,0) to (0,1). If you do that you will form a peicewise smooth simple closed curve and residue theorem would apply.

Look at the picture below.
• Jun 8th 2007, 09:49 AM
Hmm thank you.

I suppose that we can close it like that because a) as you said the contour is peicewise smooth and simple, and b) because the range from (-1,0) to (1,0) isn't part of the z space...

On the other hand I've seen simple examples, which I'm pretty sure can be integrated with this method from 0 to pi, where the poles reside on the real axis within -1 = x and x = 1. This would mean that the contour shown above would cut through those singularities. Isn't that a problem? But then again is it true that you can simply divide the value of the residue by 2 if the contour cuts through a pole?
• Jun 8th 2007, 09:55 AM
ThePerfectHacker
Quote:

Isn't that a problem?

I started learning complex analysis not so long ago. But yes, I think that would be a problem if you cut through the poles you can change the value of the contour integral.

But I was just showing how you can close the contour. If you just wanted the upper circle.
• Jun 8th 2007, 11:00 AM
topsquark
Quote:

On the other hand I've seen simple examples, which I'm pretty sure can be integrated with this method from 0 to pi, where the poles reside on the real axis within -1 = x and x = 1. This would mean that the contour shown above would cut through those singularities. Isn't that a problem? But then again is it true that you can simply divide the value of the residue by 2 if the contour cuts through a pole?

What you do is circle around the singularity on the real line by either keeping the singularity within your contour or by excluding it. There are various and sundry ways of doing this.

Take, for example a function f(x) where there is a pole at x = 1 and we are integrating f(x) over the whole real line.
We may use a semicircle in the upper half plane where we integrate our contour thusly:
$\lim_{\epsilon \to 0} \int_{-\infty}^{1 - \epsilon}dz f(z) + \lim_{\epsilon \to 0} \int_{\pi}^0 d \theta (1 + \epsilon)i f( (1 + \epsilon e^{i \theta})) + \lim_{\epsilon \to 0} \int_{1 + \epsilon}^{\infty} dz f(z)$ + (semicircle at R = $\infty$ from $\theta = 0$ to $\theta = \pi$)
(This contour excludes our singularity. If we wanted to include it we'd integrate the second term from $\pi$ to $2 \pi$.)

The sum of the first and third terms is called the "principle value" of the integral and is usually written as:
$P \int_{-\infty}^{\infty} dz f(z) =
\lim_{\epsilon \to 0} \int_{-\infty}^{1 - \epsilon}dz f(z) + \lim_{\epsilon \to 0} \int_{1 + \epsilon}^{\infty} dz f(z)$

-Dan
• Jun 9th 2007, 09:12 AM
Hmm thanks again topsquark, but to be honest I don't understand :/

How do we evaluate $\int^{\pi}_{0}f(\cos x, \sin x)dx$ using the residue theorem in complex analysis?

If we were integrating from 0 to 2*pi we could use the unit circle centred on the origin as the contour, because z follows that contour, and then apply the residue theorem to calculate 2*pi*i*[sum of enclosed poles] = answer.

I'm sure it can be done easily for 0 to pi because I read from http://www.math.gatech.edu/~cain/win...supplement.pdf that "Our method is easily adaptable for integrals over a different range, for example
between 0 and pi or between ąpi." Unfortunately he doesn't give an example.

So how de we adapt the simple z = e^(i x) substitution method integrating from 0 to 2*pi, i.e over the unit circle, to integrate from 0 to pi?

I'm just looking for a simple example of $\int^{\pi}_{0}f(\cos x, \sin x)dx$ using the residue theorem in complex analysis, please.
• Jun 9th 2007, 11:13 AM
topsquark
Let me show you an example, perhaps that will suffice for you.

(For posterity's sake, this example is taken from Arfken, "Mathematical Methods for Physicists, 3rd ed." pg 408)

Evaluate
$I = \int_0^{\infty} \frac{sin(x)}{x} dx$

We may take this integral to be half of the imaginary part of
$I_z = P \int_{-\infty}^{\infty} \frac{e^{iz}}{z} dz$ <-- P means the "principle value" here.
There is a simple pole at z = 0 here.

I'll have to describe the contour since I'm lousy at drawing. I'm going to take the integral over the line from negative infinity to -r (where r is a small number) and pick it back up from r to positive infinity. Connecting these two rays is the contour C1, which is a semicircle of radius r in the upper half plane. To close the contour I'm going to use a semicircle of radius R (where R is very large) in the upper half plane. Naturally we'll be going around the closed contour in a clockwise fashion.

We choose this contour to avoid the pole at z = 0, to include the whole real axis (excepting a vanishingly small contribution near z = 0), and to yield a vanishingly small integrand for the C2 contour as $R \to \infty$.

So:
$\oint \frac{e^{iz}}{z} dz = \int_{-R}^{-r} \frac{e^{ix}}{x} dx + \int_{C_1} \frac{e^{iz}}{z} dz + \int_r^R \frac{e^{ix}}{x} dx + \int_{C_2} \frac{e^{iz}}{z} dz = 0$
(Since there are no poles enclosed by the contour the sum is 0 according to the residue theorem.)

By Jordan's Lemma
$\int_{C_2} \frac{e^{iz}}{z} dz = 0$

and
$\oint \frac{e^{iz}}{z} dz = \int_{C_1} \frac{e^{iz}}{z} dz + P \int_{-\infty}^{\infty} \frac{e^{iz}}{z} dz = 0$

Or
$P \int_{-\infty}^{\infty} \frac{e^{iz}}{z} dz = -\int_{C_1} \frac{e^{iz}}{z} dz$

Let's do the C1 integral.
$z = re^{i \theta}$
as we go from $\theta = \pi$ to $\theta = 0$.

$dz = rie^{i \theta} d \theta$

So
$\int_{C_1} \frac{e^{iz}}{z} dz = \lim_{r \to 0} \int_{\pi}^0 \frac{e^{ire^{i \theta}}}{re^{i \theta}} d \theta$

Since r is small in the limit, we may expand the exponential funtion as a Taylor series about r = 0:
$e^{re^{i \theta}} \approx 1 + ire^{i \theta}$

So
$\lim_{r \to 0} \int_{\pi}^0 \frac{e^{ire^{i \theta}}}{re^{i \theta}} d \theta \to \lim_{r \to 0} \int_{\pi}^0 \frac{1 + ire^{i \theta}}{re^{i \theta}} d \theta$

$= \lim_{r \to 0} \frac{1}{r} \int_{\pi}^0 e^{-i \theta} d \theta + i \lim_{r \to 0} \int_{\pi}^0 d \theta$

The first integral is a real number not dependent on r, so in the limit the first term is zero. Again, the second integral is a real number not dependent on r, so the limit goes away. Thus:
$\int_{C_1} \frac{e^{iz}}{z} dz = i \int_{\pi}^0 d \theta = -i \pi$

So
$P \int_{-\infty}^{\infty} \frac{e^{iz}}{z} dz = i \pi$

Now, our original integral is half of the imaginary part of this expression, so
$I = \int_0^{\infty} \frac{sin(x)}{x} dx = \frac{\pi}{2}$

-Dan
• Jun 9th 2007, 11:16 AM
topsquark
Quote:

Hmm thanks again topsquark, but to be honest I don't understand :/

How do we evaluate $\int^{\pi}_{0}f(\cos x, \sin x)dx$ using the residue theorem in complex analysis?

If we were integrating from 0 to 2*pi we could use the unit circle centred on the origin as the contour, because z follows that contour, and then apply the residue theorem to calculate 2*pi*i*[sum of enclosed poles] = answer.

I'm sure it can be done easily for 0 to pi because I read from http://www.math.gatech.edu/~cain/winter99/supplement.pdf that "Our method is easily adaptable for integrals over a different range, for example
between 0 and pi or between ąpi." Unfortunately he doesn't give an example.

So how de we adapt the simple z = e^(i x) substitution method integrating from 0 to 2*pi, i.e over the unit circle, to integrate from 0 to pi?

I'm just looking for a simple example of $\int^{\pi}_{0}f(\cos x, \sin x)dx$ using the residue theorem in complex analysis, please.

To answer your question specifically, I would include an integral over the real line, excluding poles, to close the contour, which is similar in principle to the integral I just posted.

-Dan
• Jun 9th 2007, 11:28 AM