$\int _{-\infty}^{\infty} x^2\cos(2x)e^{-x^2}dx$

134 Views Asked by At

how do I calculate this integral or more generally how do I calculate:

$$\int _{-\infty}^{\infty} x^n\cos(2x)e^{-x^2}dx$$

I tried to use the following formulas that I'm familiar with:

i) $\displaystyle \int _{-\infty}^{\infty} x^ne^{-ax^2}dx=\begin{cases} \dfrac {(n-1)!!\sqrt \pi}{2^{n/2}a^{(n+1)/2}} &\mbox{if } n \text{ is even}\\0 &\mbox{if } n\text{ is odd}\end{cases}$

ii) $\displaystyle \int _{-\infty}^{\infty} \cos(ax)e^{-x^2}dx=\sqrt \pi e^{-\frac{a^2}{4}}$

and somehow integrate by parts but it didn't work. any suggestions?

2

There are 2 best solutions below

3
On BEST ANSWER

Take the negative second derivative of your result in ii):

$$-\frac{d^2}{da^2} \int_{-\infty}^{\infty} dx \, \cos{a x} \, e^{-x^2} = \int_{-\infty}^{\infty} dx \, x^2 \cos{a x} \, e^{-x^2} $$

Because the integrals are convergent, the switching of the order of integration and differentiation is justified.

0
On

Let $I = \int_\mathbb{R} x^n \cos (k x) \exp ( -ax^2) ~dx$, and

$J = \int_\mathbb{R} x^n \sin (k x) \exp ( -ax^2) ~dx$

\begin{align*} R := I + iJ &= \int_\mathbb{R} x^n \exp( ikx) \exp(-ax^2) ~dx \\ & = \int_\mathbb{R} x^n \exp\left( -a (x^2 - \frac{ik}{a}x -\frac{k^2}{4a^2} + \frac{k^2}{4a^2} \right) ~dx \\ &=e^{-k^2/4a} \int_\mathbb{R} x^n\exp\left(-a (x-\mu)^2 \right) ~dx \end{align*}

Where $\mu = \frac{ik}{2a}$, $i = \sqrt{-1}$.

Your formula (i) is valid in this regime, and you can solve out for the answer by taking the real part of $R$.