[Math] Fourier transform of $f(x)=x$ if $0

fourier analysisfourier seriesnumerical methods

What is the Fourier transform of the function defined by $f(x)=x$ on $[0,1]$ and $f(x)=0$ otherwise, i.e., $\hat f(\xi) = \int_\mathbb{R} { e^{-iu\xi} f(u) du }$?

Is there a closed-form? Else, how can I compute it numerically with fft? Fourier/fft are new concepts to me and I am not clear how to use fft.

Thanks

Best Answer

First let's compute this analytically, using integration by parts as Ian suggested. \begin{align*} \hat{f}(\xi) &= \int_0^1 xe^{ix\xi}\,dx \\ &= \left.\frac{x}{i\xi}e^{ix\xi}\right|_0^1 - \frac{1}{i\xi}\int_0^1 e^{ix\xi}\,dx\\ &= \frac{1}{i\xi} e^{i\xi}+ \left.\frac{1}{\xi^2}e^{ix\xi}\right|_0^1 \\ &= (\xi^{-2}-i\xi^{-1})e^{i\xi} - \xi^{-2}. \end{align*}

Now there's the more subtle question you asked earlier, about whether it is possible to determine this numerically using the DFT. Again, like Ian said, the DFT is for periodic functions. But still if you are careful you can use the DFT for this case. What you have to do is choose some cutoff $R$, and look at the Fourier series of the function which is equal to $f$ on $[-R,R]$, and is periodic otherwise. This can be approximated using the DFT.