We now construct a large time effective diffusion equation. By first considering Eqs. (1–2), we transform into Laplace space, where large values of t correspond to small values of the Laplace variable \(\lambda \). We then carry out a Taylor expansion of the delay kernels to remove the convolutions in time (see Eqs. 54–55 in Appendix 1 for details).
Converting back to the time domain, one obtains
$$\begin{aligned} (1 + \bar{\Phi }_\tau '(0))\left( \frac{\partial }{\partial t} + \varvec{v}\cdot {\nabla _{\varvec{x}}} \right) p= & {} -\bar{\Phi }_\tau (0) p + \int _V T(\varvec{v},\varvec{v}')\left( \bar{\Phi }_\omega (0) r(t,\varvec{x},\varvec{v}') \right. \nonumber \\&\left. +\,\bar{\Phi }_\omega '(0)\frac{\partial }{\partial t} r(t,\varvec{x},\varvec{v}') \right) \text {d}\varvec{v}' , \end{aligned}$$
(20)
and
$$\begin{aligned} (1 + \bar{\Phi }_\omega '(0))\frac{\partial }{\partial t}r = -\bar{\Phi }_\omega (0) r +\bar{\Phi }_\tau (0) p + \bar{\Phi }_\tau '(0)\left( \frac{\partial }{\partial t} + \varvec{v}\cdot {\nabla _{\varvec{x}}} \right) p \end{aligned}$$
(21)
There are now two further steps to obtain an effective diffusion equation. First, by considering successively greater monomial moments in the velocity space, one obtains a system of k-equations where the equation for the time evolution of moment k corresponds to the flux of moment \(k+1\). It therefore becomes necessary to ‘close’ the system of equations to create something mathematically tractable. We use the Cattaneo approximation for this purpose (Hillen 2003, 2004). Once a closed system of equations has been found, we then carry out an asymptotic expansion where we investigate the parabolic regime to obtain a single equation for the evolution of the density of particles at large time.
Note that it would be possible to carry out a similar process for smaller time behaviour by Taylor expanding the spatial delays in the convolution integrals. Asymptotic analysis would then have to be carried out to simplify the remaining convolution.
Moment Equations
We can multiply Eqs. (20–21) by monomials in \(\varvec{v}\) and integrate over the velocity space to obtain equations for the velocity moments
$$\begin{aligned} m^0_\rho = \int _V \rho (t,\varvec{x},\varvec{v})\text {d}\varvec{v}, \quad \varvec{m}^1_\rho = \int _V \varvec{v}\rho (t,\varvec{x},\varvec{v})\text {d}\varvec{v}, \quad M^2_\rho = \int _V \varvec{v}\varvec{v}^T\rho (t,\varvec{x},\varvec{v})\text {d}\varvec{v}. \end{aligned}$$
(22)
The equations relating the terms \(m_p^0, m_r^0, \varvec{m}_p^1, \varvec{m}_r^1, M_p^2\) are given below. For initial integration over the velocity space, we see
$$\begin{aligned} (1 + \bar{\Phi }_\tau '(0))\left( \frac{\partial m^0_p}{\partial t} + \nabla _{\varvec{x}} \cdot \varvec{m}_p^1 \right) = - \bar{\Phi }_\tau (0)m_p^0 + \bar{\Phi }_\omega (0)m_r^0 + \bar{\Phi }_\omega '(0)\frac{\partial m_r^0}{\partial t} , \end{aligned}$$
(23)
and
$$\begin{aligned} (1 + \bar{\Phi }_\omega '(0))\frac{\partial m^0_r}{\partial t} = - \bar{\Phi }_\omega (0)m_r^0 + \bar{\Phi }_\tau (0)m_p^0 + \bar{\Phi }_\tau '(0)\left( \frac{\partial m^0_p}{\partial t} + \nabla _{\varvec{x}} \cdot \varvec{m}_p^1 \right) , \end{aligned}$$
(24)
When summing Eqs. (23) and (24), we see that mass flux is caused by the movement of particles in the running state only, i.e.
$$\begin{aligned} \frac{\partial }{\partial t}\left( m_p^0 + m_r^0 \right) + \nabla _{\varvec{x}} \cdot \varvec{m}_p^1 = 0. \end{aligned}$$
For multiplication by \(\varvec{v}\) and integrating, we obtain equations
$$\begin{aligned} (1 + \bar{\Phi }_\tau '(0))\left( \frac{\partial \varvec{m}^1_p}{\partial t} + \nabla _{\varvec{x}} \cdot M_p^2 \right) = - \bar{\Phi }_\tau (0)\varvec{m}_p^1 +\,\psi _d \bar{\Phi }_\omega (0)\varvec{m}_r^1 + \psi _d \bar{\Phi }_\omega '(0)\frac{\partial \varvec{m}_r^1}{\partial t},\nonumber \\ \end{aligned}$$
(25)
and
$$\begin{aligned}&(1 + \bar{\Phi }_\omega '(0))\frac{\partial \varvec{m}^1_r}{\partial t} = - \bar{\Phi }_\omega (0)\varvec{m}_r^1 + \bar{\Phi }_\tau (0)\varvec{m}_p^1 + \bar{\Phi }_\tau '(0)\left( \frac{\partial \varvec{m}^1_p}{\partial t} + \nabla _{\varvec{x}}\cdot M_p^2 \right) . \end{aligned}$$
(26)
We would now like to approximate the \(M_p^2\) term to close the system.
Cattaneo Approximation Step
We make use of the Cattaneo approximation to the VJ equation as studied by Hillen (2003, 2004). For the case where the speed distribution is independent of the previous running step, i.e. \(h(s,s') = h(s)\), we approximate \(M_p^2\) by the second moment of some function \(u_\text {min} = u_\text {min} (t,\varvec{x},\varvec{v})\), such that \(u_\text {min}\) has the same first two moments as \(p = p(t, \varvec{x}, \varvec{v})\) and is minimised in the \(L^2(V)\) norm weighted by \(h(s)/s^{n-1}\). This is essentially minimising oscillations in the velocity space whilst simultaneously weighting down speeds which would be unlikely to occur (Hillen 2003).
We introduce Lagrangian multipliers \(\Lambda ^0 = \Lambda ^0(t, \varvec{x})\) and \(\varvec{\Lambda }^1 =\varvec{\Lambda }^1(t, \varvec{x})\) and then define
$$\begin{aligned} H(u) := \frac{1}{2} \int _V \frac{u^2}{h(s)/s^{n-1}}\text {d}\varvec{v} {-} \Lambda ^0\left( \int _V u \text {d}\varvec{v} {-} m_p^0\right) {-} \varvec{\Lambda }^1\cdot \left( \int _V\varvec{v} u \text {d}\varvec{v} - \varvec{m}_p^1\right) . \end{aligned}$$
(27)
By the Euler–Lagrange equation (Gregory 2006), we can minimise H(u) to find that
$$\begin{aligned} u(t, \varvec{x}, \varvec{v}) = \frac{\Lambda ^0(t, \varvec{x}) h(s)}{s^{n-1}} + \frac{(\varvec{\Lambda }^1(t, \varvec{x}) \cdot \varvec{v}) h(s)}{s^{n-1}}. \end{aligned}$$
(28)
We now use the constraints to find \(\Lambda ^0\) and \(\varvec{\Lambda }^1\). For \(m_p^0\), we have
$$\begin{aligned} m_p^0 = \int _V u \text {d}\varvec{v} = \Lambda ^0 \int _V h(s)/s^{n-1} \text {d}\varvec{v} = \Lambda ^0 \text {Area}({\mathbb {S}}^{n-1}), \end{aligned}$$
(29)
where
is the n-sphere centred at the origin. Notice also that the \(\int _V \varvec{v}h(s)/s^{n-1} \text {d}\varvec{v} = \varvec{0}\) by symmetry. For the first moment, we calculate
$$\begin{aligned} \varvec{m}_p^1 = \int _V \varvec{v} u \text {d}\varvec{v} = \varvec{\Lambda }^1 \cdot \int _V \varvec{v}\varvec{v}^T h(s)/s^{n-1} \text {d}\varvec{v} = S^2_T \text {Vol}({\mathbb {V}}^{n})\varvec{\Lambda }^1, \end{aligned}$$
(30)
where \({\mathbb {V}}^n\) is the closure of
, i.e. the ball around the origin. Therefore, we can stipulate the form for \(u_{\text {min}}\) as
$$\begin{aligned} u_{\text {min}}(t, \varvec{x}, \varvec{v}) = \frac{m_p^0(t, \varvec{x}) h(s)}{s^{n-1}\text {Area}({\mathbb {S}}^{n-1})} + \frac{(\varvec{m}_p^1(t, \varvec{x}) \cdot \varvec{v}) h(s)}{S_T^2s^{n-1}\text {Vol}({\mathbb {V}}^n)}. \end{aligned}$$
(31)
We now approximate the second moment of p by the second moment of \(u_{\text {min}}\).
$$\begin{aligned} M^2(u_{\text {min}}) = \int _V \varvec{v}\varvec{v}^T u_{\text {min}}(t,\varvec{x},\varvec{v})\text {d}\varvec{v} = S_T^2 \frac{\text {Vol}({\mathbb {V}}^n)}{\text {Area}({\mathbb {S}}^{n-1})} I_n m_p^0(t, \varvec{x}) = \frac{S_T^2}{n}I_n m_p^0(t, \varvec{x}) . \end{aligned}$$
(32)
So in the above equations, we simply approximate \(\nabla _{\varvec{x}} \cdot M_p^2 \approx \frac{S_T^2}{n}\nabla _{\varvec{x}}m_p^0\).
Effective Diffusion Constant
Finally, we rescale our equations using the parabolic regime (Erban and Othmer 2004)
$$\begin{aligned} t = \hat{t}/\varepsilon ^2, \quad \varvec{x} = \hat{\varvec{x}} /\varepsilon , \end{aligned}$$
(33)
for arbitrary small parameter \(\varepsilon > 0\). By putting our variables into vectors \(\varvec{u} = (m_p^0, m_r^0)^T\) and \(\varvec{v}=(\varvec{m}_p^1,\varvec{m}_r^1)^T\), we drop the hats over the rescaled variables and rewrite our equations as
$$\begin{aligned} \varepsilon ^2 \frac{\partial }{\partial t} A\varvec{u} + \varepsilon F \nabla _{\varvec{x}}\cdot \varvec{v} = C\varvec{u}, \quad \varepsilon ^2 \frac{\partial }{\partial t} B\varvec{v} + \varepsilon \frac{S_T^2}{n}F \nabla _{\varvec{x}} \varvec{u} = D\varvec{v}, \end{aligned}$$
(34)
where \(\nabla _{\varvec{x}} \varvec{u} = [\nabla _{\varvec{x}}m_p^0,\nabla _{\varvec{x}}m_p^0]^T\) and \(\nabla _{\varvec{x}} \cdot \varvec{v} = [\nabla _{\varvec{x}}\cdot \varvec{m}_p^1,\nabla _{\varvec{x}}\cdot \varvec{m}_p^1]^T\). Our time derivative matrices are given by
$$\begin{aligned} A = \left[ \begin{array}{cc} 1 + \bar{\Phi }_\tau '(0) &{} - \bar{\Phi }_\omega '(0) \\ - \bar{\Phi }_\tau '(0) &{} 1 + \bar{\Phi }_\omega '(0) \\ \end{array} \right] , \quad B = \left[ \begin{array}{cc} 1 + \bar{\Phi }_\tau '(0) &{} - \psi _d\bar{\Phi }_\omega '(0) \\ - \bar{\Phi }_\tau '(0) &{} 1 + \bar{\Phi }_\omega '(0) \\ \end{array} \right] , \end{aligned}$$
(35)
our flux matrix is given as
$$\begin{aligned} F = \left[ \begin{array}{cc} 1 + \bar{\Phi }_\tau '(0) &{} 0 \\ - \bar{\Phi }_\tau '(0) &{} 0 \\ \end{array} \right] . \end{aligned}$$
(36)
Finally, our source terms are
$$\begin{aligned} C = \left[ \begin{array}{cc} - \bar{\Phi }_\tau (0) &{} \bar{\Phi }_\omega (0) \\ \bar{\Phi }_\tau (0) &{} -\bar{\Phi }_\omega (0) \\ \end{array}\right] , \quad D = \left[ \begin{array}{cc} - \bar{\Phi }_\tau (0) &{} \psi _d \bar{\Phi }_\omega (0) \\ \bar{\Phi }_\tau (0) &{} - \bar{\Phi }_\omega (0) \\ \end{array}\right] . \end{aligned}$$
(37)
By using the regular asymptotic expansion
$$\begin{aligned} \varvec{u} = \varvec{u}^0 + \varepsilon \varvec{u}^1 + \varepsilon ^2 \varvec{u}^2 + \cdots ,\quad \varvec{v} = \varvec{v}^0 + \varepsilon \varvec{v}^1 + \varepsilon ^2 \varvec{v}^2 + \cdots \end{aligned}$$
(38)
for \(\varvec{u}^j = (m_{p(j)}^0, m_{r(j)}^0)^T\) and \(\varvec{v}^j = (\varvec{m}_{p(j)}^1,\varvec{m}_{r(j)}^1)^T\), we obtain the set of equations
$$\begin{aligned} \begin{array}{ll} {\varepsilon ^0:} &{} C\varvec{u}^0 = \varvec{0} ,\quad D\varvec{v}^0 = \varvec{0}, \\ {\varepsilon ^1:} &{} F\nabla _{\varvec{x}}\cdot \varvec{v}^0 = C\varvec{u}^1 , \quad F\nabla _{\varvec{x}}\varvec{u}^0 = D\varvec{v}^1,\\ {\varepsilon ^2:} &{} \frac{\partial }{\partial t} A\varvec{u}^0 + F \nabla _{\varvec{x}}\cdot \varvec{v}^1 = C\varvec{u}^2 , \\ &{} \frac{\partial }{\partial t} B\varvec{v}^0 +\frac{S_T^2}{n}F \nabla _{\varvec{x}} \varvec{u}^1 = D\varvec{v}^2 . \end{array} \end{aligned}$$
(39)
Providing \(\psi _d \not = 1\), solving these in order gives rise to the differential equation for total density \(m^0 = m_{p(0)}^0 + m_{r(0)}^0\)
$$\begin{aligned} \frac{\partial }{\partial t} m^0 = D_{\text {eff}} \nabla _{\varvec{x}}^2 m^0, \end{aligned}$$
(40)
for
$$\begin{aligned} D_{\text {eff}} = \frac{S_T^2}{n}\frac{1}{\bar{\Phi }_\tau (0)}\frac{\bar{\Phi }_\omega (0)}{\bar{\Phi }_\omega (0) + \bar{\Phi }_\tau (0)} \frac{1 + \bar{\Phi }_\tau ' (0)(1-\psi _d)}{1 - \psi _d}. \end{aligned}$$
(41)
We now wish to find the values of \(\bar{\Phi }_\tau (0), \bar{\Phi }_\omega (0)\) and \( \bar{\Phi }_\tau '(0)\). For probability distributions defined over the positive numbers with pdf f(t), we see that the Laplace transform can be Taylor expanded as
$$\begin{aligned} \bar{f}(\lambda ) = 1 - \langle t \rangle \lambda + \frac{1}{2}\langle t^2\rangle \lambda ^2 - \cdots \end{aligned}$$
(42)
for small \(\lambda \). Therefore, by putting these terms into the expression \(\bar{\Phi }(\lambda )\) given by equation (3), provided that the first two moments are finite, we see that
$$\begin{aligned} \bar{\Phi }_i (0)= \lim _{\lambda \rightarrow 0}\bar{\Phi }_i(\lambda ) = \frac{1}{\mu _i}, \quad \bar{\Phi }_i '(0)= \lim _{\lambda \rightarrow 0}\bar{\Phi }_i'(\lambda ) = \frac{1}{2}\left( \frac{\sigma _i^2}{\mu _i^2} - 1\right) ,\quad \text {for } i=\tau , \omega , \end{aligned}$$
(43)
for mean \(\mu _i\) and variance \(\sigma _i^2\) of distribution \(i=\tau , \omega \), therefore
$$\begin{aligned} D_{\text {eff}}= \frac{S_T^2}{n}\frac{\mu _\tau ^2}{\mu _\tau + \mu _\omega } \left[ \frac{1}{1 - \psi _d} + \frac{1}{2}\left( \frac{\sigma _\tau ^2}{\mu _\tau ^2} - 1\right) \right] . \end{aligned}$$
(44)
It is noteworthy that the variance of the running time distribution contributes to the diffusion constant, whilst it is independent of the variance of the waiting time distribution. Therefore, up to a first-order approximation, the diffusion constant is only dependent on the mean of the waiting time distribution. Furthermore, when the running time distribution is exponentially distributed, the correction \(\bar{\Phi }_\tau '(0)\) is identically zero. So we can view our diffusion constant as the contribution from the exponential component of the running time distribution, plus an additional (non-Markovian) term for non-exponential running times.
When referring back to the experimental data, it can be seen that by the end of the 4 s, the E. coli has entered into the diffusive regime with \(D \approx 12.5\,(\mu \text {m})^2 / \text {s}\). The L. fuscus, however, is yet to reach this state; we can predict that when it does, the corresponding value of the diffusion constant will be \(D \approx 4.7\times 10^4\,(\text {km})^2 / \text {day}\), the solution of the MSD equations for greater time periods suggests that this is true.
Numerical Example
We now carry out a comparison between the underlying differential equation and Gillespie simulation. In Fig. 5, we see a comparison between slices of the solution to the diffusion equation on the \({\mathbb {R}}^2\) plane (\(n=2\)) for a delta function initial conditionFootnote 6 compared with data simulated using the algorithm given in Sect. 2.
For the Gillespie simulations, all sample paths are initialised at the origin with fixed speed equal to unity and uniformly random orientation. Therefore, all plots will have the parameters \(S_T^2 = 1, \psi _d = 0\), and we specify \(\mu _\tau = \mu _\omega = 1\). Plots are shown at \(t=100\).
The solid black line shows the solution to the diffusion equation for \(D_{\text {eff}} = 1/4\) along the line \(y=0\). In red asterisks \((*)\), we see the mean over \(3\times 10^5\) Gillespie simulations of the VJ process where both the running and waiting times are sampled from an exponential distribution, with the means of these distributions as stated. This process then has an effective diffusion constant of \(D_{\text {eff}} = 1/4\). Using a dashed black line, we plot the solution to the diffusion equation for \(D_{\text {eff}} = 1\). In green crosses \((\times )\), a VJ process where the running time is \(\tau \sim \text {Gamma}(1/7,7)\) distributed, giving \(\mu _\tau = 1\) and \(\sigma _\tau ^2 = 7\), the diffusion constant is therefore \(D_{\text {eff}} = 1\). The waiting time is \(\omega \sim \text {Gamma}(1/14, 14)\) distributed; the high variance of the waiting time is chosen such that the simulation relaxes towards the diffusion approximation quickly. For the above simulations, half the sample paths are initialised in a run and half are initialised in a rest. The gamma and exponential distributions are chosen to illustrate the importance of the non-Markovian term. This is indicated in Fig. 5 by the difference between the two simulations mentioned, which differ only in this correction term.
Another point of interest is that one can model distributions other than exponential with different means and still achieve the same effective diffusion constant through careful selection of variance. An example is shown in Fig. 5 where the diffusion constant \(D_{\text {eff}} = 1/4\) is recovered by changing the running distribution to \(\tau \sim \text {Gamma}(1/5, 5/2)\) (blue plusses). This then gives a mean run time of \(\mu _\tau = 1/2\) and variance \(\sigma _\tau ^2 = 5/4\) and compares well to the result for exponentially distributed \(\tau \) (red asterisks). For this simulation, 2 / 3 of the sample paths were initialised in a run and the remainder in a resting state so that the system was again encouraged to relax quickly. Viewing these cross sections, one should notice that the fit for the \(D_{\text {eff}}=1/4\) case is clearly much better than the fit for \(D_{\text {eff}}=1\). Considering equation (44), we suspect that these differences are due to the fact that the running distribution \(\tau \sim \text {Gamma}(1/5, 5/2)\) is closer to an exponential distribution, with a smaller non-Markovian contribution to the diffusion constant than the running distribution \(\tau \sim \text {Gamma}(1/7, 7)\).
Full heat map figures of the results are given in the supplementary material.