# Homework Help: Easy complex analysis question

1. Dec 4, 2013

### Nikitin

[solved]Easy complex analysis question

Hi. In the complex plain, since y = 0 (in z=x+iy) at the x axis, shouldn't the following be true? :

$y=0$
$$\int_{-\infty}^{\infty} \frac{\cos(ax)}{x^2+2x+5} dx = \int_{-\infty}^{\infty} \frac{e^{iaz}}{z^2+2z+5} dz = \int_{-\infty}^{\infty} f(z) dz$$
Or does it only go like this:
$y=0$
$$\int_{-\infty}^{\infty} \frac{\cos(ax)}{x^2+2x+5} dx = Re(\int_{-\infty}^{\infty} \frac{e^{iaz}}{z^2+2z+5} dz)= Re( \int_{-\infty}^{\infty} f(z) dz)$$

I am asking because I need to find the value of the integral $\int_{-\infty}^{\infty}\frac{\cos(ax)}{x^2+2x+5} dx$ using the residue theorem, but I don't know whether I need to use the residue of $Re(\int_{-\infty}^{\infty} f(z) dz)$ or $\int_{-\infty}^{\infty} f(z) dz$. The problem is that if I use the latter, my logic seems coherent but I get a residue which has both a real and imaginary part, which hints that I should find the residue of the former instead.

Last edited: Dec 4, 2013
2. Dec 4, 2013

### ShayanJ

In fact,both are wrong!
This is how it should be:

$\int_{-\infty}^{\infty} \frac{\cos{ax}}{x^2+2x+5}dx=Re (\int_{-\infty}^{\infty} \frac{e^{iax}}{x^2+2x+5}dx)$

3. Dec 4, 2013

### Nikitin

1) why my equations are wrong
2) why yours is right

thanks :)

EDIT: oops I forgot to specify that y=0 for BOTH of those two integrals. They were both integrated along the x-axis.

4. Dec 4, 2013

### vela

Staff Emeritus
No, how could this be true since $\cos ax \ne e^{iax}$?

5. Dec 4, 2013

### Nikitin

but it's true if y =0, isn't it? sorry I forgot to specify this condition in the OP. All the integrals are evaluated on the real x-axis.

6. Dec 4, 2013

### vela

Staff Emeritus
No. Euler's formula tells you that $e^{iax} = \cos ax + i\sin ax$. For complex z, you have $e^{ia(x+iy)} = e^{-y}e^{iax}$, which is equal to $e^{iax}$ when y=0, so you still have a problem.

7. Dec 4, 2013

### Nikitin

oh crap I forgot about the $i$ infront of the $az$ (i've been cramming 70-80 hours a week now in preparation for the exams, duno if this is a good excuse). OK, I see the problem now,t hx