# Another Improper Integral Using Complex Analysis

Tags:
1. Apr 25, 2017

### transmini

1. The problem statement, all variables and given/known data
$$\int_{-\infty}^\infty \space \frac{cos(2x)}{x-3i}dx$$

2. Relevant equations

3. The attempt at a solution
$$\int_{-R}^R \space \frac{e^{2ix}}{x-3i}dx + \int_{C_R} \space \frac{e^{2iz}}{z-3i}dz = 2\pi i\sum\space res \space f(z)$$
Then using Jordan's Lemma, as $R\to\infty$ the 2nd integral on the left hand side goes to 0.
$$\int_{-\infty}^\infty \space \frac{e^{2ix}}{x-3i}dx + \int_{C_\infty} \space \frac{e^{2iz}}{z-3i}dz = 2\pi i\sum\space res \space f(z)$$
$$\int_{-R}^R \space \frac{e^{2ix}}{x-3i}dx + 0 = 2\pi i (lim_{z\to 3i} (z-3i)\frac{e^{2iz}}{z-3i}) = 2\pi i e^{-6}$$
$$\int_{-R}^R \space \frac{e^{2ix}}{x-3i}dx = \int_{-R}^R \space \frac{cos(2x)}{x-3i}dx + i\int_{-R}^R \space \frac{sin(2x)}{x-3i}dx = 2\pi i e^{-6}$$
matching real and imaginary parts gives
$$\int_{-R}^R \space \frac{cos(2x)}{x-3i}dx = 0$$
however the answer is written as $i\pi e^{-6}$. This one I'm totally lost on. This is the exact method used on every single problem in the section, but for some reason doesn't work here at all, unless I'm completely missing my mistake. Any suggestions? Thanks.

2. Apr 25, 2017

### FactChecker

I'm not sure what you did in that last step because both integrands are complex. How did you split up the real and imaginary parts?

3. Apr 25, 2017

### transmini

I used Euler's Equation: $e^{i\theta} = cos(\theta)+i sin(\theta)$ where in this case $\theta = 2x$. However, as you mention it, the integrands themselves are not entirely real, so just having $i$ multiplied to one doesn't necessarily make it complex. Which explains why the "complex" part is closer to the answer than the "real" part. I see why that doesn't work now, but I don't quite understand how else to go about this problem.

4. Apr 26, 2017

### FactChecker

I don't see it either. Is there some way to use the even and odd function properties of cos and sin to split the 2πie-6 in half? I'm too rusty at this and can't say any more.

5. Apr 26, 2017

### transmini

I honestly have no idea. We've only ever learned the original way I did it, and it doesn't look like the book covers anything else. I've looked at Chegg's solution, and they split $cos(2x) = \frac{e^{2ix}+e^{-2ix}}{2}$ and then created 2 separate integrals using that. The positive exponent was integrated positively over a semicircle in the upper half plane whereas the negative exponent was then subtracted and integrated over a semicircle in the lower half plane. Then the residue was only the residue of the upper half plane. Then they jumped to the final answer. I don't really follow any of the steps along the way though. I get the splitting of $cos(2x)$ but not why one integral is integrated along one curve and the other integral is integrated along a different curve.

6. Apr 26, 2017

### FactChecker

It sounds like both integrals use the real line and the upper and lower half circle integrals disappear. That leaves the integral along the real line to be split evenly between the two integrals.

7. Apr 26, 2017

### Ray Vickson

You seem to have claimed that
$$\int_{-\infty}^{\infty} \frac{\text{Re}(e^{2ix})}{x-3i} \, dx = \text{Re} \int_{-\infty}^{\infty} \frac{e^{2ix}}{x-3i} \, dx\; \Leftarrow \text{FALSE}$$
You need to express $\cos(2x)$ as $(1/2)e^{2ix} + (1/2) e^{-2ix}$ and then deal with the two terms separately.

8. Apr 26, 2017

### transmini

That's what Chegg was attempting to show, but there's an immense lack of explanation. It may have just been me though since it was late. Going back through and separating into the 2 separate integrals gave me the right answer, and I answered my other questions as well. The integrals are integrated over different curves in order to use Jordan's Lemma, and only the residue of the first integral was used because the second integral has no residues. Thanks again