# Homework Help: Evaluate integral by using residues: complex variables

1. Jan 10, 2010

### sara_87

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

evaluate:

$$\int_{-\infty}^{\infty}e^{-ax^2}cos(bx)dx$$

2. Relevant equations

3. The attempt at a solution

since $$\cos(bx)$$ is the real part of: e^(b*x*i),
we can rewrite the integral as:

$$Real[\int_{-\infty}^{\infty}e^{bxi-ax^2}dx]$$

but now im stuck because I dont know which contour to choose and i dont know where the poles(singularities) are.

thank you.

2. Jan 10, 2010

### Dick

Don't do it that way. Write cos(bx) as (exp(ibx)+exp(-ibx))/2.

3. Jan 10, 2010

### sara_87

ok, this will give as the integrand:

$$\frac{1}{2}(e^{ibx-ax^2}+e^{-ibx-ax^2})$$

I should have mentioned that this question requires us to use contour integration using residues.

4. Jan 11, 2010

### Count Iblis

doing what Dick is suggesting is in fact equivalent as using the contour integration method. After completing the square and changing variables, the integral is no longer along the real axis. If you consider the same integral as you get here but now along the real axis, then that integral has the same value by Cauchy's theorem. This last step is often omitted, people often don't even notice that after completing the square the integral is no longer along the real axis.

5. Jan 14, 2010

### sara_87

I dont understand. How do complete the square here? and what do you mean: 'the integral is no longer along the real axis' ?

6. Jan 14, 2010

### Count Iblis

Then, let's forget this for the moment (you'll only understand it if you already know how to do the problem) and simply consider the following contour integral:

$$I\left(R,p\left)=\oint_{C\left(R,p\right)}\exp\left(-a z^{2}\right)dz$$

where $$C\left(R,p\right)$$ is the contour from -R to R and then from there to R + i p, from there to -R + i p and then back to the starting point -R.

Questions for you:

a) What do the theorems about contour integration tell you about the value of $$I\left(R,p\right)$$?

b) In the limit $$R\to\infty$$ what happens to the parts of the contour integral from R to R + i p and from -R + i p to -R?

c) From a) and b) what can you conclude about the integral:

$$\int_{-\infty}^{\infty}\exp\left[-a\left(x+ip\right)^2\right]dx$$

d) Can you choose p in the above integral so that you get your desired integral up to some factor?

7. Jan 14, 2010

### sara_87

What do you mean when you say from R to R+ip? is this a straight line going up or is this a semi-circle?
a) which theorem? you mean Cauchy's theorem? the one that says that I=0 provided the function is analytic

8. Jan 14, 2010

### Count Iblis

Yes, a straight line. You can imagine p to be some fixed number while R is supposed to go to infinity in the end.

And yes, Cauchy's theorem implies that I(R,p)=0 because exp(-z^2) is analytic.

9. Jan 14, 2010

### sara_87

for part b)
as R tends to infinty, R+ip will still stay the same becasue it's just a verical line. I have a feeling that R+ip should tend to 0 but i dont know why.

10. Jan 14, 2010

### Count Iblis

Your feeling is correct, so you need to investigate this in more detail. The integral from R to R + i p can be written as:

$$\int_{0}^{p}\exp\left[-a\left(R + i y\right)^2\right]i dy$$

How does this integral behave in the limit of R to infinity?

11. Jan 14, 2010

### sara_87

oh yeah, of course. when R tends to infinity, the integrand becomes very small (e^(-infinity)) and therefore tends to 0.

for c) does this mean that:
from -R to R: integral=0 because of Cauchy's theorem. ?
from R to R+ip = from -R+ip to -R= 0 because as R tends to infinty, the intergand tends to zero.
but what about from R+ip to -R+ip ?

12. Jan 14, 2010

### Count Iblis

Yes, the integral from R to R + i p tends to zero and so does the integral from -R + i p to -R, but you have to be able to prove that more formally, let's skip that step for the moment.

Now Cauchy's theorem makes a statement about the whole contour integral, not just a few parts of it. The entire contour integral is zero, while two parts of it tend to zero. So, what can you conclude about the sum of the two other parts?

13. Jan 14, 2010

### sara_87

for the two other parts:
they are also analytic? is it 0? but i dont know why.

14. Jan 14, 2010

### Count Iblis

What does Cauchy's theorem say about the integral along a closed path of an analytic function such as exp[-az^2]?

In this case, the closed path consists of the four line segments.

15. Jan 14, 2010

### sara_87

It says that if f is analytic an in a closed contour then the integral=0

you mean even $$\frac{1}{2}(e^{ibx-ax^2}+e^{-ibx-ax^2})$$
can be applied to cauchys theorem?

16. Jan 14, 2010

### Count Iblis

Yes, provided you integrate it along a closed contour.

So, do you see now that the sum of the four integrals along the line segments is always zero, while the integral along two of the line segments from R to R + i p and from -R + i p to -R tend to zero, implying that the integral from -R to R plus the integral from
R + i p to -R + i p tends to zero in the limit R to infinity?

17. Jan 15, 2010

### sara_87

I see. just one last question. I understand that the vertical lines have integral 0 as R tends to infinity, but why does this 'imply' that the integral of the horizontal lines = 0?

18. Jan 15, 2010

### Count Iblis

The sum of the two integrals over the horizontal lines tends to zero because, by Cauchy's theorem, the sum of all four integrals is zero (the sum of all four is the contour integral).

19. Jan 15, 2010

### sara_87

oh right i see.
Im sorry, in the question i posted i said the integral goes from $$-\infty$$ to $$+\infty$$ but it should be from 0 to $$\infty$$. In this case, do we take the same contour as we did before?

20. Jan 15, 2010

### Count Iblis

Because the integrand is an even function, the integral from zero to infinity is half the integral from minus to plus infinity. So, you can take the same contour and compute the integral from minus to plus infinity and then divide that by 2.