How to calculate $\int_{-\infty}^{\infty}\frac{\cos^{3}x}{x^2+1}\mathrm{d}x$ with the help of complex function?

113 Views Asked by At

I have met this improper integral: $$\int_{-\infty}^{\infty}\frac{\cos^{3}x}{x^2+1}\mathrm{d}x$$

I tried to use residues but it doesn't work. The singularity point of function $f(z)=\frac{\cos^{3}z}{1+z^2}$ is obviously $i$ and $-i$. It is the first time I met this sort of integral. Can I calculate this with Cauchy principal value? Would you please give me some tips? Or what can I do when I meet this kind of integral again?

2

There are 2 best solutions below

3
On BEST ANSWER

$$ \begin{align} \int_{-\infty}^\infty\frac{\cos^3(x)}{x^2+1}\,\mathrm{d}x &=\frac18\int_{-\infty}^\infty\frac{e^{3ix}+3e^{ix}+3e^{-ix}+e^{-3ix}}{x^2+1}\,\mathrm{d}x\tag{1a}\\ &=\frac18\int_{H_+}\frac{e^{3iz}+3e^{iz}}{z^2+1}\,\mathrm{d}z+\frac18\int_{H_-}\frac{3e^{-iz}+e^{-3iz}}{z^2+1}\,\mathrm{d}z\tag{1b}\\ &=\frac{2\pi i}8\left(\frac{e^{-3}+3e^{-1}}{2i}\right)-\frac{2\pi i}8\left(\frac{3e^{-1}+e^{-3}}{-2i}\right)\tag{1c}\\ &=\frac\pi4\,\frac{3e^2+1}{e^3}\tag{1d} \end{align} $$ Explanation:
$\text{(1a):}$ $\cos(x)=\frac{e^{ix}+e^{-ix}}2$
$\text{(1b):}$ $H_+=[-R,R]\cup Re^{+\pi i[0,1]}$ (counterclockwise around the upper half-plane)
$\phantom{\text{(1b):}}$ $H_-=[-R,R]\cup Re^{-\pi i[0,1]}$ (clockwise around the lower half-plane)
$\phantom{\text{(1b):}}$ the integrals along the circular arcs vanish as $R\to\infty$
$\text{(1c):}$ account for the residues and directions of the contours around $i$ and $-i$
$\text{(1d):}$ simplify

2
On

Hint: Use the identitdy $$\cos^3 x=\frac{3\cos x+\cos (3x)}{4},$$ and then procede as usual with residues theorem on the upper half semicircle. Write $$ \int_{-\infty}^{\infty}\frac{\cos (nz)}{z^2+1}dz={\text{Re}}\int_{-\infty}^{\infty}\frac{e^{niz}}{z^2+1}dz. $$ Evaluate $$ \int_{-\infty}^{\infty}\frac{e^{niz}}{z^2+1}dz={2\pi i}\cdot{\text{Res}}_{z=i}\frac{e^{niz}}{(z+i)(z-i)}=2\pi i\frac{e^{-n}}{2i}=\pi e^{-n}, $$ so your integral is $$\frac{3\pi e^{-1}+\pi e^{-3}}{4}=\frac{\pi e^{-3}(3e^2+1)}{4}.$$ To prove the first identity remember that $$\cos (x+y)=\cos x\cos y-\sin x\sin y,\, \sin 2x=2\sin x\cos x,\,\cos 2x=\cos^2 x-\sin^2x,$$ so $$\cos 3x=\cos (x+2x)=\cos 2x\cos x-\sin 2x\sin x=\cos^3x+\cos^3x-\cos x-2\sin^2x\cos x=2\cos^3x-\cos x-2\cos x+2\cos^3x=4\cos^3x-3\cos x\implies \cos^3x=\frac{\cos 3x+3\cos x}{4}.$$