I was trying to take the FT of
$$f(x) = \exp(-\pi ax^{2} + 2\pi ibx)$$
This is just the shifting rule applied to the FT of
$$g(x) = \exp(-\pi ax^{2})$$
which is given by
$$\hat g(k) = \frac{1}{\sqrt{2\pi a}} \exp \bigg(\frac{-k^{2}}{4\pi a} \bigg)$$
Hence, we should get
$$\hat f(k) = \frac{1}{\sqrt{2\pi a}} \exp \bigg(\frac{- (k - 2\pi b)^{2}}{4\pi a} \bigg)$$
However, when trying to derive this result I got stuck and if someone could help me I would really appreciate it.
We have that
$$\hat f(k) = \frac{1}{\sqrt{2\pi}} \int_{-\infty}^{\infty} \exp(-\pi ax^{2} + 2\pi ibx) \exp(-ikx) dx$$
Differentiating wrt to $k$ and integrating by parts, we find
$$\begin{align} \hat f'(k) &= \frac{1}{\sqrt{2\pi}} \int_{-\infty}^{\infty} \exp(-\pi ax^{2} + 2\pi ibx) (-ix) \exp(-ikx) dx \\ &= \frac{i}{\sqrt{2\pi}} \int_{-\infty}^{\infty} -x \exp(-\pi ax^{2}) \exp(i(2 \pi b - k)x) dx \\ \end{align}$$
with
$$\begin{align} u &= \exp(i(2 \pi b - k)x) \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ v = \frac{\exp(-\pi ax^{2})}{2\pi a} \\ u' &= i(2 \pi b - k)\exp(i(2 \pi b - k)x) \ \ \ \ \ v' = -x \exp(-\pi ax^{2}) \end{align}$$
Hence we get
$$\begin{align} \hat f'(k) = \frac{i}{\sqrt{2\pi}} \bigg[\frac{\exp(-\pi ax^{2}) \exp(i(2 \pi b - k)x)}{2\pi a}\Biggr \rvert_{-\infty}^{\infty} \\ - \bigg(\frac{i(2 \pi b - k)}{2\pi a} \bigg) \int_{-\infty}^{\infty} \exp(-\pi ax^{2} + 2\pi ibx) \exp(-ikx) dx \bigg] \\ \end{align}$$
noting that the evaluated expression equals $0$. Therefore
$$\begin{align} \hat f'(k) &= \frac{i}{\sqrt{2\pi}} \bigg[- \bigg(\frac{i(2 \pi b - k)}{2\pi a} \bigg) \int_{-\infty}^{\infty} \exp(-\pi ax^{2} + 2\pi ibx) \exp(-ikx) dx \bigg] \\ &= \frac{2\pi b - k}{2\pi a} \bigg[\frac{1}{\sqrt{2\pi}} \int_{-\infty}^{\infty} \exp(-\pi ax^{2} + 2\pi ibx) \exp(-ikx) dx \bigg] \\ &= \frac{2\pi b - k}{2\pi a} \hat f(k) \end{align} $$
Solving, we find
$$\begin{align} \hat f(k) &= \hat f(0) \exp \bigg(\frac{4\pi bk - k^{2}}{4\pi a} \bigg) \\ &= \hat f(0) \exp \bigg(\frac{- (k - 2\pi b)^{2} + 4\pi^{2}b^{2}}{4\pi a} \bigg) \end{align}$$
The only way I can see to get the correct result is if
$$\begin{align} \hat f(0) &= \frac{1}{\sqrt{2\pi}} \int_{-\infty}^{\infty} \exp(-\pi ax^{2} + 2\pi ibx) dx \\ &= \frac{1}{\sqrt{2\pi a}} \exp \bigg(\frac{-4\pi^{2}b^{2}}{4\pi a} \bigg) \end{align}$$
and the only way I thought I may be able to solve the integral for $\hat f(0)$ is to change to polar coordinates.
So, does anyone have suggestions on how to solve the $\hat f(0)$ integral?
Thanks for your help.
Hint to solve the integral:
$$ \exp \left(ax^2 +bx\right) = \exp \left(\left(\sqrt{a}x+\frac{b}{2\sqrt{a}}\right)^2 -\frac{b^2}{4a} \right),$$ for given constants $a$ and $b$.