Diffusion in a finite habitat

In this case the goal is to find a solution to the Dirichlet problem with absorbing barrier, namely a solution of Eq. 14 that satisfies the following initial and boundary conditions

\begin{displaymath}
\begin{array}{rll}
c(x,t) & \geq 0 & \text{for any } t \geq...
...0 \\
c(x,0) = c_0(x) & = \text{given function.} &
\end{array}\end{displaymath}

Of course, even the initial density must satisfy the condition of absorbing barrier, i.e. $c_0(0) = c_0(L) = 0$ (see Fig. 6).

The way for solving the absorbing barrier problem requires the use of the Fourier series. According to the theory developed by Fourier, a continuous function $f(x)$ that is periodic of period $P$ can be expanded as the sum of a constant and an infinite number of sinusoidal components of frequencies that are multiples of the fundamental frequency $1/P $. More explicitly, if we indicate the wave number with $k$, the frequency with $k/P $ , and the angular frequency with $2\pi k/P $, it turns out that

$\displaystyle f(x)$ $\displaystyle =$ $\displaystyle \frac{{{a_0}}}{2} + \sum\limits_{k = 1}^\infty {{a_k}\cos \left( {\frac{{2\pi k}}{P}x} \right)} + {b_k}\sin \left( {\frac{{2\pi k}}{P}x} \right)$ (5.5)
$\displaystyle {a_k}$ $\displaystyle =$ $\displaystyle \frac{2}{P}\int\limits_0^P {f(x)\cos \left( {\frac{{2\pi k}}{P}x}...
...- \frac{P}{2}}^{\frac{P}{2}} {f(x)\cos \left( {\frac{{2\pi k}}{P}x} \right)} dx$ (5.6)
$\displaystyle {b_k}$ $\displaystyle =$ $\displaystyle \frac{2}{P}\int\limits_0^P {f(x)\sin \left( {\frac{{2\pi k}}{P}x}...
...- \frac{P}{2}}^{\frac{P}{2}} {f(x)\sin \left( {\frac{{2\pi k}}{P}x} \right)} dx$ (5.7)
$\displaystyle \frac{{{a_0}}}{2}$ $\displaystyle =$ $\displaystyle \frac{1}{P}\int\limits_0^P f(x)dx =$    mean value (5.8)

Figure 6: Diffusion problem in a finite one-dimensional domain with absorbing barrier.
\includegraphics[width=0.5\linewidth]{diffusione-boundaries-dirichlet}

The Fourier series is quite useful for our purposes because it allows us to use the following trick. The function $c_0(x)$ defined in the interval $0 \leq x \leq L$, can be seen as just a part of a periodic function of period $2L$ defined on the whole real axis (see Fig. 7). This latter can then be expanded in Fourier series

$\displaystyle \frac{{{a_0}}}{2} + \sum\limits_{k = 1}^\infty {{a_k}\cos \left( ...
...\pi k}}{{2L}}x} \right) + {b_k}\sin } \left( {\frac{{2\pi k}}{{2L}}x} \right).
$

Moreover, the periodic function of which $c_0(x)$ is just a part has zero mean value and vanishes at $x = 0$ and $x = L$. Thus, according to the properties of Fourier series, the coefficients of the series must necessarily be such that $a_0 = 0$ and $a_k = 0$ for any $k \geq 1$. In other words, we can state
Figure 7: The solution to the absorbing barrier problem can be seen as part of a periodic function defined on the whole real axis.
\includegraphics[width=\linewidth]{diffusione-repliche-fourier}

$\displaystyle %\hspace{-0.5\linewidth}
{c_0}(x) = \sum\limits_{k = 1}^\infty {{b_k}\sin } \left( {\frac{{\pi k}}{L}x} \right)
$

namely think of the function $c_0(x)$ as the weighted sum (with weights equal to $b_k $) of sine waves with frequencies equal to $1/2L $, $2/2L = 1/L $, $3/2L $, $4/2L = 2/L $ and so on. The sinusoidal components are also called modes or modal components and $k$ is called wave number. The properties of $c_0(x)$ are actually shared by all the functions $c(x,t)$ with $t>0$, because they too have to satisfy the absorbing barrier condition. Therefore, these functions can be expanded into the following Fourier series

$\displaystyle c(x,t) = \sum\limits_{k = 1}^\infty {{B_k}(t)\sin } \left( {\frac{{\pi k}}{L}x} \right).$ (5.9)

The coefficients $B_k(t)$ of the Fourier series in Eq. 21 must be such that the function $c(x,t)$ is a solution to the diffusion equation. First of all, we must necessarily have

$\displaystyle c(x,0) = c_0(x)
$

which implies $B_k(0) = b_k$. Secondly, we require that

$\displaystyle \frac{{\partial c}}{{\partial t}} = D\frac{{{\partial ^2}c}}{{\partial {x^2}}}.
$

Since
$\displaystyle \frac{\partial c}{\partial t}$ $\displaystyle =$ $\displaystyle \sum\limits_{k = 1}^\infty {\frac{{d{B_k}}}{{dt}}\sin } \left( {\frac{{\pi k}}{L}x} \right)$  
$\displaystyle \frac{\partial c}{\partial x}$ $\displaystyle =$ $\displaystyle \sum\limits_{k = 1}^\infty {{B_k}(t)\frac{{\pi k}}{L}\cos } \left( {\frac{{\pi k}}{L}x} \right)$  
$\displaystyle \frac{{\partial^2}c}{\partial {x^2}}$ $\displaystyle =$ $\displaystyle - \sum\limits_{k = 1}^\infty {{B_k}(t)\frac{{{\pi ^2}{k^2}}}{{{L^2}}}\sin } \left( {\frac{{\pi k}}{L}x} \right)$  

it turns out that

$\displaystyle \frac{{d{B_k}}}{{dt}} = - D\frac{{{\pi ^2}{k^2}}}{{{L^2}}}{B_k} \, k=1,2,\ldots$ (5.10)

The solution of Eq. 22 is

$\displaystyle B_k(t) = {B_k}(0)\exp \left( { - D\frac{{{\pi ^2}{k^2}}}{{{L^2}}}t} \right)
$

and therefore the final formula for the weights of modal components of $c(x,t)$ is:

$\displaystyle {B_k}(t) = {b_k}\exp \left( { - D\frac{{{\pi ^2}{k^2}}}{{{L^2}}}t} \right).$ (5.11)

From this formula we conclude that all the modes fade out exponentially and hence that $c(x, t) \rightarrow 0$ for $t \rightarrow \infty$. This second result is obvious because the random movements slowly lead all the organisms out of the habitat suitable for the species. However, we note that the damping exponent of each mode increases with the square of the wave number $k$. Therefore, the average extinction time of the modal components with larger spatial frequency is much smaller. In other words, diffusion tends to quickly eliminate any initial spatial wiggling of organisms' density, as shown in Fig. 8 which reports different snapshots of $c(x,t)$ at successive times. The solid line indicates the initial density $c_0(x)$.

Figure 8: Time evolution of the solution to the diffusion problem with an absorbing barrier. The plot shows various snapshots at successive times.
\includegraphics[width=\linewidth]{diffusione-soluzione-isola.eps}