4

Evaluate

$$\displaystyle \int_{-\infty}^{\infty} \frac{\cos x}{x^2+1}~dx$$

Jonas Meyer
  • 55,715
Tom
  • 155
  • 1
    Tom: If you want to ask a new, different question, ask a new question, in a new thread. Please don't change the question that has already been answered to a different one. It makes the answers below appear to not make sense, it is confusing for readers, and it won't help you get an answer. I will edit back to the old version. (Also, please consider sharing your thoughts on the problem while you are posting your new question if you choose to do so.) – Jonas Meyer Mar 19 '13 at 02:54

5 Answers5

12

Use Residue Theorem.

$$\int_{-\infty}^{\infty}\frac{\cos x}{x^2+1}dx=\Re\int_C\frac{e^{iz}}{z^2+1}dz=\Re 2\pi iRes|_{z=i}=\Re 2\pi i\frac{e^{-1}}{2i}=\frac{\pi}{e}.$$

NECing
  • 4,251
6

Hints:

$$C_R:=[-R,R]\cup \Gamma_R:=\{z\in\Bbb C\;;\;z=Re^{it}\,,\;0\le t\le \pi\,\,,\,\,R>0\}$$

$$\left|\;\int\limits_{\Gamma_R}\frac{e^{iz}}{z^2+1}dz\;\right|\le \sup_{z\in\Gamma_R}\frac{e^{-R\sin t}}{R^2-1}R\pi\xrightarrow[R\to\infty]{}0\;,\;\;\text{since}\;\;R\sin t>0$$

$$\int\limits_{-R}^R\frac{e^{ix}}{x^2+1}dx\xrightarrow[R\to\infty]{}\int\limits_{-\infty}^\infty\frac{\cos t+i\sin t}{x^2+1}dx$$

$$\oint\limits_{C_R}f(z):=\frac{e^{iz}}{z^2+1}\,dz=2\pi iRes_{z=i}(f)=2\pi i\frac{e^{-1}}{2i}=\frac{\pi}{e}$$

Now put together the above, use Cauchy's Residue theorem and stuff.

DonAntonio
  • 214,715
5

Since the simplest route has already been taken, I'll take another. The function $x\mapsto e^{-|x|}$ is integrable on $\mathbb{R}$, and it's Fourier transform is easily computed as $$ \begin{align} \int_{-\infty}^\infty e^{-|x|}e^{-itx}\,dx& = \int_0^\infty e^{-x(1+it)}\,dx + \int_{-\infty}^0 e^{x(1-it)}\,dx \\ & = \frac{1}{1+it} + \frac{1}{1-it} \\ & = \frac{2}{1+t^2} \end{align} $$ This Fourier transform is integrable. So by the Fourier inversion formula, $$ \int_{-\infty}^\infty \frac{2}{1+t^2}e^{ixt}\,dt = 2\pi e^{-|x|}. $$ Take $x = 1$ and divide both sides by $2$.

3

Well that integral has poles at $z=i, -i$. You can integrate along a semicircle of radius $R>i$, use Cauchy's residue formula and let $R \rightarrow \infty$ and hope that the integral along the arc goes to $0$.

Dylan Yott
  • 7,189
  • 1
    -1 It needs more than that. The arc length goes as $\frac 1R$ so this would suggest the integral diverges logarithmically. The oscillatory nature of cosine rescues this approach, but needs some justification. – Ross Millikan Mar 18 '13 at 03:26
  • Hmm, I might be wrong but here's what I got. The integral along the upper semicircle is given by $\int_{0}^{\pi} \frac{iRe^{it}cos(Re^{it})}{R^{2}e^{2it}+1} dt$, which should grow like $\frac{1}{R}$. Am I missing something? – Dylan Yott Mar 18 '13 at 03:38
  • The length of the semicircle grows as $\pi R$ which you have lost. Multiplying by that it doesn't go to $0$ any more. I should have said $R$ instead of $\frac 1R$ in my last comment. – Ross Millikan Mar 18 '13 at 03:45
  • Okay, I really think I'm missing something now because I have that term in my integrand. If we call OP's integrand $f$, then the path in question is $\gamma (t)= Re^{it}$, so $\int _{\gamma} f dz = \int _{0}^{\pi} f(\gamma(t)) \gamma'(t) dt$. Then we obtain the integrand I have, where the $iRe^{it}=\gamma ' (t)$ seems to be the arc length term you're talking about. I'm not sure where I'm going wrong, hopefully this helps clarify things. – Dylan Yott Mar 18 '13 at 03:56
  • 2
    Either directly or using Jordan's Lemma, the integral on the semicircle goes to zero when $,R\to\infty,$ – DonAntonio Mar 18 '13 at 04:07
0

$$f(x)=\frac1{1+x^2}\quad \quad \hat f(\xi)=\pi e^{-|\xi|}\\ \mathcal F[f(x)e^{inx}]=\hat f(\xi-n)$$ Note that $f\in L^1(\Bbb R)$, so $\hat f$ is continuous: $$\int_{-\infty}^{+\infty}\frac{\cos x}{1+x^2}\,\mathrm dx = \frac12\int_{-\infty}^{+\infty}\lim_{\xi\to 0}\frac{e^{ix}}{1+x^2}e^{-ix\xi}\,\,\mathrm dx+\frac12\int_{-\infty}^{+\infty}\lim_{\xi\to 0}\frac{e^{-ix}}{1+x^2}e^{-ix\xi}\,\,\mathrm dx=\\ \frac{\pi}2\lim_{\xi\to0}(e^{-|\xi-1|}+e^{-|\xi+1|})=\frac{\pi}e$$