The space $S$ of functions on $R$ consists of smooth functions that satisfy for nonnegative integers $n$ and $r$ \begin{gather*} \left| \frac{d^n f(x)}{dx^n} \right| \leq C_{r,n}(1+x^2)^{-r} \end{gather*} for some constants $C_{r,n}$. Show that $f\in S$ if and only if its Fourier transform \begin{gather*} (\hat{f})(x) = \int e^{ixy} f(y) dy \in S \end{gather*}
I tried this: if $f\in S$, let $g(x) = \int e^{ixy} f(y) dy$, I want to prove $g \in S$ it is right. $$ |g^{(n)}(x)| = \left| \int (iy)^n e^{ixy} f(y) dy \right| \leq \int \left| y^n f(y)\right| dy \leq C_{r,n} \int y^n (1+y^2)^{-r}dy $$ I think I might get into some wrong direction here, and I don't know how to proceed. Thank you for any help!