# Definite Integrals Using Contour Integration

Tags:
1. Oct 5, 2014

### Haydo

Problem
Show:
$\int_0^\infty \frac{cos(mx)}{4x^4+5x^2+1} dx= \frac{\pi}{6}(2e^{(-m/2)}-e^{-m})$

for m>0

The attempt at a solution

The general idea seems to be to replace cos(mx) with $e^{imz}$ and then use contour integration and residue theory to solve the integral.

Let $f(z) = \frac{e^{imz}}{(4z^2+1)(x^2+1)}$

Now, there is obviously a pole at $x=\pm \frac{i}{2}$ and $x=\pm i$. We can ignore the negative poles.

So there should be some summation of integrals leading to the answer. Something like:
$\int_{-R}^{-\varepsilon} f(z) dz + \int_{c_1} f(z) dz + \int_\varepsilon^R f(z) dz + \int_{c_1} f(z) dz$

Note that this is the formula for a function of the form
$f(z) = \frac{sin(mz)}{z}$

We know that $\int_{c_1} f(z) dz = 0$, where $c_1$ is the overarching, general curve. The issue I am having is resolving the defects caused by the two poles. Regular residue theory (i.e. $\int f(z) dz = 2 \pi a_{-1}$) won't work. I don't know if I need separate integrals to address each of the two defects or if, like in the generic example I gave, I can just use one general integral to address both poles.

Any help is appreciated.

2. Oct 5, 2014

### RUber

When evaluating at the first pole ($z = i/2$), use $f(x) = \frac{e^{imz}}{x^2+1}$, and at the second pole, $f(x) = \frac{e^{imz}}{4x^2+1}$.

3. Oct 5, 2014

### Haydo

Ok, so the integral sum should be

$\int_\varepsilon^R \frac{e^{imz}+e^{-imz}}{(4z^2+1)(z^2+1)} dz + \int_{c_2} \frac{e^{imz}}{(4z^2+1)} dz + \int_{c_3} \frac{e^{imz}}{(z^2+1)} dz = 0$

where

$\int_{c_2} \frac{e^{imz}}{(4z^2+1)} dz = -ia_{-1}\pi$?

Or do I do two completely different integral series and sum them up?
(i.e. $\int_\varepsilon^R \frac{e^{imz}+e^{-imz}}{(4z^2+1)} dz + \int_{c_2} \frac{e^{imz}}{(4z^2+1)} dz$ and $\int_\varepsilon^R \frac{e^{imz}+e^{-imz}}{(z^2+1)} dz + \int_{c_3} \frac{e^{imz}}{(z^2+1)} dz)$

4. Oct 5, 2014

### RUber

Sorry, perhaps I didn't write that exactly correctly. The function itself doesn't change, but the pole changes. When evaluating at the first pole $(z=i/2 ),$ use $f(x)=\frac{\frac{e^{imz} }{z^2 +1}}{4z^2+1}$, and at the second pole, $f(x)=\frac{\frac{e^{imz} }{4z^2+1}}{z^2 +1}$ . This way, you are only evaluating a simple pole (the lower denominator) of an otherwise analytic function.
As you stated above, in the major curve, the integral will be zero, which will leave just the residues at the two simple poles.

5. Oct 5, 2014

### Haydo

Ok, that makes more sense. Can I just sum the residues of each pole such that

$\int_\varepsilon^R \frac{e^{imz}+e^{-imz}}{(4z^2+1)(z^2+1)} dz = i \pi (a_{-1_1}+a_{-1_2})$

Last edited: Oct 5, 2014
6. Oct 5, 2014

### RUber

That seems reasonable. I am going from memory, so I can't say for sure, but plugging those in should get you to the form you are looking for...with some minor algebraic manipulation.

7. Oct 5, 2014

### Haydo

Hmm. Lost a factor of 2 somewhere in the algebra, but apart from that, that did it. Thanks for your help.

8. Oct 5, 2014

### RUber

$cos(z) = \frac{e^{iz} +e^{-iz}}{2}$ is that where the 2 was lost?

9. Oct 5, 2014

### Haydo

Yes. $i \pi (a_{-1_1}+a_{-1_2}) = \frac{\pi}{6}[2e^{-m/2}-e^{-m}]$. So when I change $\int_\varepsilon^R \frac{e^{imz}+e^{-imz}}{(4z^2+1)(z^2+1)} dz$ into $2 \int_\varepsilon^R \frac{cos(mz)}{(4z^2+1)(z^2+1)} dz$ I'm left with a factor of 2 that isn't in the answer. My guess is that perhaps $\int_\varepsilon^R \frac{e^{imz}+e^{-imz}}{(4z^2+1)(z^2+1)} dz = 2 i \pi (a_{-1_1}+a_{-1_2})$ instead of $i \pi (a_{-1_1}+a_{-1_2})$

10. Oct 5, 2014

### RUber

That makes sense. $i \pi$ may just be for poles on the boundary where you are only taking a half-contour. For a full circle enclosing the pole, Cauchy's integral formula confirms that it should be $i 2 \pi$.

11. Oct 5, 2014

### vela

Staff Emeritus
Your solution is a little complicated. The integrand is an even function of x, so you can extend the interval of integration:
$$\int_0^\infty \frac{\cos mx}{(4x^2+1)(x^2+1)}\,dx = \frac 12 \int_{-\infty}^\infty \frac{\cos mx}{(4x^2+1)(x^2+1)}\,dx.$$ Then you can say
$$\int_{-\infty}^\infty \frac{\cos mx}{(4x^2+1)(x^2+1)}\,dx = \text{Re}\left[\int_{-\infty}^\infty \frac{e^{imx}}{(4x^2+1)(x^2+1)}\,dx\right]$$ and evaluate the last integral using contour integration methods. The contour would be just the real axis and the semi-circle that closes it off.

Finally, the contour integral is indeed equal to $2\pi i$ times the sum of the residues of the poles inside the contour.

12. Oct 5, 2014

### Haydo

That method feels unjustified, because the $e^{imx}$ integral has only real solutions, which I think would imply that $cos(mx) = e^imx$, which it does not. In practice, all the fancy integral summations I'm doing are in justification of that equality you list at the end. Right?

Or maybe I'm just overthinking it. Been working on physics and math all day now.

13. Oct 5, 2014

### vela

Staff Emeritus
The imaginary part of the integral ends up being 0 because sin x is an odd function, so the integral with cos mx turns out to be exactly equal to the integral of the complex exponential. It's not because you're assuming $e^{imx}$ is equal to $\cos mx$.

14. Oct 6, 2014

### Haydo

Oh. Yeah, that makes sense. Thanks for the clarification.