How to calculate the Fourier transform of a Gaussian function?

83.9k Views Asked by At

I would like to work out the Fourier transform of the Gaussian function

$$f(x) = \exp \left(-n^2(x-m)^2 \right)$$

It seems likely that I will need to use differentiation and the shift rule at some point, but I can't seem to get the calculation to work. Does anyone have any advice?

By the way, I am using

$$\mbox{FT}(f)(k)=\int_{-\infty}^\infty f(x)e^{-ikx}\,\mathrm d x$$

as my definition of a Fourier transform. Many thanks.

6

There are 6 best solutions below

4
On BEST ANSWER

First we consider the case $m=0$ and $n=1$, i.e. $f(x) := \exp(-x^2)$ and $$\hat{f}(k) := \int_{\mathbb{R}} f(x) \cdot e^{-\imath \, k x} \, dx = \int_{\mathbb{R}} \exp \left(-x^2 \right) \cdot e^{-\imath \, k \cdot x} \, dx.$$ Differentiating with respect to $k$ yields $$\frac{d}{dk} \hat{f}(k) = \int_{\mathbb{R}} e^{-x^2} \cdot (-\imath \, x) \cdot e^{-\imath \, k x} \, dx = \frac{1}{2} \imath \int_{\mathbb{R}} \left( \frac{d}{dx} e^{-x^2} \right) \cdot e^{-\imath \, k x} \, dx.$$

Applying the integration by parts formula, we obtain

$$\frac{d}{dk} \hat{f}(k) = - \frac{1}{2} k \cdot \int_{\mathbb{R}} e^{-x^2} \cdot e^{-\imath \, k \, x} \, dx =- \frac{1}{2} k \cdot \hat{f}(k).$$

The unique solution to this ordinary differential equation is given by

$$\hat{f}(k) =c \cdot \exp \left(- \frac{k^2}{4} \right).$$

Since $c=\hat{f}(0) = \int_{\mathbb{R}} f(x) \, dx$, it follows that $c = \sqrt{\pi}$. Moreover, applying the following well-known formulas

$$\begin{align} \widehat{f(x+m)}(k) &= e^{\imath \, k \cdot m} \hat{f}(k) \\ \widehat{f(\alpha \cdot x)}(k) &= \frac{1}{\alpha} \cdot \hat{f} \left( \frac{k}{\alpha} \right) \qquad \alpha>0, \end{align}$$

one can calculate the fourier transform of $f(x) = \exp \left(-n^2 \cdot (x-m)^2 \right)$ by some straight-forward computations.

1
On

While saz has already answered the question, I just wanted to add that this can be seen as one of the simplest examples of the Uncertainty Principle found in quantum mechanics, and generalizes to something called Hardy's uncertainty principle. In the QM context, momentum and position are each other's Fourier duals, and as you just discovered, a Gaussian function that's well-localized in one space cannot be well-localized in the other.

9
On

$$ \begin{align} \int_{-\infty}^\infty e^{-x^2}\,e^{-ix\xi}\,\mathrm{d}x &=e^{-\xi^2/4}\int_{-\infty}^\infty e^{-(x+i\xi/2)^2}\,\mathrm{d}x\\ &=e^{-\xi^2/4}\int_{-\infty+i\xi/2}^{\infty+i\xi/2}e^{-x^2}\mathrm{d}x\\ &=e^{-\xi^2/4}\int_{-\infty}^\infty e^{-x^2}\mathrm{d}x\\ &=\sqrt{\pi}\,e^{-\xi^2/4}\tag{1} \end{align} $$ The third equation is justified by contour integration since $e^{-x^2}=O\left(e^{-\mathrm{Re}(x)^2}\right)$ as $|\mathrm{Re}(x)|\to\infty$ for bounded $|\mathrm{Im}(x)|$.

Now, simple manipulation of $(1)$ yields $$ \begin{align} \int_{-\infty}^\infty e^{-n^2(x-m)^2}\,e^{-ix\xi}\,\mathrm{d}x &=\int_{-\infty}^\infty e^{-n^2x^2}\,e^{-i(x+m)\xi}\,\mathrm{d}x\\ &=e^{-im\xi}\int_{-\infty}^\infty e^{-n^2x^2}\,e^{-ix\xi}\,\mathrm{d}x\\ &=\frac{e^{-im\xi}}{n}\int_{-\infty}^\infty e^{-x^2}\,e^{-ix\xi/n}\,\mathrm{d}x\\ &=\frac{e^{-im\xi}}{n}\sqrt{\pi}\,e^{-\xi^2/(4n^2)}\tag{2} \end{align} $$

0
On

This answer is basically an adaptation on robjohn's proof that instead of using contour integration relies on the identity theorem of complex analysis. For each $\xi \in \mathbb{R}$, we have that: \begin{equation*} \int_{-\infty}^\infty e^{-x^2}\,e^{-\xi x}\,\mathrm{d}x =e^{\xi^2/4}\int_{-\infty}^\infty e^{-\big(x+\frac{\xi}{2}\big)^2}\,\mathrm{d}x =e^{\xi^2/4}\int_{-\infty}^\infty e^{-x^2}\mathrm{d}x =\sqrt{\pi}\,e^{\xi^2/4}\;. \end{equation*} Now, we see that the two functions $f:\mathbb{C}\to\mathbb{C}, z\mapsto \int_{-\infty}^\infty e^{-x^2}\,e^{-xz}\,\mathrm{d}x$ and $g:\mathbb{C}\to\mathbb{C}, z\mapsto \sqrt{\pi}\,e^{z^2/4}$ are well-defined, holomorphic, and coincides on $\mathbb{R}$. We can then apply the identity theorem, obtaining that $f=g$. In particular, for each $\xi \in \mathbb{R}$, we have: \begin{equation*} \int_{-\infty}^\infty e^{-x^2}\,e^{-i\xi x}\,\mathrm{d}x=f(i\xi)=g(i\xi)=\sqrt{\pi}\,e^{(i\xi)^2/4}=\sqrt{\pi}\,e^{-\xi^2/4}\;. \end{equation*}

Then you can work out the rest of the proof exactly as in saz or robjohn's answer.

0
On

The following is instead a variant (that you may find in Folland's book on Real Analysis) of saz's proof, that does not rely on ODE uniqueness theorem, but instead on the following corollary of the Fundamental theorem of calculus: if $\varphi: \mathbb{R} \to \mathbb{R}$ is a continuously differentiable function such that $\varphi' = 0$, then $\varphi$ is constant.

With the same notations as in saz's answer and with the same argument, for each $\xi \in \mathbb{R}$, we have $$ \frac{\operatorname{d}}{\operatorname{d}\xi}\hat{f}(\xi)=-\frac{1}{2}\xi\hat{f}(\xi)\;. $$ In particular, since $\hat{f} \in C^0$, we have that $\hat{f}$ is $C^1$ (actually $C^\infty)$. Now: $$ \frac{\operatorname{d}}{\operatorname{d}\xi}\Big(\hat{f}(\xi)e^{\xi^2/{4}} \Big) = -\frac{1}{2}\xi\hat{f}(\xi)e^{\xi^2/4}+\hat{f}(\xi)e^{\xi^2/4}\frac{2\xi}{4} =0.$$ Then, the function $\varphi:\mathbb{R} \to \mathbb{R}, \xi \mapsto \hat{f}(\xi)e^{\xi^2/4}$ is $C^1$ and such that $\varphi'=0$. It follows that $\varphi$ is constant. To calculate this constant, we can compute $\varphi(0) = \hat{f}(0) = \int_{\mathbb{R}}e^{-x^2}\operatorname{d}x = \sqrt{\pi}$. Then, for each $\xi \in \mathbb{R}$ we have $$\hat{f}(\xi) = \varphi(\xi)e^{-\xi^2/4}=\varphi(0)e^{-\xi^2/4}=\sqrt{\pi}e^{-\xi^2/4} \;.$$ Then you can work out the rest of the proof exactly as in saz or robjohn's answer.

0
On

Following @saz answer when the transform is: $$\hat{f}(\omega) := \int_{\mathbb{R}} f(x) \cdot e^{-\imath 2 \pi \, \omega x} \, dx$$

First we consider the case $m=0$ and $n=1$, i.e. $f(x) := \exp(-x^2)$ and $$\hat{f}(\omega) := \int_{\mathbb{R}} f(x) \cdot e^{-\imath 2 \pi \, \omega x} \, dx = \int_{\mathbb{R}} \exp \left(-x^2 \right) \cdot e^{-\imath 2 \pi \, \omega \cdot x} \, dx.$$ Differentiating with respect to $\omega$ yields $$\frac{d}{d\omega} \hat{f}(\omega) = \int_{\mathbb{R}} e^{-x^2} \cdot (-\imath 2 \pi \, x) \cdot e^{-\imath 2 \pi \, \omega x} \, dx = \imath \pi \int_{\mathbb{R}} \left( \frac{d}{dx} e^{-x^2} \right) \cdot e^{-\imath 2 \pi \, \omega x} \, dx.$$

Applying the integration by parts formula, we obtain

$$\frac{d}{d \omega} \hat{f}( \omega) = -2 \pi^{2} \omega \cdot \int_{\mathbb{R}} e^{-x^2} \cdot e^{-\imath 2 \pi \, \omega \, x} \, dx =-2 \pi^{2} \omega \cdot \hat{f}( \omega).$$

The unique solution to this ordinary differential equation is given by

$$\hat{f}(\omega) =c \cdot \exp \left( -\pi^{2} \omega^{2} \right).$$

Since $c=\hat{f}(0) = \int_{\mathbb{R}} f(x) \, dx$, it follows that $c = \sqrt{\pi}$. Moreover, applying the following well-known formulas

$$\begin{align} \widehat{f(x+m)}(k) &= e^{\imath \, k \cdot m} \hat{f}(k) \\ \widehat{f(\alpha \cdot x)}(k) &= \frac{1}{\alpha} \cdot \hat{f} \left( \frac{k}{\alpha} \right) \qquad \alpha>0, \end{align}$$


For $f(x)=e^{-mx^{2}}$ then

$$ \hat{f}(\omega) = \frac{\sqrt{\pi}}{\sqrt{m}} \cdot \exp \left( -\pi^{2} \left(\frac{\omega}{\sqrt{m}}\right)^{2} \right) $$