Q:

Ambiguity in the Fourier transform of $f(x)=\cos(ax)$

I am slightly confused about two contradictory answers I am getting with regard to the Fourier transform of the function $f(x)=\cos(ax)$. The first method I used was
\begin{align}
F(k)&=\int_{-\infty}^{\infty}\cos(ax)e^{-ikx} \ dx\\
&=\frac{1}{2}\int_{-\infty}^{\infty}\left(e^{iax}+e^{-iax}\right)e^{-ikx} \ dx\\
&=\frac{1}{2}\int_{-\infty}^{\infty}e^{-ix(k-a)}+e^{-ix(k+a)} \ dx\\
&=\pi\int_{-\infty}^{\infty}\frac{1}{2\pi}\left(e^{-ix(k-a)}+e^{-ix(k+a)}\right)\\
&=\pi\left(\delta(k-a)+\delta(k+a)\right).
\end{align}
However, I noticed that a different method was used that resulted in a different answer, namely
$$F(k)=\frac{1}{2}(\delta(k-a)+\delta(k+a)).$$
Where am I going wrong in my first method to be out by a factor of $2\pi$.

A:

As discussed in the comments, probably the two answers differ by a factor of $2\pi$ because two different conventions for the definition of Fourier have been used.
The second method probably uses
$$
F(k)=\frac{1}{2\pi}\int_{-\infty}^{\infty}\cos(ax)e^{-ikx} \, dx.
$$
There are several common conventions for the definition of the Fourier transform, in fact they differ by a multiplicative constant (long story short: some people like $2\pi$ to appear in the definition, some people prefer the definition to be simpler and have the $2\pi$ appear later while studying some properties).

