3
$\begingroup$

I am trying to rigorously derive the diffusion equation, given by $$ \frac{\partial u}{\partial t} = D\,\frac{\partial^2 u}{\partial x^2}, \qquad D = \frac{h^2}{2\tau}. $$ from a simple one-dimensional random walk model, and I would like to confirm whether my probabilistic reasoning is correct.

Consider a lattice with sites indexed by position $x$, separated by a distance $h$. Each site can contain an integer number of particles. Time is discrete, with time steps of size $\tau$. During each time step, every particle moves independently either one site to the left or one site to the right with equal probability $p = \tfrac12$. No particle remains in place, and particles do not interact.

enter image description here

Let $N(x,t)$ denote the (random) number of particles at site $x$ and time $t$, and let $u(x,t) = \mathbb{E}[N(x,t)]$ denote its expected value. The goal is to express $u(x,t+\tau)$ in terms of $u(x,t)$ and its neighbouring sites, from first noticing that $$ u(x,t+\tau) = \frac{1}{2}\big[u(x+h,t) + u(x-h,t)\big]\tag{1} $$ and to verify that in the continuum limit this process leads to the diffusion equation.

Below is my derivation. I would appreciate feedback on whether the formulation of the random variables and the use of the law of total expectation are correct, particularly in the step where $N(x\pm h,t)$ are themselves random variables.

Derivation:

Suppose that at time $t=0$, the sites at $x-h$ and $x+h$ contain $N(x-h,0)$ and $N(x+h,0)$ particles, respectively. During one time step of length $\tau$, each particle independently moves towards $x$ with probability $p=\tfrac12$. For simplicity, we assume a deterministic distribution of particles at $t=0$, for all $x$.

Let $N_l(x,t+\tau)$ and $N_r(x,t+\tau)$ denote the random numbers of particles that arrive at $x$ from the left and from the right, respectively, within the interval $[t,t+\tau]$. After one time step $\tau$, we have $$ N_l(x,\tau) \sim \mathrm{Bin}\big(N(x-h,0),\,\tfrac12\big), \qquad N_r(x,\tau) \sim \mathrm{Bin}\big(N(x+h,0),\,\tfrac12). $$ Therefore, the total number of particles at position $x$ after one time step is \begin{equation} N(x,\tau) = N_l(x,\tau) + N_r(x,\tau). \end{equation} Recall that, for a random variable $X\sim \mathrm{Bin}(n,p)$, we have $\mathbb{E}[X]=np$. Then, taking expectations and using the linearity of expectation, \begin{align} u(x,\tau) = \mathbb{E}[N(x,\tau)] = \mathbb{E}[N_l(x,\tau)] + \mathbb{E}[N_r(x,\tau)]= \tfrac12 N(x+h,0) + \tfrac12 N(x-h,0). \end{align} Thus, after a single time step $\tau$, the expected number of particles at $x$ is the sum of the incoming contributions from the neighbouring sites, each weighted by the probability $\tfrac12$ of moving towards $x$.

Following the same logic, the total number of particles at position $x$ at $t+\tau$ is then \begin{equation}\label{eqexp2step} N(x,t+\tau) = N_l(x,t+\tau) + N_r(x,t+\tau). \end{equation} However, now $N_l(x,t+\tau)$ and $N_r(x,t+\tau)$ depend on how many particles arrived at either lateral position in the previous step, $N(x\pm h,t)$, which are themselves random variables. So, in fact, what we know is that \begin{align} N_l(x,t+\tau)\mid N(x-h,t)&\sim \mathrm{Bin}\big(N(x-h,t),\,\tfrac12\big),\\ N_r(x,t+\tau)\mid N(x+h,t)&\sim \mathrm{Bin}\big(N(x+h,t),\,\tfrac12\big). \end{align} To compute the expectation of $N(x,t+\tau)$, we use the law of total expectation, which states that for random variables $X$ and $Y$, \begin{equation} \mathbb{E}[X] = \mathbb{E}\big[\mathbb{E}[X \mid Y]\big]. \end{equation} Then, \begin{align} u(x,t+\tau)&=\mathbb{E}[N(x,t+\tau)]\\ &=\mathbb{E}[N_l(x,t+\tau)] + \mathbb{E}[N_r(x,t+\tau)]\\ &= \mathbb{E}\big[\mathbb{E}[N_l(x,t+\tau) \mid N(x-h,t)]\big]+\mathbb{E}\big[\mathbb{E}[N_r(x,t+\tau) \mid N(x+h,t)]\big]\\ &=\tfrac12\mathbb{E}[N(x-h,t)]+ \tfrac12\mathbb{E}[N(x+h,t)]\\ &=\tfrac12 [u(x-h,t)+u(x+h,t)] \end{align} which is the discrete evolution equation used in the derivation of the diffusion equation.

Expanding $u(x \pm h, t)$ in a Taylor series about $x$, \begin{align} u(x+h,t) &= u(x,t) + h\,u_x(x,t) + \tfrac{1}{2}h^2\,u_{xx}(x,t) + O(h^3),\\ u(x-h,t) &= u(x,t) - h\,u_x(x,t) + \tfrac{1}{2}h^2\,u_{xx}(x,t) + O(h^3), \end{align} and substituting into the discrete update gives \begin{equation} u(x,t+\tau) - u(x,t) = \frac{1}{2}h^2\,u_{xx}(x,t) + O(h^4), \end{equation} since the odd powers cancel.

Dividing by $\tau$ and taking the limit as $h, \tau \to 0$ while setting \begin{equation} D = \frac{h^2}{2\tau} \end{equation} constant, we obtain \begin{equation} \frac{\partial u}{\partial t} = D\,\frac{\partial^2 u}{\partial x^2}, \end{equation} the one-dimensional diffusion equation with diffusion coefficient $D$.

Is this correct? I'm particularly unsure about my derivation of equation (1).

$\endgroup$
9
  • $\begingroup$ I think the problem arises when you try to expand $u$ into Taylor series; in the discrete case $u$ is only defined on discrete grids, so not expandable. I would first derive the limit process (which should be a Wiener process) and then use the forward Kolmogorov equation (a.k.a. Fokker–Planck equation) to get the PDE. $\endgroup$ Commented Nov 5 at 15:58
  • $\begingroup$ @SteveNorkus But $u$ can be continuous in $x$ while I am only looking at its values at discrete spatial intervals. So the Taylor expansion would still be valid, no? I probably wouldn't, however, be able to define $u$ as I have. Something still seems off. $\endgroup$ Commented Nov 5 at 16:59
  • $\begingroup$ When you take the limit $\tau\to 0,\ h\to 0$, you're effectively changing the underlying process (which is normal, this is how you find the limit process). However, note that your $u$, defined as $\mathbb E[N(x,t)]$, would change as well. Therefore $u$ depends on $\tau$ and $h$. The limit solution of $u\ (\tau\to0,h\to0)$ is second-order differentiable (and that needs to be proven as well!) but not $u$ for any finite $\tau$ and $h$. Again, I would suggest figure out the limit process first, then define $u(x,t)$ as the probability density function of that process. $\endgroup$ Commented Nov 5 at 17:05
  • $\begingroup$ I see. So is the derivation of the equation $u(x,t+\tau) = \frac{1}{2}\big[u(x+h,t) + u(x-h,t)\big]$ correct? Here, I'm treating $u$ as an expectation for the number of particles, but what if it's a concentration? $\endgroup$ Commented Nov 5 at 17:08
  • 1
    $\begingroup$ I just watched that video. I mean they're virtually the same (using probability or expectation), just off by a multiplicative constant. Also yes, the method in the video does assume differentiability. If you want to know about the rigorous way of doing it, then you might want to know about infinitesimal generators: en.wikipedia.org/wiki/… . And also, these two ways (the one I mentioned before and this) are equivalent (you can write the Kolmogorov forward equation with the infinitesimal generator, see the Wikipedia page) $\endgroup$ Commented Nov 5 at 17:41

1 Answer 1

2
$\begingroup$

In fact, it seems that the Taylor expansion is not needed.

Subtracting $u(x,t)$ from both sides of equation (1) and dividing by $\tau$ leads to \begin{equation} \frac{u(x,t+\tau)-u(x,t)}{\tau} = \frac{1}{2\tau}\,[u(x+h,t)+u(x-h,t)-2u(x,t)]. \end{equation} Multiplying the right-hand side by $h^2/h^2$ gives \begin{equation} \frac{u(x,t+\tau)-u(x,t)}{\tau} = \frac{h^2}{2\tau}\, \frac{u(x+h,t)-2u(x,t)+u(x-h,t)}{h^2}. \end{equation}

Letting \begin{equation} D = \frac{h^2}{2\tau}, \end{equation} and taking the limits $h,\tau \to 0$, the difference quotients become partial derivatives \begin{equation} \frac{\partial u}{\partial t} = D\,\frac{\partial^2 u}{\partial x^2}. \end{equation} Note: Alternative derivations are possible, in terms of probabilities, as seen here, using the law of total probability, instead of total expectation.

$\endgroup$
1
  • $\begingroup$ Also, a very interesting thing is that this kind of derivation is also used in financial economics (it's called a binomial model), you can see Chapter 3 of Stochastic Calculus for Finance, Book II by Steven E. Shreve, it has a very intuitive explanation of how Brownian motion (a.k.a. Wiener process) arises as the limit process of scaled random-walks. $\endgroup$ Commented Nov 5 at 18:08

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.