Solving PDEs with fourier methods
Contents
Solving PDEs with fourier methods#
Mathematics for Scientists and Engineers 2
We can use the properties of Fourier Transforms to solve PDEs (check Fourier Transforms notebook). The PDE will be Fourier transformed from the outset and due to the differentiation properties of Fourier Transforms this will lead to an ODE which is much easier to solve. It should also be noted that the FT method works best for infinite systems. Applying it to a finite system essentially reduces the problem into a Fourier series of modes with discrete wavelengths, rather than \(k\) being continuous. For inhomogeneous boundary conditions, the FT usually yields a half-range Fourier series.
Diffusion equation in 1D#
We will apply the FT method on the (linear) diffusion equation for an infinite system
where the diffusion coefficient \(D\) is assumed to be independent of position. Firstly we FT the PDE and convert it to an ODE. To Fourier Transform the PDE we do
On the LHS, the time derivative can be pulled outside the integral over \(x\) that performs the FT and using the differentiation property of Fourier Transforms on the RHS we get
Fortunately, in this case, the evolution of \(\tilde{u}(k, t)\) at a particular value of \(k\) does not depend on \(\tilde{u}\) at a different value of \(k\) and thus, the Fourier modes are uncoupled and evolve independently. Thus, we can regard \(k\) as a parameter and \(\partial / \partial t\) behaves the same as \(d/dt\), which yields the ODE
where we have noted that \(d(ln(\tilde{u})) = d\tilde{u} \, / \, \tilde{u}\).
The solution to the ODE is \(ln(\tilde{u}(k, t)) = - k^2 Dt + \text{constant}\). Hence we can write
where \(\tilde{u}_0(k) = \tilde{u}(k, t=0)\) is the initial spectrum of Fourier modes and is determined by the initial conditions. To obtain the general solution we just take the inverse Fourier transform of the time-dependent spectrum:
To obtain the initial spectrum by Fourier transforming the initial profile \(u_0(x) = u(x, t=0)\):
Example - \(\delta\) function#
We will consider a \(\delta\) function (infinitely narrow) initial profile for the diffusion equation and determine the particular solution of the problem. Thus the initial profile is given by
Thus we can determine the corresponding initial spectrum of Fourier modes:
Inserting this in the general solution, we get
which is the particular solution to the \(\delta\) function initial profile.