Solution (source code)

= Solution

Use the <trigonometric identity> $2\cos^2(ax)=1+\cos(2ax)$ and express the cosine as a sum of two <complex exponentials>. The <Fourier transform> of each exponential is a shifted <Dirac delta distribution>:
$$
\mathcal F[1]=2\pi\delta(k),\qquad\mathcal F[e^{\pm2iax}]=2\pi\delta(k\mp2a).
$$
By <linearity>,
$$
\boxed{\widetilde f(k)=2\pi\delta(k)+\pi\delta(k-2a)+\pi\delta(k+2a).}
$$
The original function does not decay and is not absolutely integrable on the real line, so this answer is a <tempered distribution>, rather than an ordinary convergent Fourier integral. Its three lines represent the constant part and the two opposite spatial <frequencies>.