# Homework Help: Complex integral

1. Sep 11, 2010

### IHateMayonnaise

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

I need to solve:

$$\int_{-\infty}^{\infty}xe^{(a-x)^2}dx$$

2. Relevant equations

3. The attempt at a solution

My first intuition would be to rewrite this as:

$$\oint_cze^{(a-z)^2}dz$$

and then use Cauchy's Residue theorem to calculate the integral. There is one singularity at $x_o=0$ when $x$->$\infty$. To calculate the residue,

$$Res(z_o)=(z-z_o)f(z) |_{z=z_o}$$

where in this case

$$f(z)=ze^{(a-x)^2}$$

So, we have

$$Res(0)=(z-0)ze^{(a-z)^2}|_{z=0}$$

$$=0$$

which is clearly not right (mathematica gives $a\sqrt{\pi}$. What am I doing wrong? Any hints? Thanks!

EDIT: if you take the derivative of the residue twice and then taking the limit you get $2e^{-a^2}$, and multiplying this by $2\pi i$ still doesn't give the answer!!

Last edited: Sep 11, 2010
2. Sep 11, 2010

### hunt_mat

No, the solution is much simplier. Make the substitution u=a-x, then note that:
$$\frac{d}{dx}\left(\frac{1}{2}e^{x^{2}}\right) =xe^{x^{2}}$$

3. Sep 11, 2010

### hunt_mat

Just thought, did you mean to write:
$$\int_{-\infty}^{\infty}xe^{-(a-x)^{2}}$$
as the integral you wrote down was unbounded

4. Sep 11, 2010

### IHateMayonnaise

Yes isn't that what I had? I am supposed to integrate it over the complex plane, this is what the problem asks and I won't get credit if I do it any other way.

5. Sep 11, 2010

### hunt_mat

Right, what are the poles? What contour are you going to integrate it over?

6. Sep 11, 2010

### IHateMayonnaise

There's only one pole right? At $x->\infty$?

Typically I would integrate over the upper hemisphere.

7. Sep 12, 2010

### hunt_mat

The problem for the residues is that the integrand is well defined for all values of x (and hence z), So I think that you're going to have to do a Laurent series expansion about z=infinty and work the residues from there.

8. Sep 12, 2010

### IHateMayonnaise

I am not seeing how to do this.. my math methods books don't seem to be of much help. Can you recommend some literature specific to this?

thanks for your help by the way!

9. Sep 12, 2010

### hunt_mat

Hmm, The problem here is the integral screams not to be done via complesx analysis.

10. Sep 12, 2010

### hunt_mat

Try looking at the Laurent expansion about infinity, I.e. expand in a series in z^{-1} and find the coefficent of z^{-1} by the usual method and that should be your residue.

11. Sep 12, 2010

Wrong.