# Homework Help: Contour Integral and Residue Theorem

1. Oct 15, 2009

### Piamedes

1. The problem statement, all variables and given/known data
Show that:

For a = 0

$$\int_{0}^{\infty} \frac{cos{ax}+x sin{ax}}{1+x^2} dx = \frac{\pi}{2}$$

For a > 0

$$\int_{0}^{\infty} \frac{cos{ax}+x sin{ax}}{1+x^2} dx = \pi e^{-a}$$

For a < 0

$$\int_{0}^{\infty} \frac{cos{ax}+x sin{ax}}{1+x^2} dx = 0$$

2. Relevant equations

Residue Theorem:
$$\oint_{C} f(z)dz = 2 \pi i \sum_{C \ni z_{i}} R(z_{i})$$

3. The attempt at a solution

The first part is rather trivial. With a=0 it just reduces to the arctan infinity, which is pi over two.

For the second two parts I'm having trouble closing the contour for the second term, xsin(ax). At first I ignored the xsin(ax) term for a>0, and it immediately gave the answer:

$$\int_{0}^{\infty} \frac{cos{ax}+x sin{ax}}{1+x^2} dx = \int_{0}^{\infty} \frac{cos{ax}}{1+x^2}dx + \int_{0}^{\infty} \frac{x sin{ax}}{1+x^2} dx$$

Focusing just on the cosine term:

$$\int_{0}^{\infty} \frac{cos{ax}}{1+x^2}dx = Real[ \int_{0}^{\infty} \frac{e^{iaz}}{1+z^2} dz ]$$

Closing the contour for this:

$$\oint_{C} \frac{e^{iaz}}{1+z^2} dz = Real[ \int_{0}^{\infty} \frac{e^{iaz}}{1+z^2} dz ] + \int_{Arc} \frac{cos{az}}{1+z^2} dz$$

For the Arc Integral:

$$z = R e^{i \theta}$$

$$dz = R i e^{i \theta} d\theta$$

$$\int_{Arc} \frac{cos{az}}{1+z^2} dz = lim_{R \rightarrow \infty} \int_{0}^{2 \pi} \frac{e^{iaRe^{i \theta}}}{1+(Re^{i \theta})^2} (R i e^{i \theta} d\theta)$$

$$\int_{Arc} \frac{cos{az}}{1+z^2} dz \approx lim_{R \rightarrow \infty} \frac{1}{R} = 0$$

So the arc contributes nothing to the contour integral.

Which would mean:

$$\oint_{C} \frac{e^{iaz}}{1+z^2} dz = Real[ \int_{0}^{\infty} \frac{e^{iaz}}{1+z^2} dz ] = 2 \pi i R(i)$$

$$\frac{e^{iaz}}{1+z^2} = \frac{e^{iaz}}{2i} (\frac{1}{z-i} + \frac{1}{z+i} )$$

So

$$R(i) = \frac{e^{-a}}{2i}$$

$$\oint_{C} \frac{e^{iaz}}{1+z^2} dz = Real[ \int_{0}^{\infty} \frac{e^{iaz}}{1+z^2} dz ] = 2 \pi i \frac{e^{-a}}{2i} = \pi e^{-a}$$

Which leads me to believe that the xsin(ax) term contributes nothing to the actual contour integral when a > 0. However that doesn't really help me close the contour for the sin term. Whenever I try to use the same method on the second term, I don't get a real solution.

$$\int_{0}^{\infty} \frac{x sin{ax}}{1+x^2} dx = \oint_{C} \frac{ze^{iaz}}{1+z^2} dz + \int_{Arc} \frac{ze^{iaz}}{1+z^2}= Imaginary[ \int_{0}^{\infty} \frac{ze^{iaz}}{1+z^2} dz ] + \int_{Arc} \frac{ze^{iaz}}{1+z^2}$$

For the arc:

$$z = R e^{i \theta}$$

$$dz = R i e^{i \theta} d\theta$$

$$\int_{Arc} \frac{ze^{iaz}}{1+z^2} = lim_{R \rightarrow \infty} \int_{0}^{2 \pi} \frac{(Re^{i \theta}) e^{iaRe^{i \theta}}}{1+(Re^{i \theta})^2} (R i e^{i \theta} d\theta)$$

But in this case the limit does not reduce the integral to zero and I don't know what to do. Is there another method I can use to solve for the sine term, or did I make a mistake somewhere? What is the next step to solve this contour integral?

Oops, I messed up the bounds when transforming it from a real to a complex function. So in actuality the value of the cosine integral is pi e^-a all over two. So the sine term must have the same value. This makes sense, so that when a < 0 the two terms cancel out to give zero, but I'm still having trouble closing the contour for the sine term

Last edited: Oct 15, 2009
2. Oct 15, 2009

### Dick

Without reading that whole thing, what you should be doing is writing cos(ax)=(exp(iax)+exp(-iax))/2 and sin(ax)=(exp(iax)-exp(-iax))/(2i) and splitting the whole thing up into separate complex integrals. Now for each term the contour needs to be completed in the upper half plane or the lower half plane depending on the sign of a. And the poles are at +i and -i. Which says you will include one pole or the other for each term. Too late for more details. If you're still having problems I'll check in tomorrow.

Last edited: Oct 15, 2009
3. Oct 15, 2009

### Piamedes

my issue is that I can't figure out how to complete the contour for the sign term because the normal method I learned fails to work. Since it xsin(ax), the integral for the arc portion of the contour does not nicely reduce to zero. I was wondering how to go about showing that the arc actually does equal zero.

4. Oct 16, 2009

### Dick

I'm not sure what you are thinking about. z*sin(az)=z*((e^(iaz)-e^(-iaz)))/(2i)/(z^2+1). Because of the exponentials you have to split it into two contours, because one exponential is badly behaved in the upper half plane and the other in the lower. Maybe I'm just repeating myself.

5. Oct 16, 2009

### Piamedes

I'm sorry, I didn't make my question clear.

My issue doesn't come from splitting it into two contours, it comes from proving that the semicircular portion of the contour does not actually contribute anything to the integral.

For the upper half of the plane:

$$\int_{Arc} \frac{z sin(az)}{1+z^2} = \int_{Arc} \frac{z e^{iaz}}{(2i)(1+z^2)} dz$$

Now to change it into a form that I can work with:

$$z = R e^{i \theta}$$

$$dz = i R e^{i \theta} d\theta$$

So

$$\int_{Arc} \frac{z e^{iaz}}{(2i)(1+z^2)} dz = lim_{R \rightarrow \infty} \int_{0}^{\pi} \frac{1}{2i} \frac{(Re^{i \theta}) e^{iaRe^{i \theta}}}{1+(Re^{i \theta})^2} (R i e^{i \theta} d\theta)$$

However since there is an R-squared term in both the numerator and denominator the limit does not reduce the integral to zero. All I can say about it is:

$$lim_{R \rightarrow \infty} \int_{0}^{\pi} \frac{1}{2i} \frac{(Re^{i \theta}) e^{iaRe^{i \theta}}}{1+(Re^{i \theta})^2} (R i e^{i \theta} d\theta) \approx lim_{R \rightarrow \infty} \int_{0}^{\pi} \frac{1}{2} e^{iaRe^{i \theta}}d\theta$$

Since in the denominator the R-squared term should tend to overwhelm the one, it should cancel out the R-squared term in the numerator leaving this. However, I still don't understand how to show that this contributes and infinitesimal amount to the contour integral and as such can be ignored.

If this is entirely wrong, then I must have misunderstood something. If it is, how would you go about properly proving that the arc contributes nothing to the contour?

Edit

Starting off with the last line: Is it reasonable to say:

$$lim_{R \rightarrow \infty} \int_{0}^{\pi} \frac{1}{2} e^{iaRe^{i \theta}}d\theta = lim_{R \rightarrow \infty} \int_{0}^{\pi} \frac{1}{2} e^{iae^{i \theta}}^{R} d\theta$$

And just focusing on the integrand:

$$e^{iae^{i \theta}}^{R} = e^{ia(cos(\theta)+i sin(\theta))}^{R} = e^{iacos(\theta) - asin(\theta)}^{R} = e^{iRacos(\theta)} e^{-R asin(\theta)}$$

$$lim_{R \rightarrow \infty} e^{-R asin(\theta)} e^{iRacos(\theta)} = (0) e^{iRacos(\theta)} = 0$$

And since the integrand is zero, the actual arc integral is likewise zero. Does this work, or am I completely off?

Last edited: Oct 16, 2009
6. Oct 16, 2009

### Dick

Oh, I see. Thanks for repeating that enough times that I finally get it. You are getting there with your last comment. |exp(iaz)|<=exp(-aRsin(theta)) which approaches zero as R->infinity if a*sin(theta)>0. That's why the half plane to close in has to be associated to the sign of a. And it's the exponential that forces the arc contribution to zero, even though counting R's in the numerator and the denominator from the other factors doesn't do it.

7. Oct 16, 2009

### Piamedes

Thanks, that solves my problem