# Differences between Discrete Fourier Transform and Continuous Fourier Transform?

I am trying to visualize the time dependence of a free particle given an initial wave-function using Python and I just wanted to know if I could use the in built FFT implementation from NumPy to find the coefficients of the integral

$$\Psi(x,\,t)=\frac{1}{2\pi}\int_{-\infty}^\infty\phi(k)\exp\left[i\left(kx-\frac{\hbar k^2}{2m}t\right)\right]\,\mathrm{d}k$$

In the textbook I am basing this off of, they solve for $$\phi(k)$$ by finding the fourier transform analytically given an initial function $$\Psi(x, 0)$$. Logically, it seems like doing a discrete fourier transform to simulate a fourier transform on an array of values representing $$\Psi(x, 0)$$ is okay, but I'm wondering if there are some subtleties I might be missing that actually changes the interpretation of my results when using a discrete fourier transform to find $$\phi(k)$$ instead of a continuous one. More generally, I guess, is other than the fact one is applied to a discrete rather than continuous set of variables, what is the difference between a Discrete Fourier Transform and a Continuous Fourier Transform.

Welcome to scicomp!

Do you want to plot or do you want to do a simulation?

There is no problem with doing numerical simulation within a discretized fourier space. It comes with a couple of advantages and disadvantages.

Once you fourier transformed your profile, which in your case is a wave-amplitude, then calculating derivatives is very easy. You can simply multiply with $$i~k_j$$, with $$k_j$$ being your wavenumber for that particular coefficient. So calculating derivatives is very convenient in a DFT-code. (a laplace operator is basically $$(i k_j)^2$$)!)

The transformation from real space to fourier space can be done via the FFT algorithm and takes $$O(N LOG(N))$$ operations if i remember correctly. There are performant libraries to take care of this.

One problem of course is that you can not calculate nonlinearities directly. If you have an array of coefficients $$r_i$$ in real space, and you want to calculate a nonlinearity, then you can simply calculate $$(r_i)^2$$ etc. In fourier space that is not possible. Therefore in navier stokes codes for example the nonlinearity is calculated in real space, and then may be re-transformed back for the rest of the numerical treatment.

Another constraint is that you are limited to periodic or quasi-periodic problems. Since the very basis for your computation are essentially sine- and cosine functions, there is no good way to resolve any boundary conditions or discontinuities. If you want to look at one free particle within a large empty domain you should be fine though.

What kind of time-dependence do you mean? You are stating the initial condition, but not really the dynamics of what you want to do!

• Thanks, that's really helpful! I guess I'm actually plotting, not simulating. By time-dependence, I mean I just want to plot the wavefunction at different values of t. Oct 11, 2019 at 19:49
• Well then you just create an array with the wavenumbers $\psi(k)$, multiply it with the correct time dependend phase, as your equation states, and transform to real space. Then just plot the profile Oct 12, 2019 at 7:55