# Fourier techniques and periodic boundary conditions

Could somebody explain to me why periodic boundary conditions are automatically satisfied if you solve your problem assuming a Fourier series? So, if we assume a Fourier series for our solution, we don't need to impose any type of boundary conditions because the necessary periodic boundary conditions are naturally satisfied?

Quick example of the setup I'm referring to:

Diffusion equation: $$u_t=k(u_{xx}+u_{yy}+u_{zz})$$ Assume $$u(x,y,z,t)$$ can be expanded in a Fourier expansion $$(e^{-ipz},e^{-imy},e^{-inx}) ,$$ resulting in automatic satisfaction of periodic BCs.

• Because trigonometric functions are periodic? (Hence assuming a function can be written as a linear combination of trigonometric functions implies that the function is periodic.) – Christian Clason Jan 24 '16 at 0:49
• So I could use a non-periodic initial condition, like $$e^{x}$$, and watch it evolve in time without issues because the assumption forces it to be artificially periodic? I only ask because when I was talking about this with someone, they informed me that I could only use periodic initial conditions because of that restriction – jkh20 Jan 24 '16 at 2:49

Let's assume $k > 0$ is strictly positive.

Mathematically the initial conditions $t=0$ for the diffusion or "heat" equation can be rough (discontinuous), and so long as these are square-integrable, the solution operator for the PDE (e.g. with periodic boundary conditions) will instantly smooth out that data to an analytic function at each $t \gt 0$.

So we may think of the initial condition as being periodic but discontinuous at the endpoints (which doesn't affect square-integrability), and that at all subsequent times the solution becomes smoothly periodic.

Note that if $k$ were replaced by $-k$, so that we have the "backwards" heat equation, then the smoothing property disappears and solutions become unstable. As the Wikipedia article puts it:

Generally, many different states and starting conditions will tend toward the same stable equilibrium. As a consequence, to reverse the solution and conclude something about earlier times or initial conditions from the present heat distribution is very inaccurate except over the shortest of time periods.

Pretty simple. Because each fourier function is periodic, in a way that you will 'choose' $n,m$ and $p$ in your problem, and they will have be multiples of the boundary frequency.

so.. let's say that you have a periodic boundary of length $a$ in z... then $p=\frac{a.k}{2\pi}$ with k being an integer. then $e^{ipz}$ will obey the boundary conditions for all values of k.