I am given an integral representation of the Bessel Function $J_0$ as follows: $$J_0(x)=\frac{1}{2\pi}\int_0^{2\pi}{e^{ix\cos\theta}d\theta}$$
To compute the Fourier Transform, consider the integral: $$\mathscr F(J_0(x))=\frac{1}{2\pi}\int_{-\infty}^{\infty}\frac{1}{2\pi}\int_0^{2\pi}{e^{ix\cos\theta}d\theta}\cdot e^{-ikx}dx$$ Combining the integrals and switching the order of integration: $$\mathscr F(J_0(x))=\frac{1}{4\pi^2}\int_0^{2\pi}\int_{-\infty}^{\infty}{e^{ix\cos\theta-ikx}dx}d\theta$$ We find that the inner integral is a Delta Function: $$\mathscr F(J_0(x))=\frac{1}{2\pi}\int_0^{2\pi}{\delta(\cos \theta-k)}d\theta$$ Applying a u-substitution $u=\cos \theta - k$, $u(0)=-k$, $u(2\pi)=-k$ and this is where I'm stuck: the limits of the integral are now equal. Have I made a mistake somewhere, or do I need to consider an infinitesimal interval around $-k$? If yes, how do I do this exactly?