Show that the Fourier transform of $$f(x) = k e^{\frac{-x^{2}}{2\sigma^{2}}}$$ for some $k \in \mathbb{R}$ is $$F( \lambda) = \frac{k}{\sigma}e^{\frac{-\sigma^{2}}{2\sigma^{2}}}$$
By definition of the Fourier transform:
$$F(\lambda) = \frac{1}{\sqrt{2\pi}}\int f(x)e^{-i\lambda x}dx$$
I have a problem with completing the square. Applying the procedure mechanically brings me nowhere. Yet, I find the solution to lack clarity.
$$\begin{align} -\frac{x^2}{2\sigma^2} - i\lambda x &= -\frac{1}{2}\biggl[\frac{x^2}{\sigma^2} + 2i\lambda x\biggr] \\ &= -\frac{1}{2}\biggl[\biggl(\frac{x}{\sigma} + i\lambda \sigma\biggr)^2 - (i\lambda\sigma)^2\biggr] \\ &= -\frac{1}{2}\biggl(\frac{x}{\sigma} + i\lambda\sigma\biggr)^2 - \frac{\lambda^2\sigma^2}{2} \end{align}$$
Would someone be kind to expound on the 'tricks' used in the completing the square?