# Convolution kernel of poisson equation by FFT

I'm trying to solve poisson equation using FFT. In genral it is a convolution of the charge density with potential well of point charge ( Green's function of laplace equation ) which is $1/r$

I'm not quite sure about fourier transform of this convolution kernel.

the 2D fourier transform of $1/r$ is

$\frac{1}{\sqrt{k_x^2+k_y^2}}= 1/k_r$

while in many papers about FFT solution of poisson equation is used kernel like this:

$\frac{1}{(4-2cos(2*\pi*k_x)-2cos(2*\pi*k_y))}$

For example here: http://www.physics.buffalo.edu/phy410-505-2004/Chapter6/ch6-lec2.pdf

In one dimension the kernel is $1/k^2$

Basicaly, I would like to make clear what is the kernel in 1D, 2D and 3D case both in real space and Fourier space

• The FFT is only defined for finite, discrete datasets. Is there some specific reason you want to work with it (i.e. is your data on the charge density a finite sampling)? Otherwise, you should be working with the full integral Fourier transform. – Emilio Pisanty May 10 '13 at 22:52
• FFT is fast - one of the fastest ways how to solve it numerically. Yes I'm solving it in regular rectangular sampling grid. I'm not sure what you mean by "full integral Fourier transform" in context of implementation of numerical solution in code ? You mean to express it in some basisset and than fourier transform the basisfunctions? – Prokop Hapala May 12 '13 at 6:51
• It is not clear from the question that you only seek numerical solutions in a rectangular grid. That being the case, the FFT is the way to go. – Emilio Pisanty May 12 '13 at 11:07

In general, what you're trying to do is called the "spectral method" for solving PDEs. Wikipedia has a little on it, including some useful references, and a solution of the Poisson equation. http://en.wikipedia.org/wiki/Spectral_method

As Peter Kravchuck says, the kernel will always be $k^{-2}$ for the Poisson equation.

In the linked PDF, physics.buffalo.edu/phy410-505-2004/Chapter6/ch6-lec2.pdf they are doing this a little differently. Instead of directly transforming the Poisson equation into Fourier space, and solving there, they first approximate the equation by its finite difference form and then transform that into Fourier space.

• thank, you. Does it mean that using simply $1/k^2$ is both more precise and simpler than the more complicated solution in ch6-lec2.pdf ? Or is there any reason why to do it like in ch6-lec2.pdf ? Because I have seen the same complicated solution in several other tutorial papers. – Prokop Hapala May 11 '13 at 9:10

In Fourier space the Poisson equation is $k^2\phi=\rho$ (up to a convention-dependent constant factor). So in every dimension the kernel is $1/k^2$. As for the real space, it is, up to a constant $|r|,\,\log|r|,\,1/r$ in 1D,2D,3D respectively.

• Thank you, can you also explain how does $1/k^2$ correspond to $\tilde{V}_{m,n} = \frac{h^2 \tilde{\rho}_{m,n}}{ 4 − W^m − W^{−m} − W^n − W^{−n}}$ where $W = exp(2i\pi/N)$ which is used in pdf I linked? physics.buffalo.edu/phy410-505-2004/Chapter6/ch6-lec2.pdf – Prokop Hapala May 10 '13 at 21:04
• @ProkopHapala, unfortunately I have no idea what are they doing there, and no time to think on it now. – Peter Kravchuk May 10 '13 at 21:16
• I just tried implemet both kernels in numpy, and both gives almost the same results in reciprocal space (the difference is 1e-5 for array of 512x512 ). I guess that these two kernels are used for differend boundary conditions ( periodic / absorbing )... probably – Prokop Hapala May 10 '13 at 21:34