0
$\begingroup$

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.

$\endgroup$
  • $\begingroup$ there is not so much to say in general. what is your true problem ? $\endgroup$ – reuns Jul 6 '16 at 1:29
  • $\begingroup$ I am very new to the FFT and to me it seems that one has to take $m=1/dx$ in order for the right most exponential term to resemble the discrete Fourier transform in order to apply the FFT. I'm sure I'm just missing something though. $\endgroup$ – Bob Cobb Jul 6 '16 at 1:39
  • 1
    $\begingroup$ you shouldn't write $du = \frac{2 m \pi}{N}$, and by definition of the Riemann integral $\int_a^b f(u) du= \lim_{N \to \infty} S_N$ where $S_N = \sum_{n=0}^{N-1} f(a+n\frac{b-a}{N})\frac{b-a}{N}$ so with $f(u) = e^{i x u} \psi(u)$ you get $S_N = \sum_{n=0}^{N-1} f(-m\pi+n\frac{2m\pi}{N})\frac{2m\pi}{N}$ $ = \frac{2m\pi}{N}\sum_{n=0}^{N-1} \psi(-m\pi+n\frac{2m\pi}{N})e^{ix(-m\pi+n\frac{2m\pi}{N})} = 2m\pi e^{-ixm\pi} FFT[\psi_{N,m}(n)](-xm)$ with $\psi_{N,m}(n) = \psi(-m\pi+n\frac{2m\pi}{N})$ $\endgroup$ – reuns Jul 6 '16 at 2:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.