Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

How would I prove that$$\int_{0}^\infty \frac{\cos (3x)}{x^2+4}dx= \frac{\pi}{4e^6}$$ I changed it to $$\int_{0}^\infty \frac{\cos (3z)}{(z+2i)(z-2i)}dz$$, and so the two singularities are $2i$ and $-2i$, but how would I go on from there?


$\lim\limits_{z\rightarrow\ 2i}(z-2i)*f(z) = \frac{e^-6}{4i}$

Using Residue theorem: $$2\pi i*\frac{1}{4ie^6}=\frac{\pi}{2e^6}$$

share|improve this question
For ways without complex analysis: math.stackexchange.com/questions/9402/… –  Aryabhata Jan 20 '12 at 0:19
Thanks, interesting method.. –  Thomas Jan 20 '12 at 0:56

2 Answers 2

up vote 7 down vote accepted

You can consider $f(z)=\displaystyle\frac{e^{3zi}}{(z+2i)(z-2i)}$. For $R>0$, consider the counter $\gamma=\gamma_1+\gamma_2$ where $\gamma_1(t)=t$ where $-R\leq t\leq R$, and $\gamma_2(t)=Re^{it}$ where $0\leq t\leq \pi$. Then $$\int_{\gamma_1}f(z)dz=\int_{-R}^R\frac{e^{i3t}}{t^2+4}dt=\int_{-R}^R\frac{\cos(3t)}{t^2+4}dt+i\int_{-R}^R\frac{\sin(3t)}{t^2+4}dt$$ $$\rightarrow\int_{-\infty}^\infty\frac{\cos(3t)}{t^2+4}dt+i\int_{-\infty}^\infty\frac{\sin(3t)}{t^2+4}dt\mbox{ as }R\rightarrow\infty,$$ and $$\left|\int_{\gamma_2}f(z)dz\right|=\left|\int_{0}^{\pi}\frac{e^{i3Re^{it}}}{R^2e^{2it}+4}Rie^{it}dt\right|$$ $$\leq\int_{0}^{\pi}\frac{R|e^{i3Re^{it}}|}{R^2-4}dt= \int_{0}^{\pi}\frac{Re^{-3R\sin t}}{R^2-4}dt\leq\int_{0}^{\pi}\frac{R}{R^2-4}dt\rightarrow 0\mbox{ as }R\rightarrow\infty.$$

On the other hand, by Residue Therorem, we have $$\int_{\gamma} f(z)dx=2\pi iRes(f(z),2i)$$ since $2i$ is in the interior of $\gamma$ and $-2i$ is not. Note that $$Res(f(z),2i)=Res(\frac{e^{3zi}}{(z+2i)(z-2i)},2i)=\frac{e^{3zi}}{(z+2i)}\Big|_{z=2i}=\frac{e^{-6}}{4i}.$$ Combining all these, we get $$\int_{-\infty}^\infty\frac{\cos(3t)}{t^2+4}dt+i\int_{-\infty}^\infty\frac{\sin(3t)}{t^2+4}dt=2\pi i\cdot\frac{e^{-6}}{4i}=\frac{\pi}{2e^6}.$$ Equating real and imaginary parts, we get $$\int_{-\infty}^\infty\frac{\cos(3t)}{t^2+4}dt=\frac{\pi}{2e^6}\mbox{ and } \int_{-\infty}^\infty\frac{\sin(3t)}{t^2+4}dt=0.$$

Now note that $\frac{\cos(3t)}{t^2+4}$ is an even function, i.e. it is symmetric about the $y$-axis: $\frac{\cos(-3t)}{(-t)^2+4}=\frac{\cos(3t)}{t^2+4}$. We have $\int_{-\infty}^\infty\frac{\cos(3t)}{t^2+4}dt=2\int_{0}^\infty\frac{\cos(3t)}{t^2+4}dt$, which implies that $$\int_{0}^\infty\frac{\cos(3t)}{t^2+4}dt=\frac{1}{2}\int_{-\infty}^\infty\frac{\cos(3t)}{t^2+4}dt=\frac{\pi}{4e^6},$$ as required.

share|improve this answer
Thanks, I just posted my working also, from working from Américo Tavares's earlier answer, I seem to get $\frac{\pi}{2e^6}$ also :s –  Thomas Jan 20 '12 at 0:04
What I did is the same as the method that Americo suggested. I think what we got is right. You may want to go back and look at your book once more to see if the integral is from $\int_0^\infty$ instead of $\int_{-\infty}^\infty$. –  Paul Jan 20 '12 at 0:07
sorry..Typo, yes it is indeed $\int_0^\infty$. From what it seems, do we need to divide by 2 to obtain the answer? If so, why? Im slightly confused.. –  Thomas Jan 20 '12 at 0:10
Since $\frac{\cos(3t)}{t^2+4}$ is an even function, i.e. it is symmetric about the $y$-axis: $\frac{\cos(-3t)}{(-t)^2+4}=\frac{\cos(3t)}{t^2+4}$. We have $\int_{-\infty}^\infty\frac{\cos(3t)}{t^2+4}dt=2\int_{0}^\infty\frac{\cos(3t)}{t‌​^2+4}dt$. Therefore, what we got is right. –  Paul Jan 20 '12 at 0:14
Yeah, glad we solved it, now at least I know this trick when doing future integrals! –  Thomas Jan 20 '12 at 0:45

Similarly to this answer to the question Verify integrals with residue theorem, the following should work. Choose $$f(z)=\dfrac{e^{i3z}}{z^{2}+4},$$ use a contour $\gamma _{R}$ consisting of the boundary of the upper half of the disk $|z|=R$ and the segment $[-R,R]$ described counterclockwise and apply the Jordan's lemma.

share|improve this answer
Thanks, maybe I did something wrong, but I seem to get $\frac{\pi}{2e^6}$? Will be posting my working now. –  Thomas Jan 19 '12 at 23:56
@Thomas: I have not evaluated the integral myself. Paul's answer agrees with your evaluation. –  Américo Tavares Jan 20 '12 at 0:04
Thanks, it was my mistake, the integral is $\int_0^\infty$, but do you know why we have to divide by 2 to get the answer? –  Thomas Jan 20 '12 at 0:13
@Thomas: see Paul's comment. –  Américo Tavares Jan 20 '12 at 0:15

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.