Fourier inverse of a function to get dirac I'm trying to get the dirac function from a fourier inverse tranform:
$$\frac{1}{2\pi}\int_{-\infty}^{\infty}e^{-iw(x-x_0)}dw$$
It is this last step I am stuck on to get the conclusion.
Original function:  $$f(w) = \frac{1}{2\pi}e^{iwx_0}$$
 A: A correct way to do this with the formalism of the distributions:
Let $T \in \mathcal S'$ , then $\hat{T}$,the Fourier transform of $T$ is defined by
$$\forall \varphi \in \mathcal S, \langle \hat{T}, \varphi \rangle = \langle T, \hat{\varphi} \rangle $$
So the Fourier transform of $\delta_{x_0}$ is given by 
$$\forall \varphi \in \mathcal S, \langle \hat{\delta_{x_0}}, \varphi \rangle = \langle \delta_{x_0}, \hat{\varphi} \rangle = \hat{\varphi}(x_0) $$
Then, as $\varphi$ is a perfectly regular function, we use the definition of the Fourier transform of $\varphi$ by an integral :
$$\hat{\varphi}(x_0) =  \frac{1}{2\pi}\int_{-\infty}^{\infty} \varphi(t) e^{-itx_0}dt$$
Hence
$$\forall \varphi \in \mathcal S , \langle \hat{\delta_{x_0}}, \varphi \rangle = \langle \frac{1}{2\pi}e^{-itx_0}, \varphi \rangle$$
So you have $\hat{\delta_{x_0}} = \frac{1}{2\pi}e^{-itx_0} $
You can do it in the other direction, but the calculs are less immediate
A: You've got to know a bit about generalized functions for this type of integral to make sense. 
The generalized function $1(x)$ can be defined by the sequence $1_n(x)=\exp(-x^2/n^2)$. The identification with $1$ comes from the limit, 
$$\lim_{n\rightarrow\infty}\int_{-\infty}^{\infty} f(x) 1_n(x) \mathrm{d}x = \int_{-\infty}^{\infty} f(x) \mathrm{d}x,$$
for sufficiently well behaved functions $f$ (e.g. infinitely differentiable with $f(x) = O(x^{-N})$ for all $N>0$).
We can define the Fourier transform of $1(x)$ as the generalized function defined by the sequence obtained from ordinary Fourier transforms of $1_n(x)$. 
If we actually compute this we will find that,
$$ F(1_n)(p) = \int_{-\infty}^{\infty} \exp(-2\pi i p x) 1_n(x) dx = \sqrt{\pi n^2}  \exp(-n^2 p^2 \pi^2) = \delta_n(p)$$
Since $\delta_n(p)$ is a sequence of $``$good functions$"$ which define the generalized function $\delta(x)$ (aka the Dirac Delta Function) we say that the Fourier transform of $1(x)$ is $\delta(x)$. 
What you are missing in your integration is that you're actually trying to leave the function as $e^{i\omega x_0}$ when it should be $e^{i \omega x_0} 1_n(x)$.
