Inverse Fourier transform relation for $L^2$ function If $f$ is an $L^2$ function and $\hat{f}$, its Fourier transform, also in $L^2$, can the Fourier transform and its inverse be written as 
$$\hat{f}(\omega)=\int_{-\infty}^\infty f(x) e^{i\omega x}dx$$
and 
$$f(x)=\int_{-\infty}^\infty \hat{f}(\omega) e^{-i\omega x}d\omega$$
respectively, disregarding the constants? When can a Fourier transform and its inverse exist, but the above definitions not hold?
 A: Jonas T already hit on the important point that for the first integral to be defined, $f$ must be in $L^1$. Similarly, for the second integral to be defined, $\hat{f}$ must be in $L^1$.
Fabian has mentioned that the Fourier tranform can be generalized even beyond $L^2$.  But if you're only concerned with $L^2$, then one way to define the Fourier transform is to first show that it defines an isometric (with respect to the $L^2$ norm) isomorphism on the Schwartz space, which is dense in $L^2$, and then take the unique extension to all of $L^2$.  The fact that the Fourier transform defines an isometry with dense range on a dense subspace of $L^2$, and thus has a unique extension to a unitary operator on $L^2$, is known as Plancherel's theorem.  I have only mentioned one approach, which is the one I learned from Chapter 10 of J.B. Conway's A course in functional analysis. 
So the answer to your final question, at least restricted to $L^2$, is that every element of $L^2\setminus L^1$ provides an example, strictly speaking.  However, you can show that $\frac{1}{\sqrt{2\pi}}\int_{-R}^R f(x)e^{-i\omega x}dx$ converges to $\hat{f}(\omega)$ in $L^2$ norm as $R\to\infty$, and similarly $\frac{1}{\sqrt{2\pi}}\int_{-R}^R \hat{f}(\omega)e^{i\omega x}dx$ converges to $f(x)$ in $L^2$ norm as $R\to\infty$.  I don't have a reference to a proof handy, but this and more is summarized in the Springer online encyclopedia's article on the Fourier transform, which includes helpful references and links.
A: There are many cases when the Fourier transform can be defined and the function is not $L^2$. Take  a look at tempered distributions for a class of "functions" for which the Fourier transform and its inverse can be defined. The most prominent example is the delta function (distribution). 
