How to evaluate an integral using FFT when the integrand is sensitive to discretization points?

376 Views Asked by At

I am looking to find the following function using a FFT method:

\begin{equation} g(x)=\frac{1}{2\pi} \int_{-m\pi}^{m\pi} \psi(u) \mathrm{e}^{iux}du \end{equation}

I start by discretizing $ x \in [a,b] $ for $N$ equally spaced points by setting $x_k = a + k dx$ where $dx = \frac{b-a}{N}$. Then I approximate the integral using the rectangle rule which gives

\begin{equation} g(x_k)=\frac{du}{2\pi} \sum_{n=0}^{N-1}\psi(u_n) \mathrm{e}^{i(-m\pi+ndu)(a+kdx)} \end{equation}

where $u_n=-m\pi + ndu$ and $du = \frac{2m\pi}{N}$. I can then rewrite the terms to give

\begin{equation} g(x_k)=\frac{du}{2\pi} \mathrm{e}^{-im\pi x_k} \sum_{n=0}^{N-1} \mathrm{e}^{andu} \psi(u_n) \mathrm{e}^{i2\pi m nk dx/N} \end{equation}

Now, if I take $m = 1/dx$ then I have no problem finding $g(x)$. However, I am looking for a way to evaluate the integral for different values of $m$. If anyone could offer any thoughts I'd be very grateful.