# Calculating integral (actually calculating Fourier transform)

I want to calculate the Fourier transform of the function $$f\left(t\right)=e^{-t^{2}}$$

The answer should be $$\mathscr{F}\left(f\right)[\omega]=\frac{1}{2\sqrt{\pi}}e^{-\frac{\omega^{2}}{4}}$$

I solved it in 2 different ways (and got the same result), but I doubt my second way because I cannot explain in 100%.

So the first way is to note that both $$\intop_{-\infty}^{\infty}|f\left(t\right)|dt<\infty,\thinspace\thinspace\thinspace\intop_{-\infty}^{\infty}t|f\left(t\right)|dt<\infty$$

And thus by a well known theorem $$\frac{d}{d\omega}\mathscr{F}\left(f\right)[\omega]=\mathscr{F}\left(g\right)[\omega]$$

Where $$g\left(t\right)=-itf\left(t\right)$$.

Using integration by parts, we find that $$\frac{d}{d\omega}\mathscr{F}\left(f\right)[\omega]=-\frac{\omega}{2}\mathscr{F}\left(f\right)[\omega]$$

Solving this differential equation we find: $$\mathscr{F}\left(f\right)[\omega]=Ce^{-\frac{\omega^{2}}{4}}$$

And for $$\omega=0$$ we have $$\mathscr{F}\left(f\right)[0]=\frac{1}{2\pi}\intop_{-\infty}^{\infty}f\left(t\right)dt=\frac{1}{2\pi}\intop_{-\infty}^{\infty}e^{-t^{2}}dt=\frac{1}{2\sqrt{\pi}}$$

And hence we found $$C$$.

This way require a lot of details, and I have much easier one.

The second way:

Note that :

$$\mathscr{F}\left(f\right)[\omega]=\frac{1}{2\pi}\intop_{-\infty}^{\infty}e^{-t^{2}}e^{-i\omega t}dt=\frac{1}{2\pi}\intop_{-\infty}^{\infty}e^{-\left(t^{2}+i\omega t\right)}dt=\frac{1}{2\sqrt{\pi}}e^{-\frac{\omega^{2}}{4}}\intop_{-\infty}^{\infty}\frac{\sqrt{2}}{\sqrt{2\pi}}e^{-\left(t+\frac{i\omega}{2}\right)^{2}}dt$$

And note that the density of a normal distributed random variable is given by $$N\left(\mu,\sigma\right)=\frac{1}{\sqrt{2\pi}\sigma}e^{-\frac{\left(x-\mu\right)^{2}}{2\sigma^{2}}}$$

So we got $$\frac{1}{2\sqrt{\pi}}e^{-\frac{\omega^{2}}{4}}$$ multiplied by an integral (over the whole space) over a density of random distributed random variable with $$N\left(-\frac{i\omega}{2},\frac{1}{\sqrt{2}}\right)$$.

We got the same result.

Finally, my question is:

When I learned probability theory, we never mentioned complex numbers, So my argument that this is an integral over a density of a normal distribution, may be not acceptable.

Is it legit?

For any $$\beta\in\Bbb{R}$$, we have $$\int_{\Bbb{R}}e^{-t^2}\,dt = \int_{\Bbb{R}}e^{-(t+i\beta)^2}\,dt$$.
To prove this, consider for each $$R>0$$, the closed rectangular loop $$\gamma_R$$ oriented counter-clockwise passing through the four points $$-R,R, R+i\beta, -R+i\beta$$ (draw a picture, and maybe you would like to assume $$\beta>0$$ as well for ease of visualization). Then, the function $$z\mapsto e^{-z^2}$$ is holomorphic on $$\Bbb{C}$$ so by Cauchy's theorem, we have \begin{align} \int_{\gamma_R}e^{-z^2}\,dz &= 0. \end{align} Writing this out explicitly, we have \begin{align} \int_{-R}^{R}e^{-x^2}\,dx + \int_{0}^{\beta}e^{-(R+iy)^2}\,dy - \int_{-R}^Re^{-(x+i\beta)^2}\,dx -\int_{0}^{\beta}e^{-(-R+iy)^2}\,dy &= 0. \end{align} Here, the $$+,-$$ signs take the orientation the the curve $$\gamma_R$$ into account (again draw a picture). I leave it to you to justify why as $$R\to \infty$$, the two integrals $$\int_0^{\beta}$$ vanish, thereby leaving us with the equality \begin{align} \int_{\Bbb{R}}e^{-t^2}\,dt =\int_{\Bbb{R}}e^{-(t+i\beta)^2}\,dt. \end{align}