Please do not mark this question as a duplicate. I have to solve this with a different method that I don't believe has been discussed about this particular question (at least to my knowledge).

I am confronted with computing the integral below:

$$\int_{-\infty}^{\infty} e^{-x^2} \cos(2bx)dx, b \in \mathbb R, b \gt0$$

I understand that this is a question in which Complex Analysis has applications to Real Analysis. Specifically, Cauchy's Theorem will be used. That being said, the hint I was given (and the method I am attempting to use) is the following:

Integrate $e^{-z^2}$ over this curve:

The curve is a rectangle such that its length is $2R$ and its width is $b$. Also, the length on the lower side of the rectangle lies on the x-axis. Lastly, the direction of curvature is counter-clockwise.

My question is this: why integrate $e^{-z^2}$, and not $e^{-z^2}\cos(2bz)$? That is, the actual integral we're computing? I know that the former would be easier to integrate, but where did the $\cos(2bz)$ term go, and where will it come into play again?

Also, it's important to say that $\int_{-\infty}^{\infty} e^{-t^2}dt = \sqrt\pi$ will be useful here as well.

Lastly, I know that from the hint suggested, there will be four curves to evaluate: the two lengths and the two widths of the rectangle.


1 Answer 1


If we set: $$ f(b) = \int_{\mathbb{R}} e^{-x^2}\cos(2bx)\,dx \tag{1}$$ we have: $$ f'(b) = -\int_{\mathbb{R}} 2x\,e^{-x^2} \sin(2bx)\,dx \stackrel{\text{IBP}}{=}-2b\int_{\mathbb{R}}e^{-x^2}\cos(2bx)\,dx=-2b\,f(b).\tag{2}$$ So we have that $f$ is a solution of a separable differential equation and $$ f(b) = f(0)\, e^{-b^2}.\tag{3}$$ Since $f(0)=\sqrt{\pi}$,

$$ \int_{\mathbb{R}} e^{-x^2}\cos(2bx)\,dx = \color{red}{\sqrt{\pi}\, e^{-b^2}}\tag{4}$$


  • $\begingroup$ Where did you get the idea from? Nice solution! $\endgroup$ Mar 6, 2016 at 19:41
  • $\begingroup$ @Salihcyilmaz: it is a classic trick (Feynman's trick) for such kind of parametric integrals. $\endgroup$ Mar 6, 2016 at 21:05
  • $\begingroup$ I ended up solving this a different way, but I have to admit: this is a very simple, yet ultimately effective, approach! $\endgroup$
    – K.M.
    Mar 7, 2016 at 20:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .