# Extreme Value Statistics and Arcsine Laws of Brownian Motion in the Presence
of a Permeable Barrier

Toby Kay1 and Luca Giuggioli1,2 1 Department of Engineering Mathematics,
University of Bristol, Bristol, BS8 1UB, United Kingdom  2 Bristol Centre for
Complexity Sciences, University of Bristol, Bristol, BS8 1UB, United Kingdom
<EMAIL_ADDRESS>
###### Abstract

The Arcsine laws of Brownian motion are a collection of results describing
three different statistical quantities of one-dimensional Brownian motion: the
time at which the process reaches its maximum position, the total time the
process spends in the positive half-space and the time at which the process
crosses the origin for the last time. Remarkably the cumulative probabilities
of these three observables all follows the same distribution, the Arcsine
distribution. But in real systems, space is often heterogeneous, and these
laws are likely to hold no longer. In this paper we explore such a scenario
and study how the presence of a spatial heterogeneity alters these Arcsine
laws. Specifically we consider the case of a thin permeable barrier, which is
often employed to represent diffusion impeding heterogeneities in physical and
biological systems such as multilayer electrodes, electrical gap junctions,
cell membranes and fragmentation in the landscape for dispersing animals.
Using the Feynman-Kac formalism and path decomposition techniques we are able
to find the exact time-dependence of the probability distribution of the three
statistical quantities of interest. We show that a permeable barrier has a
large impact on these distributions at short times, but this impact is less
influential as time becomes long. In particular, the presence of a barrier
means that the three distributions are no longer identical with symmetry about
their means being broken. We also study a closely related statistical
quantity, namely, the distribution of the maximum displacement of a Brownian
particle and show that it deviates significantly from the usual half-Gaussian
form.

  *

##  1 Introduction

Diffusion is ubiquitous, appearing as a transport mechanism in many physical,
chemical and biological systems. Often these systems are littered with spatial
heterogeneities which impede or hamper the diffusive motion. One of the most
common forms of these heterogeneities are permeable barriers, such that
diffusive particles either pass through or are reflected upon interaction with
the barrier. These barriers appear at various scales inhibiting diffusive
movement in many physical and biological contexts, from multilayer electrodes
[1, 2, 3] and water transport in rock pores [4] to drug delivery systems [5,
6]. Permeable material can be found in many examples in cell biology whose
function is to regulate the flux of biochemicals between spatial regions [7],
such as the bilayer plasma membrane of eukaryotes [8, 9, 10] and the
electrical gap junctions in neurons [11, 12]. As well as being prominent in
magnetic imaging techniques of water molecules diffusing through cellular
compartments [13, 14]. Permeable substances also present themselves at larger
scales such as heterogeneous landscapes, e.g. habitat type [15, 16] or the
presence of roads and fences [17], affecting the dispersal of animal movement
at ecological scales. All these examples make it apparent that it is necessary
to build a mathematical understanding of how the diffusive movement statistics
is affected by the presence of a permeable barrier. Here we do so by
investigating how the extreme value statistics (EVS) and the closely related
Arcsine laws of Brownian motion (BM) change with permeable barriers.

The celebrated Arcsine laws of BM are a landmark result from Lévy [18]
describing the probability distribution of three observables of a BM
trajectory, $x(\tau)$, starting at the origin, over a time interval
$\tau\in[0,t]$: (1.) $t_{m}(t)$, the time at which the trajectory reaches its
maximum value, $x(t_{m})=M$, (2.) $t_{r}(t)$, the total time the trajectory
spends in the positive region, $x(\tau)>0$, (3.) $t_{\ell}(t)$, the time at
which the trajectory crosses the origin for the last time. These quantities
are displayed for a sample BM trajectory in figure 1. The remarkable feature
of these quantities, $t_{m}(t)$, $t_{r}(t)$ and $t_{\ell}(t)$ is that they all
have the same cumulative distribution function [18, 19],

$\mathbb{P}[t_{i}(t)\leq\tau|x(0)=0]=\frac{2}{\pi}\arcsin\left(\sqrt{\frac{\tau}{t}}\right),$

for $i\in\\{m,r,\ell\\}$. Then the probability densities of these quantities
is given by,

$\mathcal{P}(t_{i},t|0)=\frac{1}{\pi\sqrt{t_{i}(t-t_{i})}},$ (1)

which displays the counterintuitive property that the density diverges at
$t_{i}=0$ and $t_{i}=t$, which means the value of $t_{i}$ is more likely to be
either extreme, with the mean, $t/2$, being the minimum.

The first Arcsine law in particular has gained a lot of interest due to its
prominent role in the field of extreme value statistics [20, 21], where one is
often interested in the maximum position, $M(t)$, as well as the time of this
event, $t_{m}(t)$. In this case the joint density is sought, which in the BM
case is given by [22],

$\mathcal{P}(M,t_{m},t|0)=\frac{M}{2\pi
Dt_{m}^{3/2}\sqrt{t-t_{m}}}e^{\frac{-M^{2}}{4Dt_{m}}},$ (2)

where $D$ is the diffusion constant. Marginalization over $M$ of equation (2)
recovers equation (1) whereas over $t_{m}$, the following half-Gaussian
distribution is found [21]

$\mathcal{P}(M,t|0)=\frac{e^{-\frac{M^{2}}{4Dt}}}{\sqrt{\pi Dt}}.$ (3)

Figure 1: Illustration of the three observables, time of maximum position
$x(t_{m})=M$, residence time in the positive half space, $t_{r}$, time of last
crossing of the origin, $t_{\ell}$, for a sample Brownian motion trajectory.

In recent literature there has been a large effort to extend these EVS and
Arcsine laws to when the underlying stochastic process is not the simple BM.
EVS studies include, various generalizations of BM [22, 23, 24, 25, 26, 27,
28, 29, 30, 31, 32, 33], as well as other stochastic processes such as Bessel
[22], Lévy flights [34, 35], random acceleration [36, 37] and run-and-tumble
[38, 39, 40, 41]. More recently, the time between the maximum and minimum of a
stochastic process has been studied as well [42, 43]. In addition, the other
two Arcsine laws have been studied, together or separately, in numerous
contexts, such as constrained and resetting BM [24, 44], BM in random mediums
[45], bounded regions [46, 47, 48], and with spatial and temporal
heterogeneity [29, 49], as well as other stochastic processes such as
continuous time random walks [50], random acceleration [51], run-and-tumble
[38], fractional BM [33] and subdiffusion [52, 53]. Despite this vast
literature no such study on EVS and Arcsine laws of Brownian motion in the
presence of permeable barriers has appeared. Here we provide the first such
study.

The paper is structured as follows. In section 2 we introduce the key
equations in modelling diffusion in the presence of permeable barriers. In
section 3 we derive the joint density of $M(t)$ and $t_{m}(t)$ and study the
marginal densities. Section 4 and 5 are devoted to the density of $t_{r}(t)$
and $t_{\ell}(t)$, respectively, while we summarize our work in section 6.

##  2 Diffusion through Permeable Barriers

We consider a Brownian particle, $x(t)$, undergoing diffusion in one dimension
in the presence of a permeable barrier at the origin. Classically, this has
been modelled by the diffusion equation (DE) along with the following
permeable barrier condition (PBC) [54, 55],

$J(0^{\pm},t)=\kappa[P(0^{-},t)-P(0^{+},t)],$ (4)

where $P(x,t)$ represents the probability density of the position of the
Brownian particle at time $t$, with $J(x,t)=-D\partial_{x}P(x,t)$ being the
probability current and the parameter $\kappa$ representing the permeability
of the barrier, respectively, with $\kappa\to 0$ representing an impenetrable
barrier (reflecting boundary) and no barrier when $\kappa\to\infty$. The
notation $0^{\pm}$ indicates the right or left-hand side of the permeable
barrier, respectively.

As the DE with condition (4) does not lend itself to study quantities other
than $P(x,t)$ the present authors have introduced a new fundamental equation
[56] with which one reformulates the problem in terms of a modified DE that
accounts for the PBC in an inhomogeneous term (taken here at the origin for
simplicity),

$\frac{\partial P(x,t)}{\partial t}=D\frac{\partial^{2}P(x,t)}{\partial
x^{2}}+\frac{D}{\kappa}\delta^{\prime}(x)J(0,t),$ (5)

where $\delta^{\prime}(x)$ represents the derivative of the Dirac-$\delta$
function. The convenience of equation (5) is that for any initial condition
localized at $x_{0}$, $P(x,0)=\delta(x-x_{0})$ can be solved exactly in the
Laplace domain as [56]

$\widetilde{P}(x,\epsilon|x_{0})=\widetilde{G}_{0}(x,\epsilon|x_{0})-\partial_{x_{0}}\widetilde{G}_{0}(x,\epsilon|0)\frac{\widetilde{J}_{0}(0,\epsilon|x_{0})}{\frac{\kappa}{D}+\partial_{x_{0}}\widetilde{J}_{0}(0,\epsilon|0)},$
(6)

in terms of the Green’s function of Brownian motion in the absence of a
permeable barrier,
$G_{0}(x,t|x_{0})=\exp\left\\{-(x-x_{0})^{2}/4Dt\right\\}/\sqrt{4\pi Dt}$.
Generalizations to the case when an external potential is present are also
possible with $G_{0}(x,t|x_{0})$ becoming the Green’s function of the
associated Smoluchowski equation. In equation (6) we have used the Laplace
variable $\epsilon$ to indicate that for an arbitrary time-dependent function,
$f(t)$, has its Laplace transformed expression given by
$\widetilde{f}(\epsilon)=\int_{0}^{\infty}e^{-\epsilon t}f(t)dt$. The notation
$P(x,t|x_{0})$ indicates the localized initial condition at $x_{0}$ and
$J_{0}(x,t|x_{0})=-D\partial_{x}G_{0}(x,t|x_{0})$ is defined as the free
probability current where $\partial_{x_{0}}\widetilde{G}_{0}(x,\epsilon|0)$
implies $\frac{\partial}{\partial
x_{0}}\widetilde{G}_{0}(x,\epsilon|x_{0})|_{x_{0}=0}$.

Further convenience in employing the formalism associated with equation (5) is
due to the ability to write an equivalent Fokker-Planck (FP) representation,
namely the homogeneous (Itô) FP equation [56],
$\partial_{t}P(x,t)=L_{x}P(x,t)$ where
$L_{x}=-\partial_{x}A(x)+\partial_{x}^{2}B(x)$ is the Fokker-Planck operator,
with the spatially dependent drift and diffusion coefficients given by
$A(x)=-(D^{2}/\kappa)\delta^{\prime}(x)$ and $B(x)=D-(D^{2}/\kappa)\delta(x)$.
As will become apparent later, we are mainly interested in the backward FP
(Kolmogorov) equation in terms of the initial variables, $t_{0}$ and $x_{0}$,
$-\partial_{t_{0}}P(x_{0},t_{0})=L_{x_{0}}^{\dagger}P(x_{0},t_{0})$, where
$L^{\dagger}_{x}$ is the formal adjoint of the Fokker-Planck operator i.e.
$L^{\dagger}_{x}=A(x)\partial_{x}+B(x)\partial_{x}^{2}$. For
$P(x_{0},t_{0}=0)=\delta(x-x_{0})$ and exploiting the time homogeneity of the
process, we have [57]

$\frac{\partial}{\partial t}P(x,t|x_{0})=A(x_{0})\frac{\partial}{\partial
x_{0}}P(x,t|x_{0})+B(x_{0})\frac{\partial^{2}}{\partial
x_{0}^{2}}P(x,t|x_{0}).$ (7)

As was shown in Ref. [56], $L$ is infact self-adjoint, such that the backward
FP equation, is given by

$\frac{\partial P(x,t|x_{0})}{\partial
t}=D\frac{\partial^{2}P(x,t|x_{0})}{\partial
x_{0}^{2}}-\frac{D^{2}}{\kappa}\delta^{\prime}(x_{0})\partial_{x_{0}}P(x,t|0),$
(8)

which implies that we can solve equation (8) through the same procedure for
which we obtain equation (6).

##  3 Extreme value $M$ and Time to Reach Maximum $t_{m}$

###  3.1 Joint Probability Density $\mathcal{P}(M,t_{m},t|0^{\pm})$

We study the time-dependent joint distribution,
$\mathcal{P}(M,t_{m},t|x_{0})$, of the maximum position $M=x(t_{m})$ and the
time $t_{m}$ at which this occurs for a Brownian particle in the presence of a
permeable barrier at the origin. Since we consider the particle starting from
$x_{0}=0$ the presence of the permeable barrier leads to two different joint
densities $\mathcal{P}(M,t_{m},t|0^{+})$ and $\mathcal{P}(M,t_{m},t|0^{-})$.

To find these joint densities we proceed by using a path decomposition
approach [24, 36, 29, 27], where we exploit the Markovian nature of the
process to split the trajectories of the Brownian particle into two parts. The
first part is $\\{x(\tau):\tau\in[0,t_{m}]\\}$ and the second part is
$\\{x(\tau):\tau\in[t_{m},t]\\}$, see figure 1. Clearly the first part of the
trajectory can be expressed as the probability of reaching $M$ for the first
time at $t_{m}$, which is the first-passage time distribution
$\mathcal{F}(M,t_{m}|0^{\pm})$. The second part is the probability that the
particle starting at $M$ does not reach this position again in the remaining
time, this is the survival probability $S(M,t-t_{m}|M)$. As
$S(M,t-t_{m}|M)=0$, we remedy this by using the quantity
$S(M+\varepsilon,t-t_{m}|M)$ and taking $\varepsilon\to 0^{+}$ [24, 29].

We now proceed to find the two quantities, $\mathcal{F}(x,t|x_{0})$ and
$S(x,t|x_{0})$. This calculation was performed in detail in Ref. [56], where
using equation (8) a backward equation was found for $S(x,t|x_{0})$, which was
used to find $\mathcal{F}(x,t|x_{0})$ in the Laplace domain through
$\widetilde{\mathcal{F}}(x,\epsilon|x_{0})=1-\epsilon\widetilde{S}(x,\epsilon|x_{0})$:

$\widetilde{\mathcal{F}}(x,\epsilon|x_{0})=\left\\{\begin{array}[]{ll}\frac{2\kappa
e^{-|x-x_{0}|\sqrt{\frac{\epsilon}{D}}}}{\sqrt{D\epsilon}\left[1+e^{-2|x|\sqrt{\frac{\epsilon}{D}}}\right]+2\kappa},\
x_{0}<0<x\ \ \mathrm{or}\ \ x<0<x_{0},\\\
\frac{\left[\sqrt{D\epsilon}+2\kappa\right]e^{-|x-x_{0}|\sqrt{\frac{\epsilon}{D}}}+\sqrt{D\epsilon}e^{-|x+x_{0}|\sqrt{\frac{\epsilon}{D}}}}{\sqrt{D\epsilon}\left[1+e^{-2|x|\sqrt{\frac{\epsilon}{D}}}\right]+2\kappa},\
0<x_{0}<x\ \ \mathrm{or}\ \ x<x_{0}<0.\end{array}\right.$ (9)

We now proceed to calculate the joint distributions for $x_{0}=0^{\pm}$.

#### Case $x_{0}=0^{+}$.

The joint distribution is given by

$\mathcal{P}(M,t_{m},t|0^{+})=\lim_{\varepsilon\to
0^{+}}\frac{\mathcal{F}(M,t_{m}|0^{+})S(M+\varepsilon,t-t_{m}|M)}{N(\varepsilon)},$
(10)

where $N(\varepsilon)$ ensures the quantity is normalized, alternatively after
Laplace transforming with respect to $t_{m}$ and $t$ ($t_{m}\to p$ and
$t\to\epsilon$) we have,

$\displaystyle\widetilde{Q}_{m}(M,p,\epsilon|0^{+})=\lim_{\varepsilon\to
0^{+}}\frac{1}{N(\varepsilon)}\int_{0}^{\infty}dt_{m}e^{-pt_{m}}\mathcal{F}(M,t_{m}|0^{+})$
(11) $\displaystyle\times\int_{0}^{\infty}dte^{-\epsilon
t}S(M+\varepsilon,t-t_{m}|M)=\lim_{\varepsilon\to
0^{+}}\frac{\widetilde{\mathcal{F}}(M,p+\epsilon|0^{+})\widetilde{S}(M+\varepsilon,\epsilon|M)}{N(\varepsilon)},$

where we have used the notation
$Q_{m}(M,p,t|0^{\pm})=\int_{0}^{\infty}dt_{m}e^{-pt_{m}}\mathcal{P}(M,t_{m},t|0^{\pm})$.

Expanding $\widetilde{S}(M+\varepsilon,\epsilon|M)$ to first order in
$\varepsilon$, we have
$\widetilde{S}(M+\varepsilon,\epsilon|M)\simeq-\varepsilon\lim_{x\to
M}\partial_{x}\widetilde{\mathcal{F}}(x,\epsilon|M)/\epsilon$ and requiring
$\mathcal{P}(M,t_{m},t|0^{\pm})$ to be normalized, namely,
$\int_{0}^{\infty}\widetilde{Q}_{m}(M,0,\epsilon|0^{\pm})dM=\epsilon^{-1}$, we
find $N(\varepsilon)=\varepsilon$, and then obtain

$\displaystyle\widetilde{Q}_{m}(M,p,\epsilon|0^{+})$ (12)
$\displaystyle=\frac{2e^{M\sqrt{\frac{p+\epsilon}{D}}}\left(e^{2M\sqrt{\frac{\epsilon}{D}}}\left(\sqrt{D\epsilon}+2\kappa\right)-\sqrt{D\epsilon}\right)\left(\sqrt{D(p+\epsilon)}+\kappa\right)}{\sqrt{D\epsilon}\left(e^{2M\sqrt{\frac{\epsilon}{D}}}\left(\sqrt{D\epsilon}+2\kappa\right)+\sqrt{D\epsilon}\right)\left(e^{2M\sqrt{\frac{p+\epsilon}{D}}}\left(\sqrt{D(p+\epsilon)}+2\kappa\right)+\sqrt{D(p+\epsilon)}\right)}.$

One can see from equation (12) that in the no barrier limit,
$\kappa\to\infty$, equation (12) correctly reduces to
$\widetilde{Q}_{m}(M,p,\epsilon|0)=e^{-M\sqrt{(p+\epsilon)/D}}/\sqrt{D\epsilon}$,
giving equation (2) after the double Laplace inversion.

Similarly, in the limit of the barrier becoming impermeable, $\kappa\to 0$, we
find,

$\widetilde{Q}_{m}(M,p,\epsilon|0^{+})=\frac{\tanh\left(M\sqrt{\frac{\epsilon}{D}}\right)\mathrm{sech}\left(M\sqrt{\frac{p+\epsilon}{D}}\right)}{\sqrt{D\epsilon}}$
(13)

after using the following inverse Laplace transform relations:
$\mathcal{L}^{-1}_{\epsilon\to
t}\left\\{\epsilon^{-1/2}\tanh(a\sqrt{\epsilon})\right\\}=\vartheta_{4}(0,e^{-a^{2}/t})/\sqrt{\pi
t}$ and $\mathcal{L}^{-1}_{\epsilon\to
t}\left\\{\mathrm{sech}(a\sqrt{\epsilon})\right\\}=a\vartheta_{1}^{\prime}(0,e^{-a^{2}/t})/\sqrt{4\pi
t^{3}}$ [58], equation (13) becomes,

$\mathcal{P}(M,t_{m},t|0^{+})=\frac{M\vartheta_{1}^{\prime}\left(0,e^{-\frac{M^{2}}{Dt_{m}}}\right)\vartheta_{4}\left(0,e^{-\frac{M^{2}}{D(t-t_{m})}}\right)}{2\pi
Dt_{m}^{3/2}\sqrt{t-t_{m}}},$ (14)

where
$\vartheta_{1}(z,q)=\sum_{n=-\infty}^{\infty}(-1)^{n-1/2}q^{(n+\frac{1}{2})^{2}}e^{(2n+1)iz}$
and $\vartheta_{4}(z,q)=\sum_{n=-\infty}^{\infty}(-1)^{n}q^{n^{2}}e^{2niz}$
are the Jacobi Theta functions and $\vartheta_{n}^{\prime}(z,q)$ represent the
derivative with respect to $z$ [59].

Interestingly, if we take the small $t$ limit of
$\mathcal{P}(M,t_{m},t|0^{+})$, which corresponds to $\epsilon,p\to\infty$ in
the Laplace domain for equation (12), we obtain to leading order equation
(13). This implies that for $t\to 0$ the permeable barrier acts as if it is
fully reflecting. This can be understood by considering for very small times
the particle does not have enough time to interact with the barrier and pass
through, meaning that essentially no trajectories reach the other side of the
barrier.

Although the double inverse Laplace transform of equation (12) for arbitrary
$\kappa$ looks highly non-trivial, significant ground can be made (see B). We
find $\mathcal{P}(M,t_{m},t|0^{+})$ in terms of two different scaling
functions such that,

$\mathcal{P}(M,t_{m},t|0^{+})=\frac{\kappa^{3}}{D^{2}}\mathdutchcal{G}^{+}\left(\frac{\kappa}{D}M,\frac{\kappa^{2}}{D}t_{m}\right)\mathdutchcal{H}\left(\frac{\kappa}{D}M,\frac{\kappa^{2}}{D}(t-t_{m})\right),$
(15)

where,

$\mathdutchcal{G}^{+}(y,\tau_{1})=\frac{1}{\pi}\int_{0}^{\infty}e^{-\tau_{1}z}\sin(y\sqrt{z})h(y,z)dz,$
(16)

and

$\mathdutchcal{H}(y,\tau_{2})=\frac{4}{\pi}\int_{0}^{\infty}\frac{e^{-\tau_{2}z}}{\sqrt{z}}h(y,z)dz,$
(17)

with

$h(y,z)=\left[2+z+z\cos(2y\sqrt{z})+2\sqrt{z}\sin(2y\sqrt{z})\right]^{-1}.$
(18)

From equation (15) one can see we no longer have the transformation symmetry
of $t_{m}\to t-t_{m}$, meaning the symmetry about $t/2$ that one observes in
the barrier free case, equation (2), is broken.

#### Case $x_{0}=0^{-}$.

For $x_{0}=0^{-}$ we have the added complexity that there is a chance the
particle will not cross the barrier throughout the whole time period. The
probability of this occurring is given by (from equation (9))

$S(0^{\pm},t|0^{\mp})=e^{\frac{\kappa^{2}t}{D}}\mathrm{erfc}\left(\kappa\sqrt{\frac{t}{D}}\right),$
(19)

where $\mathrm{erfc}(z)=1-\mathrm{erf}(z)$ where
$\mathrm{erf}(z)=(2/\sqrt{\pi})\int_{0}^{z}due^{-u^{2}}$. This means that the
maximum position is the origin and it occurs at time $t_{m}=0$. Then from
equation (10) we have,

$\mathcal{P}(M,t_{m},t|0^{-})=\lim_{\varepsilon\to
0^{+}}\frac{1}{N(\varepsilon)}\big{[}\mathcal{F}(M,t_{m}|0^{-})S(M+\varepsilon,t-t_{m}|M)\\\
+S(0^{+},t|0^{-})\delta(M)\delta(t_{m})\big{]}.$ (20)

Similar to equation (11) we perform a double Laplace transform and obtain

$\widetilde{Q}_{m}(M,p,\epsilon|0^{-})=\lim_{\varepsilon\to
0^{+}}\frac{1}{N(\varepsilon)}\big{[}\widetilde{\mathcal{F}}(M,p+\epsilon|0^{-})\widetilde{S}(M+\varepsilon,\epsilon|M)+\widetilde{S}(0^{+},\epsilon|0^{-})\delta(M)\big{]}.$
(21)

Expanding to first order in $\varepsilon$ and ensuring normalization we once
again find $N(\varepsilon)=\varepsilon$, leading to

$\widetilde{Q}_{m}(M,p,\epsilon|0^{-})=\frac{\kappa}{\sqrt{D(p+\epsilon)}+\kappa}\widetilde{Q}_{m}(M,p,\epsilon|0^{+})+\frac{D\delta(M)}{\kappa\sqrt{D\epsilon}+D\epsilon}.$
(22)

As in equation (12) one can see in the limit $\kappa\to\infty$ equation (22)
reduces to the barrier free case, equation (2). In the fully reflecting limit
$\kappa\to 0$ one recovers
$\mathcal{P}(M,t_{m},t|0^{-})=\delta(M)\delta(t_{m})$, since no particles pass
through, meaning the maximum position will be at the origin being reached
instantly. As in the $x_{0}=0^{+}$ case, we see from equation (22) that in
short time limit one recovers the fully reflecting limit up to leading order
in $t_{m}$. However, using $\widetilde{Q}_{m}(M,p,\epsilon|0^{+})$ for
$p,\epsilon\to\infty$, equation (13), we find a better approximation

$\widetilde{Q}_{m}(M,p,\epsilon|0^{-})\simeq\frac{\kappa\tanh\left(M\sqrt{\frac{\epsilon}{D}}\right)\mathrm{sech}\left(M\sqrt{\frac{p+\epsilon}{D}}\right)}{D\sqrt{(p+\epsilon)\epsilon}}+\left(\frac{1}{\epsilon}-\frac{\kappa}{\sqrt{D\epsilon^{3}}}\right)\delta(M),$
(23)

which after using $\mathcal{L}^{-1}_{\epsilon\to
t}\left\\{\epsilon^{-1/2}\mathrm{sech}(a\sqrt{\epsilon})\right\\}=\theta(e^{-a^{2}/t})/\sqrt{\pi
t}$ [58], equation (23) becomes

$\mathcal{P}(M,t_{m},t|0^{-})\simeq\frac{\kappa\theta\left(e^{-\frac{M^{2}}{Dt_{m}}}\right)\vartheta_{4}\left(0,e^{-\frac{M^{2}}{D(t-t_{m})}}\right)}{\pi
D\sqrt{t_{m}(t-t_{m})}}+\left(1-\frac{2\kappa\sqrt{t}}{\sqrt{\pi
D}}\right)\delta(M)\delta(t_{m}),$ (24)

where $\theta(q)=\sum_{n=0}^{\infty}(-1)^{n}q^{(n+\frac{1}{2})^{2}}$.

Now we perform the double inverse Laplace transform of Eq. (22) to obtain (see
B)

$\displaystyle\mathcal{P}(M,t_{m},t|0^{-})$
$\displaystyle=\frac{\kappa^{3}}{D^{2}}\mathdutchcal{G}^{-}\left(\frac{\kappa}{D}M,\frac{\kappa^{2}}{D}t_{m}\right)\mathdutchcal{H}\left(\frac{\kappa}{D}M,\frac{\kappa^{2}}{D}(t-t_{m})\right)$
$\displaystyle+\frac{\kappa^{3}}{D^{2}}\mathdutchcal{I}\left(\frac{\kappa}{D}M,\frac{\kappa^{2}}{D}t_{m},\frac{\kappa^{2}}{D}(t-t_{m})\right)$

where
$\mathdutchcal{I}(y,\tau_{1},\tau_{2})=e^{\tau_{2}}\mathrm{erfc}(\sqrt{\tau_{2}})\delta(y)\delta(\tau_{1})$,
$\mathdutchcal{H}(y,\tau_{2})$ is defined in equation (17) and

$\mathdutchcal{G}^{-}(y,\tau_{1})=\int_{0}^{\infty}\frac{e^{-\tau_{1}z}}{\pi}\left(\sin(y\sqrt{z})+\sqrt{z}\cos(y\sqrt{z})\right)h(y,z)dz,$
(26)

where $h(y,z)$ is defined in equation (18). Again we see the $t_{m}\to
t-t_{m}$ symmetry breaking as in the $x_{0}=0^{+}$ case.

###  3.2 Marginal Density $\mathcal{P}(M,t|0^{\pm})$

To find the marginal density $\mathcal{P}(M,t|0^{\pm})$ one integrates over
$t_{m}$, i.e. $p\to 0$ in equations (12) and (22) and after taking the double
Laplace inverse (see C) we get

$\mathcal{P}(M,t|0^{\pm})=\frac{\kappa}{D}\mathcal{I}^{\pm}\left(\frac{\kappa}{D}M,\frac{\kappa^{2}}{D}t\right)$
(27)

where

$\mathcal{I}^{+}(y,\tau)=\frac{1}{\pi}\int_{0}^{\infty}\frac{e^{-\tau
z}}{\sqrt{z}}j^{+}(y,z)h^{2}(y,z)dz,$ (28)

and

$\mathcal{I}^{-}(y,\tau)=\frac{1}{\pi}\int_{0}^{\infty}\frac{e^{-\tau
z}}{\sqrt{z}}j^{-}(y,z)h^{2}(y,z)dz+e^{\tau}\mathrm{erfc}(\sqrt{\tau})\delta(y),$
(29)

with $j^{\pm}(y,z)$ defined in equations (79) and (81) and $h(y,z)$ defined in
equation (18). We have verified that in the barrier free case
($\kappa\to\infty$) one recovers equation (3).

From equations (27), (28) and (29), we find that for $t>>D/\kappa^{2}$ with
$M\sim D/\kappa$, the integrands in (28) and (29) are dominated by small $z$,
so we expand $j^{\pm}(y,z)h^{2}(y,z)$ to first order in $z$ and then compute
the integral to obtain,

$\mathcal{P}(M,t|0^{+})\simeq\frac{4\kappa D(\kappa
t-2M)-\kappa^{2}M^{2}-2D^{2}}{4\sqrt{\pi}\kappa^{2}(Dt)^{3/2}}$ (30)

and

$\mathcal{P}(M,t|0^{-})\simeq\frac{4\kappa D(\kappa
t-\frac{5}{2}M)-\kappa^{2}M^{2}-6D^{2}}{4\sqrt{\pi}\kappa^{2}(Dt)^{3/2}}+\frac{\delta(M)}{\kappa\sqrt{\pi
Dt}}.$ (31)

Equations (30) and (31) should be compared with the barrier free case,
$\mathcal{P}(M,t|0)\simeq(Dt-M^{2}/4)/\sqrt{\pi D^{3}t^{3}}$.

We plot equation (27) in figure 2 for the two initial conditions,
$x_{0}=0^{\pm}$ whilst varying the dimensionless parameter, $\kappa^{2}t/D$,
and compare to stochastic simulations. One can see for certain parameter
values, namely for small permeabilities, the distributions become non-
monotonic, and we have a bi-modal shape. In the $x_{0}=0^{+}$ case this
feature can be explained by considering for small $\kappa$, the particle is
unlikely to pass through the barrier and thus being more likely to move away
from the barrier leading to a maximum occurring for $M>0$. Whereas the peak at
the origin is caused by the particle managing to pass through the barrier but
never returning. The presence of a local minimum near $M=0$ is thus caused by
the less likely scenario in which the particle stays near the barrier,
constantly interacting with it, but without venturing too far from the origin.
The case $x_{0}=0^{-}$ can be explained similarly except there is a non-zero
probability that the particle never crosses the barrier leading to the global
maximum always occurring at the origin (the Dirac-$\delta$ function).

(a)  (b)

Figure 2: Maximum position density, $\mathcal{P}(M,t|0^{\pm})$, where a
permeable barrier has been placed at the origin. Two distinct initial
positions are considered, (a) $x_{0}=0^{+}$ and (b) $x_{0}=0^{-}$, for
different values of the dimensionless parameter $\kappa^{2}t/D$, all other
quantities are in arbitrary units. Markers represent stochastic simulations.
The inset in figure (b) shows the presence of the Dirac-$\delta$ from
simulations (the analytic Dirac-$\delta$ is omitted from the plot).

###  3.3 Marginal Density $\mathcal{P}(t_{m},t|0^{\pm})$

Here we consider the marginal density
$\mathcal{P}(t_{m},t|0^{\pm})=\int_{0}^{\infty}\mathcal{P}(M,t_{m},t|0^{\pm})dM$,
where from equations (15) and (3.1), we obtain the scaling relation,

$\mathcal{P}(t_{m},t|0^{\pm})=\frac{\kappa^{2}}{D}\mathdutchcal{F}^{\pm}_{m}\left(\frac{\kappa^{2}}{D}t_{m},\frac{\kappa^{2}}{D}(t-t_{m})\right),$
(32)

where

$\mathdutchcal{F}^{\pm}_{m}(\tau_{1},\tau_{2})=\int_{0}^{\infty}\mathdutchcal{G}^{\pm}(y,\tau_{1})\mathdutchcal{H}(y,\tau_{2})dy.$
(33)

The integral in equation (33) is hard to compute, but we can study the
asymptotic forms of $\mathdutchcal{F}^{\pm}_{m}(\tau_{1},\tau_{2})$. Firstly,
we study the short time asymptotics, $t<<D/\kappa^{2}$, which can be
approximated by the marginal over $M$ of equations (14) and (24). By using the
series form of the Jacobi theta functions and integrating over we have

$\displaystyle\mathdutchcal{F}_{m}^{+}(\tau_{1},\tau_{2})$
$\displaystyle\simeq\sum_{n=-\infty}^{\infty}\sum_{m=-\infty}^{\infty}\frac{(-1)^{m+n}(2n+1)\sqrt{\tau_{2}}}{\pi\sqrt{\tau_{1}}\left(4m^{2}\tau_{1}+(2n+1)^{2}\tau_{2}\right)}$
$\displaystyle=\sum_{n=-\infty}^{\infty}\frac{(-1)^{n}\mathrm{cosech}\left((n+\frac{1}{2})\pi\sqrt{\frac{\tau_{2}}{\tau_{1}}}\right)}{2\tau_{1}},$

where we used
$\sum_{m=-\infty}^{\infty}(-1)^{m}(m^{2}+z)^{-1}=\pi\mathrm{cosech}(\pi\sqrt{z})z^{-1/2}$.
And,

$\mathdutchcal{F}_{m}^{-}(\tau_{1},\tau_{2})\simeq\sum_{n=-\infty}^{\infty}\sum_{m=-\infty}^{\infty}(-1)^{m+n}(4\pi
m^{2}\tau_{1}+(2n+1)^{2}\pi\tau_{2})^{-1/2}.$ (35)

Now we study the long time asymptotics of $\mathcal{P}(t_{m},t|0^{\pm})$,
which corresponds to $t>>D/\kappa^{2}$. We find it more convenient to do this
in the Laplace domain, where we use equations (12) and (22). There are two
regimes which give the full picture of the asymptotics for $t\to\infty$:
keeping $t_{m}$ finite in the first regime and keeping $t-t_{m}$ finite in the
second. This corresponds to $\epsilon\to 0$ with $p>>\epsilon$ and
$p\sim\epsilon$ in the Laplace domain, respectively. Expanding around
$\epsilon,p\to 0$ to leading order in equations (12) and (22) and integrating
over $M$ one can see that we obtain,
$Q_{m}(p,\epsilon|0^{\pm})=1/\sqrt{\epsilon(p+\epsilon)}$, which after double
inverse Laplace transforming recovers the Arcsine distribution, (1). For the
case $p>>\epsilon$, let us expand $\widetilde{Q}_{m}(p,\epsilon|0^{+})$ around
$\epsilon\to 0$ keeping $p$ finite, then we find

$\widetilde{Q}_{m}(p,\epsilon|0^{+})\simeq\frac{2(\sqrt{Dp}+\kappa)}{\sqrt{D\epsilon}}\int_{0}^{\infty}\frac{e^{-M\sqrt{\frac{p}{D}}}}{\sqrt{Dp}\left(1+e^{-M\sqrt{\frac{p}{D}}}\right)+2\kappa}dM,$
(36)

which gives after performing the integral and inverse Laplace transforming
with respect to $\epsilon$,

$Q_{m}(p,t|0^{+})\simeq\frac{2\left(\sqrt{Dp}+\kappa\right)\mathrm{arctan}\left(\frac{(Dp)^{1/4}}{(\sqrt{Dp}+2\kappa)^{1/2}}\right)}{\sqrt{\pi
t}(Dp)^{1/4}\left[p\left(\sqrt{Dp}+2\kappa\right)\right]^{1/2}}.$ (37)

Since equation (37) is very difficult invert, we can investigate the
asymptotic dependence for $t_{m}\to 0$. This corresponds to $p\to\infty$, thus
by expanding Eq. (37) to leading order for $p\to\infty$ and using
$\mathrm{arctan}(1)=\pi/4$, we find
$Q_{m}(p,t|0^{+})\sim\frac{\sqrt{\pi}}{2\sqrt{pt}}$, and performing the
Laplace inversion with respect to $p$ we get,

$\mathcal{P}(t_{m},t|0^{+})\sim\frac{1}{2\sqrt{t_{m}t}}\ \mathrm{for}\
t_{m}\to 0,\ t\to\infty.$ (38)

For the case $x_{0}=0^{-}$, using equation (22), we find,

$\mathcal{P}(t_{m},t|0^{-})\sim\frac{\sqrt{\pi}\kappa}{2\sqrt{Dt}}+\frac{\sqrt{D}}{\kappa\sqrt{\pi
t}}\delta(t_{m})\ \mathrm{for}\ t_{m}\to 0,\ t\to\infty.$ (39)

It is clear that equations (38) and (39) deviate from the Arcsine law, $\sim
1/\pi(t_{m}t)^{-1/2}$, showing the permeable barrier has an influence for
$t\to\infty$ when $t_{m}$ is finite. And for the $x_{0}=0^{-}$ case the
singularity at $t_{m}\to 0$ is provided by the Dirac-$\delta$ function.

(a)  (b)

Figure 3: Time of maximum position density, $\mathcal{P}(t_{m},t|0^{\pm})$,
where a permeable barrier has been placed at the origin. Two distinct initial
positions are considered, (a) $x_{0}=0^{+}$ and (b) $x_{0}=0^{-}$, for
different values of the dimensionless parameter $\kappa^{2}t/D$, all other
quantities are in arbitrary units. Markers represent stochastic simulations.
The inset in figure (b) shows the presence of the Dirac-$\delta$ from
simulations (the analytic Dirac-$\delta$ is omitted from the plot). The
parameter values for each curve are the same as in figure 2 (a).

We plot equation (32) in figure 3 to show the excellent match to simulations.
One can see that for the different initial conditions $x_{0}=0^{\pm}$,
$\mathcal{P}(t_{m},t|0^{\pm})$ has two different shapes. When $x_{0}=0^{+}$
and for small permeabilities one can see the minimum of the distribution is
just after $t_{m}=0$, which is due to the small likelihood of the particle
reaching its maximum and then passing through the barrier and never returning.
The peak at $t_{m}=0$ indicates the particle instantly crosses the barrier and
never returns. For $x_{0}=0^{-}$ and for small permeabilities the distribution
is strongly weighted by the Dirac-$\delta$ function indicating the particle
never crosses the barrier. However, if the barrier is crossed, it is very
unlikely for the particle to cross again meaning it is more likely to reach
the maximum at $t_{m}=t$.

##  4 Residence Time in Positive Half-Space $t_{r}$

Here we study the second Arcsine law, namely the residence time the particle,
starting at the origin, spends in the region $x>0$ when a permeable barrier is
placed at the origin. Once again, due to the presence of this permeable
barrier, we have two distinct initial positions, $x_{0}=0^{+}$ and
$x_{0}=0^{-}$. To proceed we utilize the fact that the residence time can be
written as the functional,
$t_{r}(t)=\int_{0}^{t}\Theta(x(t^{\prime}))dt^{\prime}$, where $\Theta(z)$ is
the Heaviside step function. From Feynman-Kac theory [60, 61], we know that
$Q_{r}(p,t|x_{0})=\int_{0}^{\infty}e^{-pt_{r}}\mathcal{P}(t_{r},t|x_{0})dt_{r}=\left\langle
e^{-pt_{r}(t)}\Big{|}x_{0}=x(0)\right\rangle$ satisfies the following backward
Feynman-Kac equation,

$\frac{\partial Q_{r}(p,t|x_{0})}{\partial t}=A(x_{0})\frac{\partial
Q_{r}(p,t|x_{0})}{\partial
x_{0}}+B(x_{0})\frac{\partial^{2}Q_{r}(p,t|x_{0})}{\partial
x_{0}^{2}}-p\Theta(x_{0})Q_{r}(p,t|x_{0}),$ (40)

where we use the backward Fokker-Planck operator in equation (7). Using the
self-adjoint nature of this backward Fokker-Planck operator, we may write
equation (40) as

$\frac{\partial Q_{r}(p,t|x_{0})}{\partial
t}=D\frac{\partial^{2}Q_{r}(p,t|x_{0})}{\partial
x_{0}^{2}}-p\Theta(x_{0})Q_{r}(p,t|x_{0})-\frac{D^{2}}{\kappa}\delta^{\prime}(x_{0})\partial_{x_{0}}Q_{r}(p,t|0),$
(41)

with the initial condition $Q_{r}(p,0|x_{0})=1$. In the Laplace domain,
$t\to\epsilon$, the solution to (41) is given by (see A),

$\widetilde{Q}_{r}(p,\epsilon|x_{0})=\widetilde{\mathcal{Q}}(p,\epsilon|x_{0})+\partial_{x_{0}}\widetilde{\mathcal{Q}}(p,\epsilon|0)\frac{\partial_{x}\widetilde{\mathcal{G}}(0,p,\epsilon|x_{0})}{\frac{\kappa}{D^{2}}-\partial^{2}_{x,x_{0}}\widetilde{\mathcal{G}}(0,p,\epsilon|0)},$
(42)

where $\mathcal{G}(x,p,t|x_{0})$ is the Green’s function of the barrier free
Feynman-Kac equation, i.e.

$\frac{\partial\mathcal{G}(x,p,t|x_{0})}{\partial
t}=D\frac{\partial^{2}\mathcal{G}(x,p,t|x_{0})}{\partial
x_{0}^{2}}-p\Theta(x_{0})\mathcal{G}(x,p,t|x_{0}),$ (43)

with $\mathcal{G}(x,p,0|x_{0})=\delta(x_{0}-x)$ and
$\mathcal{Q}(p,t|x_{0})=\int_{-\infty}^{\infty}\mathcal{G}(x,p,t|x_{0})dx$.

The solution of equation (43) can be found by solving in the Laplace domain,

$\epsilon\widetilde{\mathcal{G}}(x,p,\epsilon|x_{0})-\delta(x_{0}-x)=\left\\{\begin{array}[]{ll}D\frac{\partial^{2}}{\partial
x_{0}^{2}}\widetilde{\mathcal{G}}(x,p,\epsilon|x_{0})-p\widetilde{\mathcal{G}}(x,p,\epsilon|x_{0})\
\ x_{0}>0,\\\\[4.0pt] D\frac{\partial^{2}}{\partial
x_{0}^{2}}\widetilde{\mathcal{G}}(x,p,\epsilon|x_{0})\ \
x_{0}<0.\end{array}\right.$ (44)

Two boundary conditions are required with equation (44) for
$x_{0}\to\pm\infty$. As $\mathcal{P}(t_{r},t|x_{0}\to\infty)=\delta(t_{r}-t)$
and $\mathcal{P}(t_{r},t|x_{0}\to-\infty)=\delta(t_{r})$, this corresponds to
$\widetilde{\mathcal{G}}(x,p,\epsilon|x_{0}\to\infty)=(\epsilon+p)^{-1}$ and
$\widetilde{\mathcal{G}}(x,p,\epsilon|x_{0}\to-\infty)=\epsilon^{-1}$. In
addition, we require continuity at the origin for
$\widetilde{\mathcal{G}}(x,p,\epsilon|x_{0})$ and its derivative [62], i.e.
$\widetilde{\mathcal{G}}(x,p,\epsilon|0^{-})=\widetilde{\mathcal{G}}(x,p,\epsilon|0^{+})$
and $\lim_{x_{0}\to
0^{-}}\partial_{x_{0}}\widetilde{\mathcal{G}}(x,p,\epsilon|x_{0})=\lim_{x_{0}\to
0^{+}}\partial_{x_{0}}\widetilde{\mathcal{G}}(x,p,\epsilon|x_{0})$. The
presence of the Dirac-$\delta$ function on the left-hand side (LHS) means we
have two more conditions, such that we have continuity at $x_{0}=x$ therefore
$\widetilde{\mathcal{G}}(x,p,\epsilon|x^{-})=\widetilde{\mathcal{G}}(x,p,\epsilon|x^{+})$
and from integrating over the Dirac-$\delta$, we have $\lim_{x_{0}\to
x^{-}}\partial_{x_{0}}\widetilde{\mathcal{G}}(x,p,\epsilon|x_{0})-\lim_{x_{0}\to
x^{+}}\partial_{x_{0}}\widetilde{\mathcal{G}}(x,p,\epsilon|x_{0})=1/D$.

Solving equation (44) with the aforementioned conditions to obtain
$\widetilde{\mathcal{G}}(x,p,\epsilon|x_{0})$ and inserting into equation (42)
gives $\widetilde{Q}_{r}(p,\epsilon|x_{0})$. Setting $x_{0}=0^{+}$ and
$x_{0}=0^{-}$ leads to,

$\widetilde{Q}_{r}(p,\epsilon|0^{+})=\frac{\sqrt{D}\epsilon+\kappa\left(\sqrt{p+\epsilon}+\sqrt{\epsilon}\right)}{\sqrt{D}\epsilon(p+\epsilon)+\kappa\sqrt{\epsilon}\left(\sqrt{\epsilon(p+\epsilon)}+p+\epsilon\right)},$
(45)

and

$\widetilde{Q}_{r}(p,\epsilon|0^{-})=\frac{\sqrt{D}(p+\epsilon)+\kappa\left(\sqrt{p+\epsilon}+\sqrt{\epsilon}\right)}{\sqrt{D}\epsilon(p+\epsilon)+\kappa\sqrt{\epsilon}\left(\sqrt{\epsilon(p+\epsilon)}+p+\epsilon\right)}.$
(46)

Instantly one can see that in the no barrier limit, $\kappa\to\infty$, we
recover the Arcsine law,
$\widetilde{Q}_{r}(p,\epsilon|0)=1/\sqrt{\epsilon(p+\epsilon)}$. For finite
$\kappa$ the double inverse Laplace transform ($p\to t_{r}$ and $\epsilon\to
t$) of equations (45) and (46) can be written in terms of the scaling relation
(see D),

$\mathcal{P}(t_{r},t|0^{\pm})=\frac{\kappa^{2}}{D}\mathdutchcal{F}_{r}^{\pm}\left(\frac{\kappa^{2}}{D}t_{r},\frac{\kappa^{2}}{D}(t-t_{r})\right)$
(47)

where,

$\mathdutchcal{F}_{r}^{+}(\tau_{1},\tau_{2})=\mathdutchcal{f}^{+}(\tau_{1},\tau_{2})+\mathdutchcal{g}^{+}(\tau_{1},\tau_{2})+e^{\tau_{1}}\mathrm{erfc}(\sqrt{\tau_{1}})\delta(\tau_{2}),$
(48)

and

$\mathdutchcal{F}_{r}^{-}(\tau_{1},\tau_{2})=\mathdutchcal{f}^{-}(\tau_{1},\tau_{2})+\mathdutchcal{g}^{-}(\tau_{1},\tau_{2})+e^{\tau_{2}}\mathrm{erfc}(\sqrt{\tau_{2}})\delta(\tau_{1}).$
(49)

The Dirac-$\delta$ functions appear due to the particle spending the whole
time in the positive region or none of the time in that region, and so are
multiplied the probability of never crossing the barrier for the whole time
$t$, i.e. equation (19). The scaling functions in equations (48) and (49) are
given by (see D),

$\mathdutchcal{f}^{+}(\tau_{1},\tau_{2})=\frac{1}{\sqrt{\pi\tau_{1}}}e^{\tau_{2}}\mathrm{erfc}(\sqrt{\tau_{2}}),$
(50)
$\mathdutchcal{f}^{-}(\tau_{1},\tau_{2})=\frac{2}{\pi}\sqrt{\frac{\tau_{2}}{\tau_{1}}}-2\tau_{2}\mathdutchcal{f}^{+}(\tau_{1},\tau_{2}),$
(51)

and

$\mathdutchcal{g}^{\pm}(\tau_{1},\tau_{2})=\sum_{n=0}^{\infty}\frac{(-1)^{n}\tau_{1}^{n/2}}{\Gamma(\frac{n}{2}+1)}\mathcal{C}_{n}^{\pm}(\tau_{2}),$
(52)

where $\mathcal{C}_{n}^{+}(\tau_{2})$ and $\mathcal{C}_{n}^{-}(\tau_{2})$ are
detailed in equations (103) and (110) and
$\Gamma(z)=\int_{0}^{\infty}t^{z-1}e^{-t}dt$ is the Gamma function.

By having the analytical expressions for $\mathcal{P}(t_{r},t|0^{\pm})$, we
can study the asymptotics of this distribution. For the short time
asymptotics, $t<<D/\kappa^{2}$, we take $\tau_{1},\tau_{2}\to 0$ in
$\mathdutchcal{F}_{r}^{\pm}(\tau_{1},\tau_{2})$ and use
$\mathdutchcal{f}^{+}(\tau_{1},\tau_{2})\simeq 1/\sqrt{\pi\tau_{1}}$ and
$\mathdutchcal{g}^{+}(\tau_{1},\tau_{2})\simeq 2\sqrt{\tau_{1}/\tau_{2}}/\pi$
(see E) to give

$\mathcal{P}(t_{r},t|0^{+})\simeq\frac{\kappa}{\sqrt{\pi
Dt_{r}}}+\frac{2\kappa^{2}\sqrt{t_{r}}}{\pi
D\sqrt{t-t_{r}}}+\left(1-2\kappa\sqrt{\frac{t_{r}}{\pi
D}}\right)\delta(t-t_{r}).$ (53)

Then from equation (51) we have $\mathdutchcal{f}^{-}(\tau_{1},\tau_{2})\simeq
2\sqrt{\tau_{2}/\tau_{1}}/\pi$ and
$\mathdutchcal{g}^{-}(\tau_{1},\tau_{2})\simeq 1/\sqrt{\pi\tau_{2}}$ (see E)
for $\tau_{1},\tau_{2}\to 0$, which leads to the following symmetrical
dependence for $t<<D/\kappa^{2}$,

$\mathcal{P}(t_{r},t|0^{+})=\mathcal{P}(t-t_{r},t|0^{-}).$ (54)

The long time asymptotics, $t>>D/\kappa^{2}$, corresponds to the limit
$\epsilon\to 0$ in the Laplace domain, by expanding
$Q_{r}(p,\epsilon|0^{\pm})$ in equations (45) and (46) around small $\epsilon$
to leading order whilst keeping $p+\epsilon$ finite, one obtains
$Q_{r}(p,\epsilon|0^{\pm})\simeq 1/\sqrt{\epsilon(p+\epsilon)}$, leading to
the Arcsine distribution,

$\mathcal{P}(t_{r},t|0^{\pm})\simeq\frac{1}{\pi\sqrt{t_{r}(t-t_{r})}},$ (55)

showing how the influence of the permeable barrier on
$\mathcal{P}(t_{r},t|0^{\pm})$ wanes over time.

We plot $\mathcal{P}(t_{r},t|0^{\pm})$ in figure 4 to show the excellent match
with stochastic simulations. By varying the strength of the permeability of
the barrier the resulting curves move further from the Arcsine distribution,
where for smaller $\kappa$, the peaks at $t_{r}=0$ and $t_{r}=t$ become
sharper. This illustrates the notion that once the particle crosses the
barrier it is unlikely to do so again for small permeabilities.

(a)  (b)

Figure 4: Residence time density of a Brownian particle in the positive half-
space, $\mathcal{P}(t_{r},t|0^{\pm})$, where a permeable barrier has been
placed at the origin. Two distinct initial positions are considered, (a)
$x_{0}=0^{+}$ and (b) $x_{0}=0^{-}$, for different values of the dimensionless
parameter $\kappa^{2}t/D$, all other quantities are in arbitrary units.
Markers represent stochastic simulations. Once again the inset in figures (a)
and (b) show the presence of the Dirac-$\delta$ from simulations (the analytic
Dirac-$\delta$ is omitted from the plot). The parameter values for each curve
are the same as in figure 2 (a).

##  5 Time of the Last Crossing of the Origin $t_{\ell}$

Finally, we consider the third Arcsine law, the probability density,
$\mathcal{P}(t_{\ell},t|0^{\pm})$, of the last time the Brownian particle
crosses the origin, which in our case is equivalent to passing through the
permeable barrier. Unlike the previous two Arcsine laws, the probability
distribution is the same for either $x_{0}=0^{+}$ or $x_{0}=0^{-}$, as the
crossing process is symmetric about the origin. Thus, for simplicity we take
$x_{0}=0^{+}$. To find $\mathcal{P}(t_{\ell},t|0^{+})$ we exploit the
Markovian nature of the process and use a path decomposition approach similar
to the method used in section 3. Again we split the trajectory into two parts,
$\\{x(\tau):\tau\in[0,t_{\ell}]\\}$ and $\\{x(\tau):\tau\in[t_{\ell},t]\\}$,
where the first part is the trajectory that crosses the origin at $t_{\ell}$,
and the second part is that the trajectory does not reach the origin for the
remaining time $t-t_{\ell}$. However, the presence of a permeable barrier at
the origin adds further complexity, due to the probability of reaching $0^{+}$
and $0^{-}$ being different. Therefore, we write
$\mathcal{P}(t_{\ell},t|0^{+})$ as,

$\mathcal{P}(t_{\ell},t|0^{+})=\lim_{\varepsilon\to
0^{+}}\frac{1}{N(\varepsilon)}\Big{[}P(0^{-},t_{\ell}|0^{+})S(-\varepsilon,t-t_{\ell}|0^{-})\\\
+P(0^{+},t_{\ell}|0^{+})S(\varepsilon,t-t_{\ell}|0^{+})\Big{]},$ (56)

where the sum in equation (56) comes from the last passage being an up
crossing or a down crossing. We take the limit $\varepsilon\to 0^{+}$ to find
the double Laplace transform of $\mathcal{P}(t_{\ell},t|0^{+})$, i.e.
$\widetilde{Q}_{\ell}(p,\epsilon|0^{+})=\int_{0}^{\infty}dte^{-\epsilon
t}\int_{0}^{\infty}dt_{\ell}\ e^{-pt_{\ell}}\mathcal{P}(t_{\ell},t|0^{+})$,
such that

$\widetilde{Q}_{\ell}(p,\epsilon|0^{+})=\lim_{\varepsilon\to
0^{+}}\frac{1}{N(\varepsilon)}\Big{[}\widetilde{P}(0^{-},p+\epsilon|0^{+})\widetilde{S}(-\varepsilon,\epsilon|0^{-})\\\
+\widetilde{P}(0^{+},p+\epsilon|0^{+})\widetilde{S}(\varepsilon,\epsilon|0^{+})\Big{]},$
(57)

where $\widetilde{P}(x,\epsilon|x_{0})$ is given by equation (6) and
$\widetilde{S}(\pm\varepsilon,\epsilon|0^{\pm})$ is found to first order in
$\varepsilon$ as previously. To find the normalization factor $N(\epsilon)$,
we use the normalization condition,

$\int_{0}^{t}\mathcal{P}(t_{\ell},t|0^{+})dt_{\ell}=1-S(0^{-},t|0^{+}),$ (58)

which indicates that due to the presence of the permeable barrier, there is a
probability that the particle will not cross the origin in a time $t$. After
substituting these expressions into (57) and using (58) we find
$N(\varepsilon)=\varepsilon/D$, giving

$\widetilde{Q}_{\ell}(p,\epsilon|0^{+})=\frac{\kappa}{\sqrt{\epsilon(p+\epsilon)}(\sqrt{D\epsilon}+\kappa)},$
(59)

using standard inverse Laplace transform relations [58], we obtain

$\mathcal{P}(t_{\ell},t|0^{+})=\frac{\kappa^{2}}{D}\mathdutchcal{F}_{\ell}\left(\frac{\kappa^{2}}{D}t_{\ell},\frac{\kappa^{2}}{D}(t-t_{\ell})\right),$
(60)

where

$\mathdutchcal{F}_{\ell}(\tau_{1},\tau_{2})=\mathdutchcal{f}^{+}(\tau_{1},\tau_{2})$
(61)

for $\mathdutchcal{f}^{+}(\tau_{1},\tau_{2})$ defined in equation (50). The
striking feature here is that the scaling function that fully describes
$\mathcal{P}(t_{\ell},t|0^{+})$ is also part of the scaling function
describing the residence time density, $\mathcal{P}(t_{r},t|0^{+})$. Comparing
the short time limit, $t<<D/\kappa^{2}$,

$\mathcal{P}(t_{\ell},t|0^{+})\simeq\frac{\kappa}{\sqrt{\pi Dt_{\ell}}},$ (62)

and the long time limit, $t>>D/\kappa^{2}$ for $t_{\ell}<<t$ ,

$\mathcal{P}(t_{\ell},t|0^{+})\simeq\frac{1}{\pi\sqrt{t_{\ell}(t-t_{\ell})}},$
(63)

to that of $\mathcal{P}(t_{r},t|0^{+})$, i.e. equations (53) and (55), we see
that the peaks at the origin of both distributions have the same time
dependence. This feature can be understood by considering that for
instantaneous last crossing times, $t_{\ell}<<t$, this crossing event is
almost certainly going to be the first and last crossing, which corresponds to
the residence time being equivalent to the last crossing time
$t_{r}=t_{\ell}$. This breaks down as $t_{\ell}$ gets larger, causing the
different dependencies of the distributions. In this case equation (63) is not
valid for $t-t_{\ell}\to 0$ as
$\mathdutchcal{f}^{+}(\tau_{1},0)=1/\sqrt{\pi\tau_{1}}$.

Figure 5: Last-passage time density of a Brownian particle,
$\mathcal{P}(t_{\ell},t|0^{\pm})$, starting to the left or right of a
permeable barrier placed at the origin. The curves represent different values
of the dimensionless parameter, $\kappa^{2}t/D$, while all other quantities
are in arbitrary units. Markers represent stochastic simulations. The
parameter values for each curve are the same as in figure 2 (a).

We plot equation (60) in figure 5 to compare with stochastic simulations,
where we see an excellent match. In comparing different $\kappa$ values the
main feature is the presence of a sharper peak at $t_{\ell}=0$ the smaller the
permeability, indicating that once the particle crosses the barrier it is
unlikely to do so again. Differently from the Arcsine distribution (1), there
is no divergence at $t_{\ell}=t$, which is due to there being a non-zero
probability of not crossing the barrier for every interaction. We note that
instead if one is interested in the distribution of the particle returning to
the same side of the barrier for the last time, one would recover the Arcsine
distribution.

##  6 Conclusion

In summary, we have investigated the extreme-value statistics and Arcsine laws
of Brownian motion in the presence of a permeable barrier at the origin, using
an inhomogeneous diffusion equation which accounts for the presence of a
permeable barrier. The presence of this barrier requires considering two
initial positions, the right and left-hand side of the barrier, i.e.
$x_{0}=0^{+}$ and $x_{0}=0^{-}$, respectively.

Firstly, using a path-decomposition technique we have obtained the joint
density of the maximum displacement, $M(t)$, and the time to reach it,
$t_{m}(t)$, for the two initial conditions, $\mathcal{P}(M,t_{m},t|0^{\pm})$.
We have found that this quantity can be represented by the multiplication of
two different scaling functions, indicating the distribution is no longer
symmetric under a $t_{m}\to t-t_{m}$ transformation. For the $x_{0}=0^{-}$
case a Dirac-$\delta$ centered at $t_{m}=0$ is also present due to the
probability of not passing through the barrier in finite time. At short times,
$t<<D/\kappa^{2}$, $\mathcal{P}(M,t_{m},t|0^{+})$ can be asymptotically
approximated by the distribution for when the barrier is fully reflecting,
$\kappa=0$, which is given in terms of Jacobi Theta functions. This
approximation is valid due to a very small number of particles manange to go
through the barrier for short times. For $\mathcal{P}(M,t_{m},t|0^{-})$ we
find a stronger approximation than just the reflecting barrier distribution,
which is $\delta(M)\delta(t_{m})$, which accounts for the very few particles
that do cross the barrier.

We have also investigated the respective marginal distributions,
$\mathcal{P}(M,t|0^{\pm})$ and $\mathcal{P}(t_{m},t|0^{\pm})$. The presence of
the barrier has a large impact on the monotonicity of the distribution,
$\mathcal{P}(M,t|0^{\pm})$, where for certain permeabilities a maximum not at
the origin appears. At long times, $t>>D/\kappa^{2}$, the distribution is
still dependent on $\kappa$. For $\mathcal{P}(t_{m},t|0^{\pm})$ the
distribution remains asymmetric for long times, such that for large $t_{m}$
the usual Arcsine distribution is recovered, whereas we get a different
dependence for $t_{m}\to 0$.

For the rest of the paper we have investigated the other two Arcsine laws,
namely the distributions of the residence time, $t_{r}(t)$, and the last
crossing of the origin, $t_{\ell}(t)$. Using Feynman-Kac theory we have
calculated $\mathcal{P}(t_{r},t|0^{\pm})$ analytically and have found the
dependence in terms of a scaling function. For $x_{0}=0^{+}$ and $x_{0}=0^{-}$
we have a Dirac-$\delta$ located at $t_{r}=t$ and $t_{r}=0$, respectively, due
to the particle never crossing the barrier. In the short time limit we have
found that the scaling functions for $x_{0}=0^{\pm}$ are equivalent under the
transformation $t_{r}\to t-t_{r}$, and in the long time limit we recover the
Arcsine distribution.

Finally, we have studied $\mathcal{P}(t_{\ell},t|0^{\pm})$, which is
equivalent for either initial condition $x_{0}=0^{+}$ or $x_{0}=0^{-}$, since
$t_{\ell}(t)$ is a crossing event. Taking into account up and down crossings
we have found $\mathcal{P}(t_{\ell},t|0^{\pm})$ in terms of known functions.
Interestingly the scaling function that describes this distribution happens to
be part of the scaling function which describes $\mathcal{P}(t_{r},t|0^{+})$,
where the peak at the origin of both distributions have the same dependence,
because for $t_{\ell}<<t$ the first crossing very likely corresponds to the
last crossing, which implies $t_{\ell}=t_{r}$. As $t_{\ell}$ becomes larger
this is no longer the case, and we do not observe a divergence as $t_{\ell}\to
t$, due to the non-zero probability of not crossing the barrier for any
interaction.

Possible extensions of this study would include the analysis of how a
permeable barrier affects the time, $T$, between the maximum and minimum of
the process [42, 43]. It would be interesting to see if the presence of a
barrier breaks the symmetry around $T=0$ and whether the initial position i.e.
$x_{0}=0^{\pm}$ leads to differences in the respective distributions. Another
interesting avenue to explore is changing the underlying Brownian motion to a
different stochastic process, such as anomalous subdiffusion (where an
equation akin to (5) has been found for this case [63]), and what is the
impact of a permeable barrier to the unperturbed statistics.

TK and LG acknowledge funding from, respectively, an Engineering and Physical
Sciences Research Council (EPSRC) DTP student grant and the Biotechnology and
Biological Sciences Research Council (BBSRC) Grant No. BB/T012196/1 and NERC
Grant No. NE/W00545X/1. This work was carried out using the computational
facilities of the Advanced Computing Research Centre, University of Bristol -
http://www.bristol.ac.uk/acrc/.

##  Appendix A Solution of the Feynman-Kac Equation

Here we show how the solution of equation (41), $Q_{r}(p,t|x_{0})$, can be
represented in terms the Green’s function, $\mathcal{G}(x,p,t|x_{0})$, of the
barrier free Feynman-Kac equation, (43). If we take the last term on the
right-hand side (RHS) of equation (41) as an inhomogeneous term, we may
construct the solution as follows,

$\displaystyle Q_{r}(p,t|x_{0})$
$\displaystyle=\int_{-\infty}^{\infty}dy\mathcal{G}(y,p,t|x_{0})Q_{r}(p,0|y)$
$\displaystyle-\frac{D^{2}}{\kappa}\int_{0}^{t}dt^{\prime}\int_{-\infty}^{\infty}dy\mathcal{G}(y,p,t-t^{\prime}|x_{0})\delta^{\prime}(x_{0})\partial_{x_{0}}Q_{r}(p,t^{\prime}|0).$

Using $Q_{r}(p,0|y)=1$ with
$\mathcal{Q}(p,t|x_{0})=\int_{-\infty}^{\infty}\mathcal{G}(y,p,t|x_{0})$ and
Laplace transforming, $t\to\epsilon$, we have

$\widetilde{Q}_{r}(p,\epsilon|x_{0})=\widetilde{\mathcal{Q}}(p,\epsilon|x_{0})+\frac{D^{2}}{\kappa}\partial_{x}\widetilde{\mathcal{G}}(0,p,\epsilon|x_{0})\partial_{x_{0}}\widetilde{Q}_{r}(0,\epsilon|0).$
(65)

Then by taking the derivative of both sides of equation (65) with respect to
$x_{0}$ and setting $x_{0}=0$, we find

$\partial_{x_{0}}\widetilde{Q}_{r}(0,\epsilon|0)=\frac{\partial_{x_{0}}\widetilde{\mathcal{Q}}(p,\epsilon|0)}{1-\frac{D^{2}}{\kappa}\partial^{2}_{x,x_{0}}\widetilde{\mathcal{G}}(0,p,\epsilon|0)},$
(66)

then after inserting equation (66) into (65) we obtain (42).

##  Appendix B Double Inverse Laplace Transform of
$\widetilde{Q}_{m}(M,p,\epsilon|0^{\pm})$

To perform the Laplace inversion of $\widetilde{Q}_{m}(M,p,\epsilon|0^{+})$,
we write equation (12) as

$\widetilde{Q}_{m}(M,p,\epsilon|0^{+})=\frac{1}{\kappa}\widetilde{\mathdutchcal{G}}^{+}\left(\frac{\kappa}{D}M,\frac{D}{\kappa^{2}}(p+\epsilon)\right)\widetilde{\mathdutchcal{H}}\left(\frac{\kappa}{D}M,\frac{D}{\kappa^{2}}\epsilon\right),$
(67)

then $\mathcal{P}(M,t_{m},t|0^{+})$ is given by the two Bromwich integrals,

$\displaystyle\mathcal{P}(M,t_{m},t|0^{+})$
$\displaystyle=\frac{\kappa^{3}}{D^{2}}\frac{1}{(2\pi
i)^{2}}\int_{\gamma_{1}-i\infty}^{\gamma_{1}+i\infty}ds_{1}e^{\frac{\kappa^{2}}{D}t_{m}s_{1}}\widetilde{\mathdutchcal{G}}^{+}\left(\frac{\kappa}{D}M,s_{1}\right)$
$\displaystyle\times\int_{\gamma_{2}-i\infty}^{\gamma_{2}+i\infty}ds_{2}e^{\frac{\kappa^{2}}{D}(t-t_{m})s_{2}}\widetilde{\mathdutchcal{H}}\left(\frac{\kappa}{D}M,s_{2}\right),$

where $\gamma_{1}$ and $\gamma_{2}$ are greater than the real part of all
singularities of
$\widetilde{\mathdutchcal{G}}^{+}\left(\frac{\kappa}{D}M,s_{1}\right)$ and
$\widetilde{\mathdutchcal{H}}\left(\frac{\kappa}{D}M,s_{2}\right)$,
respectively and $\widetilde{\mathdutchcal{G}}^{+}(y,s_{1})$ and
$\widetilde{\mathdutchcal{H}}(y,s_{2})$ are given by,

$\widetilde{\mathdutchcal{G}}^{+}(y,s_{1})=\frac{e^{y\sqrt{s_{1}}}(\sqrt{s_{1}}+1)}{\sqrt{s_{1}}+e^{2y\sqrt{s_{1}}}(\sqrt{s_{1}}+2)}$
(69)

and

$\widetilde{\mathdutchcal{H}}(y,s_{2})=\frac{2\left(-\sqrt{s_{2}}+e^{2y\sqrt{s_{2}}}(\sqrt{s_{2}}+2)\right)}{\sqrt{s_{2}}\left(\sqrt{s_{2}}+e^{2y\sqrt{s_{2}}}(\sqrt{s_{2}}+2)\right)}.$
(70)

To find $\mathcal{P}(M,t_{m},t|0^{+})$ we require the following Laplace
inversions
$\mathcal{L}^{-1}_{s_{1}\to\tau_{1}}\left\\{\widetilde{\mathdutchcal{G}}^{+}(y,s_{1})\right\\}$
and
$\mathcal{L}^{-1}_{s_{2}\to\tau_{2}}\left\\{\widetilde{\mathdutchcal{H}}(y,s_{2})\right\\}$,
then $\mathcal{P}(M,t_{m},t|0^{-})$ only requires the Laplace inversion,
$\mathcal{L}^{-1}_{s_{1}\to\tau_{1}}\left\\{\widetilde{\mathdutchcal{G}}^{-}(y,s_{1})\right\\}$,
where
$\widetilde{\mathdutchcal{G}}^{-}(y,s_{1})=(\sqrt{s_{1}}+1)^{-1}\widetilde{\mathdutchcal{G}}^{+}(y,s_{1})$.

###  B.1 Laplace Inversion of $\widetilde{\mathdutchcal{G}}^{\pm}(y,s_{1})$

From the definition of $\widetilde{\mathdutchcal{G}}^{+}(y,s_{1})$ in equation
(69) we see that $\widetilde{\mathdutchcal{G}}^{+}(y,s_{1})$ has no poles but
has a branch point at $s_{1}=0$. Thus, by taking the branch cut to be the
negative real axis, then $\widetilde{\mathdutchcal{G}}^{+}(y,s_{1})$ is
analytic inside the contour, $C$, in figure 6, meaning that
$\oint_{C}e^{s_{1}\tau_{1}}\widetilde{\mathdutchcal{G}}^{+}(y,s_{1})ds_{1}=0$.
Then by taking $R\to\infty$ and $\alpha\to 0$ for the contour $C$ the Laplace
inversion is given by,

$\mathcal{L}^{-1}_{s_{1}\to\tau_{1}}\left\\{\widetilde{\mathdutchcal{G}}^{+}(y,s_{1})\right\\}=\frac{1}{2\pi
i}\int_{C_{1}}e^{s_{1}\tau_{1}}\widetilde{\mathdutchcal{G}}^{+}(y,s_{1})ds=\frac{-1}{2\pi
i}\left(\int_{C_{3}}+\int_{C_{5}}\right)e^{s_{1}\tau_{1}}\widetilde{\mathdutchcal{G}}^{+}(y,s_{1})ds_{1}$
(71)

because in the limit $R\to\infty$ the contributions from $C_{2}$ and $C_{6}$
vanish, and for $\alpha\to 0$ the contribution from $C_{4}$ is zero.
Therefore, all we require is finding the integrals $\int_{C_{3}}$ and
$\int_{C_{5}}$.

For $\int_{C_{3}}$ we let $s_{1}=ze^{i\pi}$, giving

$\int_{C_{3}}e^{s_{1}\tau_{1}}\widetilde{\mathdutchcal{G}}^{+}(y,s_{1})ds_{1}=-\int_{R}^{\alpha}e^{-\tau_{1}z}\frac{e^{iy\sqrt{z}}(i\sqrt{z}+1)}{i\sqrt{z}+e^{2iy\sqrt{z}}(i\sqrt{z}+2)}dz,$
(72)

and for $\int_{C_{5}}$ we let $s_{1}=ze^{-i\pi}$, leading to

$\int_{C_{5}}e^{s_{1}\tau_{1}}\widetilde{\mathdutchcal{G}}^{+}(y,s_{1})ds_{1}=-\int_{\alpha}^{R}e^{-\tau_{1}z}\frac{e^{-iy\sqrt{z}}(-i\sqrt{z}+1)}{-i\sqrt{z}+e^{-2iy\sqrt{z}}(-i\sqrt{z}+2)}dz.$
(73)

Taking $R\to\infty$ and $\alpha\to 0$, substituting back into equation (71)
and converting the complex exponentials to trigonometric functions, we obtain
$\mathdutchcal{G}^{+}(y,\tau_{1})$ as defined in equation (16).

Similarly, since
$\widetilde{\mathdutchcal{G}}^{-}(y,s_{1})=(\sqrt{s_{1}}+1)^{-1}\widetilde{\mathdutchcal{G}}^{+}(y,s_{1})$,
one can see that by altering the above calculations it leads to the definition
of $\mathdutchcal{G}^{-}(y,\tau_{1})$ in equation (26).

###  B.2 Laplace Inversion of $\mathdutchcal{H}(y,s_{2})$

From equation (70) one can see that $\widetilde{\mathdutchcal{H}}(y,s_{2})$
has a branch point at $s_{2}=0$. Proceeding similarly to the above case, we
use the contour in figure 6 and obtain

$\mathcal{L}^{-1}_{s_{2}\to\tau_{2}}\left\\{\widetilde{\mathdutchcal{H}}(y,s_{2})\right\\}=\frac{1}{2\pi
i}\int_{C_{1}}e^{s\tau_{2}}\widetilde{\mathdutchcal{H}}(y,s_{2})ds=\frac{-1}{2\pi
i}\left(\int_{C_{3}}+\int_{C_{5}}\right)e^{s_{2}\tau_{2}}\widetilde{\mathdutchcal{H}}(y,s_{2})ds_{2},$
(74)

because in the limit $R\to\infty$ and $\alpha\to 0$ the contributions from
$C_{2}$, $C_{6}$ and $C_{4}$ vanish, and we have

$\int_{C_{3}}e^{s_{2}\tau_{2}}\widetilde{\mathdutchcal{H}}(y,s_{2})ds_{2}=-\int_{R}^{\alpha}e^{-\tau_{2}z}\frac{2\left(-i\sqrt{z}+e^{2i\sqrt{z}}(i\sqrt{z}+2)\right)}{i\sqrt{z}\left(i\sqrt{z}+e^{2i\sqrt{z}}(i\sqrt{z}+2)\right)}dz,$
(75)

and

$\int_{C_{5}}e^{s_{2}\tau_{2}}\widetilde{\mathdutchcal{H}}(y,s_{2})ds_{2}=-\int_{\alpha}^{R}e^{-\tau_{2}z}\frac{2\left(i\sqrt{z}+e^{-2i\sqrt{z}}(-i\sqrt{z}+2)\right)}{-i\sqrt{z}\left(-i\sqrt{z}+e^{-2i\sqrt{z}}(-i\sqrt{z}+2)\right)}dz.$
(76)

After taking $R\to\infty$, $\alpha\to 0$ and substituting these expressions
into equation (74) one can see that we recover $\mathdutchcal{H}(y,\tau_{2})$
in equation (17).

Figure 6: Key-hole contour, $C=C_{1}+...+C_{6}$, used for the Bromwich
integration to perform the inverse Laplace transforms of various functions
defined in equations (71), (74), (78) and (C), where the only singularity is a
branch point at the origin.

##  Appendix C Inverse Laplace Transform of $\widetilde{Q}_{m}(M,t|0^{\pm})$

The marginal over $t_{m}$ of $\mathcal{P}(M,t_{m},t|0^{+})$ corresponds to
$\widetilde{Q}_{m}(M,0,\epsilon|0^{+})$ and from equations (B), (69) and (70),
we are looking for the Laplace inversion,
$\mathcal{L}^{-1}_{s\to\tau}\left\\{\widetilde{\mathcal{I}}^{+}(y,s)\right\\}$,
where

$\widetilde{\mathcal{I}}^{+}(y,s)=\frac{2e^{y\sqrt{s}}(\sqrt{s}+1)(-\sqrt{s}+e^{2y\sqrt{s}}(\sqrt{s}+2))}{\sqrt{s}(\sqrt{s}+e^{2y\sqrt{s}}(\sqrt{s}+2))^{2}}.$
(77)

Once again we have a branch point at the origin and thus use the contour $C$
in figure 6 to perform the Laplace inversion. The contributions from $C_{2}$,
$C_{6}$ and $C_{4}$ vanish, leaving us to calculate $\int_{C_{3}}$ and
$\int_{C_{5}}$. By using the substitutions, $s=ze^{i\pi}$ and $s=ze^{-i\pi}$
for $C_{3}$ and $C_{5}$ respectively, whilst taking $R\to\infty$ and
$\alpha\to 0$, we have

$\mathcal{L}^{-1}_{s\to\tau}\left\\{\mathcal{I}^{+}(y,s)\right\\}=\frac{-1}{2\pi
i}\left(\int_{C_{3}}+\int_{C_{5}}\right)e^{s\tau}\widetilde{\mathcal{I}}^{+}(y,s)ds=\frac{1}{\pi}\int_{0}^{\infty}\frac{e^{-\tau
z}}{\sqrt{z}}j^{+}(y,z)h^{2}(y,z)dz,$ (78)

where

$j^{+}(y,z)=(5z+4)\cos(y\sqrt{z})-z\cos(3y\sqrt{z})+8\sqrt{z}\sin^{3}(y\sqrt{z}).$
(79)

Similarly, since
$\widetilde{\mathcal{I}}^{-}(y,s)=(\sqrt{s}+1)^{-1}\widetilde{\mathcal{I}}^{+}(y,s)+(\sqrt{s}+s)^{-1}\delta(y)$,
we find

$\displaystyle\mathcal{L}^{-1}_{s\to\tau}\left\\{\mathcal{I}^{-}(y,s)\right\\}$
$\displaystyle=\frac{-1}{2\pi
i}\left(\int_{C_{3}}+\int_{C_{5}}\right)e^{s\tau}\widetilde{\mathcal{I}}^{-}(y,s)ds$
$\displaystyle=\frac{1}{\pi}\int_{0}^{\infty}\frac{e^{-\tau
z}}{\sqrt{z}}j^{-}(y,z)h^{2}(y,z)dz+e^{\tau}\mathrm{erfc}(\tau)\delta(y),$

where,

$j^{-}(y,z)=(4-z)\cos(y\sqrt{z})-3z\cos(3y\sqrt{z})+2\sqrt{z}\left[z+(z-2)\cos(2y\sqrt{z})\right]\sin(y\sqrt{z}).$
(81)

##  Appendix D Double Inverse Laplace Transform of
$\widetilde{Q}_{r}(p,\epsilon|0^{\pm})$

Starting from equations (45) and (46), we may write

$\widetilde{Q}_{r}(p,\epsilon|0^{\pm})=\frac{D}{\kappa^{2}}\widetilde{\mathdutchcal{F}}_{r}^{\pm}\left(\frac{D}{\kappa^{2}}(p+\epsilon),\frac{D}{\kappa^{2}}\epsilon\right),$
(82)

therefore

$\mathcal{P}(t_{r},t|0^{\pm})=\frac{\kappa^{2}}{D}\mathcal{L}^{-1}_{s_{2}\to\tau_{2}}\left\\{\mathcal{L}^{-1}_{s_{1}\to\tau_{1}}\left\\{\widetilde{\mathdutchcal{F}}_{r}^{\pm}(s_{1},s_{2})\right\\}\right\\},$
(83)

for $\tau_{1}=\kappa^{2}t_{r}/D$ and $\tau_{2}=\kappa^{2}(t-t_{r})/D$, where

$\widetilde{\mathdutchcal{F}}_{r}^{+}(s_{1},s_{2})=\frac{s_{2}+\sqrt{s_{1}}+\sqrt{s_{2}}}{s_{1}s_{2}+\sqrt{s_{2}}\left(\sqrt{s_{1}s_{2}}+s_{1}\right)}$
(84)

and

$\widetilde{\mathdutchcal{F}}_{r}^{-}(s_{1},s_{2})=\frac{s_{1}+\sqrt{s_{1}}+\sqrt{s_{2}}}{s_{1}s_{2}+\sqrt{s_{2}}\left(\sqrt{s_{1}s_{2}}+s_{1}\right)}.$
(85)

We now proceed to compute the Laplace inversions, $s_{1}\to\tau_{1}$ and
$s_{2}\to\tau_{2}$, of equations (84) and (85).

###  D.1 Double Laplace Inversion of
$\widetilde{\mathdutchcal{F}}_{r}^{+}(s_{1},s_{2})$

Let us first write equation (84) as

$\widetilde{\mathdutchcal{F}}_{r}^{+}(s_{1},s_{2})=\frac{1}{\sqrt{s_{1}}\left(s_{2}+\sqrt{s_{2}}\right)+s_{2}}+\frac{s_{2}+\sqrt{s_{2}}}{s_{1}\left(s_{2}+\sqrt{s_{2}}\right)+\sqrt{s_{1}}s_{2}},$
(86)

and using the following inverse Laplace transform relations [58]:

$\mathcal{L}^{-1}_{s_{1}\to\tau_{1}}\left\\{\frac{1}{\sqrt{s_{1}}+a}\right\\}=\frac{1}{\sqrt{\pi\tau_{1}}}-ae^{a^{2}\tau_{1}}\mathrm{erfc}\left(a\sqrt{\tau_{1}},\right)$
(87)

and

$\mathcal{L}^{-1}_{s_{1}\to\tau_{1}}\left\\{\frac{1}{\sqrt{s_{1}}(\sqrt{s_{1}}+a)}\right\\}=e^{a^{2}\tau_{1}}\mathrm{erfc}\left(a\sqrt{\tau_{1}}\right),$
(88)

we obtain

$\displaystyle\mathcal{L}^{-1}_{s_{1}\to\tau_{1}}\left\\{\widetilde{\mathdutchcal{F}}_{r}^{+}(s_{1},s_{2})\right\\}$
$\displaystyle=\frac{1}{\sqrt{\pi\tau_{1}}\left(s_{2}+\sqrt{s_{2}}\right)}+\left(1-\frac{1}{\left(\sqrt{s_{2}}+1\right)^{2}}\right)$
$\displaystyle\times
e^{\frac{s_{2}\tau_{1}}{\left(\sqrt{s_{2}}+1\right)^{2}}}\mathrm{erfc}\left(\frac{\sqrt{s_{2}\tau_{1}}}{\sqrt{s_{2}}+1}\right).$

Taking the inverse Laplace transform of the first term on the left-hand side
(LHS) of equation (D.1) gives equation (50). To take the inverse Laplace
transform of the second term we use the following series representation,

$e^{z^{2}}\mathrm{erfc}(z)=\sum_{n=0}^{\infty}\frac{(-1)^{n}z^{n}}{\Gamma\left(\frac{n}{2}+1\right)},$
(90)

where we then have

$\displaystyle\left(1-\frac{1}{\left(\sqrt{s_{2}}+1\right)^{2}}\right)e^{\frac{s_{2}\tau_{1}}{\left(\sqrt{s_{2}}+1\right)^{2}}}\mathrm{erfc}\left(\frac{\sqrt{s_{2}\tau_{1}}}{\sqrt{s_{2}}+1}\right)$
$\displaystyle=\left(1+\frac{\widetilde{\zeta}_{1}(\sqrt{s_{2}})}{\sqrt{s_{2}}}\right)$
$\displaystyle\times\sum_{n=0}^{\infty}\frac{(-1)^{n}\tau_{1}^{n/2}}{\Gamma\left(\frac{n}{2}+1\right)}\widetilde{\zeta}_{n+1}(\sqrt{s_{2}}),$

where

$\widetilde{\zeta}_{n}(\sqrt{s_{2}})=\left(\frac{\sqrt{s_{2}}}{1+\sqrt{s_{2}}}\right)^{n}.$
(92)

We now proceed to calculate the inversion,
$\mathcal{L}^{-1}_{s_{2}\to\tau_{2}}\left\\{\widetilde{\zeta}_{n}(\sqrt{s_{2}})\right\\}$,
where we first find the inversion of
$\mathcal{L}^{-1}_{s_{2}\to\tau_{2}}\left\\{\widetilde{\zeta}_{n}(s_{2})\right\\}$.
We do this by utilizing the following property,

$\mathcal{L}_{\tau\to
s}\left\\{\frac{d^{n}}{d\tau^{n}}f(\tau)\right\\}=s^{n}\widetilde{f}(s)-\sum_{m=1}^{n}s^{n-m}\lim_{\tau\to
0}\frac{d^{m-1}}{d\tau^{m-1}}f(\tau),$ (93)

for some arbitrary function $f(\tau)$. Using
$\mathcal{L}^{-1}_{s\to\tau}\\{(1+s)^{-n}\\}=\tau^{n-1}e^{-\tau}/\Gamma(n)$,
and from the generalized product rule we have

$\frac{d^{n}}{d\tau^{n}}\frac{\tau^{n-1}e^{-\tau}}{\Gamma(n)}=e^{-\tau}\sum_{k=0}^{n}(-1)^{k}{n\choose
k}\frac{\tau^{k-1}}{\Gamma(k)}=-n{}_{1}F_{1}(n+1,2,-\tau),$ (94)

where ${}_{1}F_{1}(a,b,z)$ is the Kummer confluent hypergeometric function
[64]. From,
$\frac{d^{m-1}}{d\tau^{m-1}}\tau^{n-1}e^{-\tau}/\Gamma(n)=\tau^{n-m}{}_{1}F_{1}(n,n+m-1,-\tau)$,
and since for $\tau\to 0$ this is only non-zero for $m=n$, we have,

$\mathcal{L}^{-1}_{s_{2}\to\tau_{2}}\left\\{\widetilde{\zeta}_{n}(s_{2})\right\\}=-n{}_{1}F_{1}(n+1,2,-\tau_{2})+\delta(\tau_{2}).$
(95)

To find
$\mathcal{L}^{-1}_{s_{2}\to\tau_{2}}\left\\{\widetilde{\zeta}_{n}(\sqrt{s_{2}})\right\\}$
we use the property [58]:

$\mathcal{L}^{-1}_{s\to\tau}\left\\{\widetilde{f}(\sqrt{s})\right\\}=\frac{1}{\sqrt{4\pi\tau^{3}}}\int_{0}^{\infty}ue^{-\frac{u^{2}}{4\tau}}f(u)du,$
(96)

and calculate the following integral as

$\displaystyle\frac{1}{\sqrt{4\pi\tau^{3}}}\int_{0}^{\infty}ue^{-\frac{u^{2}}{4\tau}}\,_{1}F_{1}(n+1;2;-u)\,du$
$\displaystyle=\frac{1}{\sqrt{\pi\tau}}\,_{2}F_{2}\left(\frac{n}{2}+\frac{1}{2},\frac{n}{2}+1;\frac{1}{2},\frac{3}{2};\tau\right)$
$\displaystyle-\frac{1}{2}(n+1)\,_{2}F_{2}\left(\frac{n}{2}+1,\frac{n}{2}+\frac{3}{2};\frac{3}{2},2;\tau\right),$

then

$\displaystyle\mathcal{L}^{-1}_{s_{2}\to\tau_{2}}\left\\{\widetilde{\zeta}_{n}(\sqrt{s_{2}})\right\\}$
$\displaystyle=\frac{n}{2}(n+1)\,_{2}F_{2}\left(\frac{n}{2}+1,\frac{n}{2}+\frac{3}{2};\frac{3}{2},2;\tau_{2}\right)$
$\displaystyle-\frac{n}{\sqrt{\pi\tau_{2}}}\,_{2}F_{2}\left(\frac{n}{2}+\frac{1}{2},\frac{n}{2}+1;\frac{1}{2},\frac{3}{2};\tau_{2}\right)+\delta(\tau_{2}),$

where

$\,{}_{2}F_{2}(a,b;c,d,z)=\sum_{k=0}^{\infty}\frac{z^{k}\left(a_{1}\right)_{k}\left(a_{2}\right)_{k}}{k!\left(b_{1}\right)_{k}\left(b_{2}\right)_{k}},$
(99)

with $(x)_{n}=\Gamma(x+n)/\Gamma(x)$ [64].

From equation (D.1) we also require,
$\mathcal{L}^{-1}_{s_{2}\to\tau_{2}}\left\\{\widetilde{\zeta}_{n}(\sqrt{s_{2}})s_{2}^{-1/2}\right\\}$,
where we use the following inversion [58]:

$\mathcal{L}^{-1}_{s\to\tau}\left\\{\frac{s^{n-1}}{(s+1)^{n}}\right\\}={}_{1}F_{1}(n,1,-\tau)$
(100)

with equation (96) to find,

$\displaystyle\mathcal{L}^{-1}_{s_{2}\to\tau_{2}}\left\\{\widetilde{\zeta}_{n}(\sqrt{s_{2}})s_{2}^{-1/2}\right\\}=\frac{1}{\sqrt{4\pi\tau_{2}^{3}}}\int_{0}^{\infty}ue^{-\frac{u^{2}}{4\tau_{2}}}\,_{1}F_{1}(n;1;-u)\,du$
(101)
$\displaystyle=\frac{1}{\sqrt{\pi\tau_{2}}}\,_{2}F_{2}\left(\frac{n}{2},\frac{n}{2}+\frac{1}{2};\frac{1}{2},\frac{1}{2};\tau_{2}\right)-n\,_{2}F_{2}\left(\frac{n}{2}+\frac{1}{2},\frac{n}{2}+1;1,\frac{3}{2};\tau_{2}\right).$

Putting all of this together we have

$\displaystyle\mathdutchcal{F}_{r}^{+}(\tau_{1},\tau_{2})=\frac{1}{\sqrt{\pi\tau_{1}}}e^{\tau_{2}}\mathrm{erfc}(\sqrt{\tau_{2}})+\sum_{n=0}^{\infty}\frac{(-1)^{n}\tau_{1}^{n/2}}{\Gamma(\frac{n}{2}+1)}\mathcal{C}_{n}^{+}(\tau_{2})+e^{\tau_{1}}\mathrm{erfc}(\sqrt{\tau_{1}})\delta(\tau_{2})$
(102)

where

$\displaystyle\mathcal{C}_{n}^{+}(\tau_{2})=(n+2)\Bigg{[}\frac{(n+1)}{2}\,_{2}F_{2}\left(\frac{n}{2}+\frac{3}{2},\frac{n}{2}+2;\frac{3}{2},2;\tau_{2}\right)$
(103)
$\displaystyle-\,_{2}F_{2}\left(\frac{n}{2}+\frac{3}{2},\frac{n}{2}+2;1,\frac{3}{2};\tau_{2}\right)\Bigg{]}+\frac{1}{\sqrt{\pi\tau_{2}}}\Bigg{[}\,_{2}F_{2}\left(\frac{n}{2}+1,\frac{n}{2}+\frac{3}{2};\frac{1}{2},\frac{1}{2};\tau_{2}\right)$
$\displaystyle-(n+1)\,_{2}F_{2}\left(\frac{n}{2}+1,\frac{n}{2}+\frac{3}{2};\frac{1}{2},\frac{3}{2};\tau_{2}\right)\Bigg{]}.$

###  D.2 Double Laplace Inversion of
$\widetilde{\mathdutchcal{F}}_{r}^{-}(s_{1},s_{2})$

We write $\widetilde{\mathdutchcal{F}}_{r}^{-}(s_{1},s_{2})$ as

$\widetilde{\mathdutchcal{F}}_{r}^{-}(s_{1},s_{2})=\frac{\sqrt{s_{1}}+1}{\sqrt{s_{1}}s_{2}+\sqrt{s_{2}}\left(\sqrt{s_{1}}+\sqrt{s_{2}}\right)}+\frac{\sqrt{s_{2}}}{\sqrt{s_{1}}s_{2}+s_{1}\left(s_{2}+\sqrt{s_{2}}\right)},$
(104)

then using equations (87) and (88) with (93), i.e.

$\mathcal{L}^{-1}_{s_{1}\to\tau_{1}}\left\\{\frac{\sqrt{s_{1}}}{{\sqrt{s_{1}}+a}}\right\\}=-\frac{a}{\sqrt{\pi\tau_{1}}}+a^{2}e^{a^{2}\tau_{1}}\mathrm{erfc}\left(a\sqrt{\tau_{1}}\right)+\delta(\tau_{1}),$
(105)

we obtain,

$\displaystyle\mathcal{L}^{-1}_{s_{1}\to\tau_{1}}\left\\{\widetilde{\mathdutchcal{F}}_{r}^{-}(s_{1},s_{2})\right\\}$
$\displaystyle=\frac{1}{\sqrt{\pi}\left(\sqrt{s_{2}}+1\right)^{2}\sqrt{s_{2}\tau_{1}}}+\left(1-\frac{1}{\left(\sqrt{s_{2}}+1\right)^{2}}\right)$
$\displaystyle\times\frac{e^{\frac{s_{2}\tau_{1}}{\left(\sqrt{s_{2}}+1\right)^{2}}}\mathrm{erfc}\left(\frac{\sqrt{s_{2}\tau_{1}}}{\sqrt{s_{2}}+1}\right)}{\left(\sqrt{s_{2}}+1\right)}+\frac{1}{\sqrt{s_{2}}+s_{2}}\delta(\tau_{1}).$

The Laplace inversion of the first term on the RHS of equation (D.2)
corresponds to equation (51). One can see the second term in equation (D.2) is
only different by a factor of $(1+\sqrt{s_{2}})^{-1}$ to the second term on
the RHS in equation (D.1), then by using equation (90), we have

$\displaystyle\left(1-\frac{1}{\left(\sqrt{s_{2}}+1\right)^{2}}\right)\frac{e^{\frac{s_{2}\tau_{1}}{\left(\sqrt{s_{2}}+1\right)^{2}}}\mathrm{erfc}\left(\frac{\sqrt{s_{2}\tau_{1}}}{\sqrt{s_{2}}+1}\right)}{\left(\sqrt{s_{2}}+1\right)}$
$\displaystyle=\left(\frac{1}{\sqrt{s_{2}}}+\frac{\widetilde{\zeta}_{1}(s_{2})}{s_{2}}\right)$
$\displaystyle\times\sum_{n=0}^{\infty}\frac{(-1)^{n}\tau_{1}^{n/2}}{\Gamma\left(\frac{n}{2}+1\right)}\widetilde{\zeta}_{n+2}(\sqrt{s_{2}}).$

While the inversion
$\mathcal{L}^{-1}_{s_{2}\to\tau_{2}}\left\\{\widetilde{\zeta}_{n}(\sqrt{s_{2}})s_{2}^{-1/2}\right\\}$
is given by equation (101), we find
$\mathcal{L}^{-1}_{s_{2}\to\tau_{2}}\left\\{\widetilde{\zeta}_{n}(\sqrt{s_{2}})/s_{2}\right\\}$
by integrating equation (D.1) over $\tau_{2}$ to find,

$\displaystyle\mathcal{L}^{-1}_{s_{2}\to\tau_{2}}\left\\{\frac{\widetilde{\zeta}_{n}(\sqrt{s_{2}})}{s_{2}}\right\\}$
$\displaystyle=\,_{2}F_{2}\left(\frac{n}{2},\frac{n}{2}+\frac{1}{2};\frac{1}{2},1;\tau_{2}\right)$
$\displaystyle-\frac{2n\sqrt{\tau_{2}}}{\sqrt{\pi}}\,_{2}F_{2}\left(\frac{n}{2}+\frac{1}{2},\frac{n}{2}+1;\frac{3}{2},\frac{3}{2};\tau_{2}\right).$

By combining all the above we find
$\mathdutchcal{F}_{r}^{-}(\tau_{1},\tau_{2})$ to be,

$\mathdutchcal{F}_{r}^{-}(\tau_{1},\tau_{2})=\frac{2}{\pi}\sqrt{\frac{\tau_{2}}{\tau_{1}}}-\frac{2\tau_{2}}{\sqrt{\pi\tau_{1}}}e^{\tau_{2}}\mathrm{erfc}(\sqrt{\tau_{2}})+\sum_{n=0}^{\infty}\frac{(-1)^{n}\tau_{1}^{n/2}}{\Gamma(\frac{n}{2}+1)}\mathcal{C}_{n}^{-}(\tau_{2})+e^{\tau_{2}}\mathrm{erfc}(\sqrt{\tau_{2}})\delta(\tau_{1}),$
(109)

where

$\displaystyle\mathcal{C}_{n}^{-}(\tau_{2})=\,_{2}F_{2}\left(\frac{n}{2}+\frac{3}{2},\frac{n}{2}+2;\frac{1}{2},1;\tau_{2}\right)+\frac{1}{\sqrt{\pi\tau_{2}}}\,_{2}F_{2}\left(\frac{n}{2}+1,\frac{n}{2}+\frac{3}{2};\frac{1}{2},\frac{1}{2};\tau_{2}\right)$
(110)
$\displaystyle-\frac{2(n+3)\sqrt{\tau_{2}}}{\sqrt{\pi}}\,_{2}F_{2}\left(\frac{n}{2}+2,\frac{n}{2}+\frac{5}{2};\frac{3}{2},\frac{3}{2};\tau_{2}\right)-(n+2)\,_{2}F_{2}\left(\frac{n}{2}+\frac{3}{2},\frac{n}{2}+2;1,\frac{3}{2};\tau_{2}\right).$

##  Appendix E Asymptotics of $\mathdutchcal{g}^{\pm}(\tau_{1},\tau_{2})$ for
$\tau_{1},\tau_{2}\to 0$

Using $\lim_{z\to 0}{}_{2}F_{2}(a,b;c,d;z)=1$ and the definition of
$\mathcal{C}^{+}(\tau_{1},\tau_{2})$ and $\mathcal{C}^{-}(\tau_{1},\tau_{2})$
in equations (103) and (110) for $\tau_{1},\tau_{2}\to 0$ we find that,
$\mathdutchcal{g}^{\pm}(\tau_{1},\tau_{2})$ becomes,

$\mathdutchcal{g}^{+}(\tau_{1},\tau_{2})\simeq\sum_{n=1}^{\infty}\frac{(-1)^{n+1}n\tau_{1}^{n/2}}{\Gamma\left(1+\frac{n}{2}\right)\sqrt{\pi\tau_{2}}}$
(111)

and

$\mathdutchcal{g}^{-}(\tau_{1},\tau_{2})\simeq\sum_{n=0}^{\infty}\frac{(-1)^{n}\tau_{1}^{n/2}}{\Gamma\left(1+\frac{n}{2}\right)\sqrt{\pi\tau_{2}}},$
(112)

and for $\tau_{1}\to 0$ the sums in equations (111) and (112) being dominated
by the first term, reduce to

$\mathdutchcal{g}^{+}(\tau_{1},\tau_{2})\simeq\frac{2}{\pi}\sqrt{\frac{\tau_{1}}{\tau_{2}}},$
(113)

and

$\mathdutchcal{g}^{-}(\tau_{1},\tau_{2})\simeq\frac{1}{\sqrt{\pi\tau_{2}}}.$
(114)

## References

  * [1] Jean-Paul Diard, Nicolas Glandut, Claude Montella, and Jean-Yves Sanchez.  One layer, two layers, etc. an introduction to the eis study of multilayer electrodes. part 1: Theory.  Journal of Electroanalytical Chemistry, 578(2):247–257, 2005.
  * [2] Viatcheslav Freger.  Diffusion impedance and equivalent circuit of a multilayer film.  Electrochemistry Communications, 7(9):957–961, 2005.
  * [3] R Ngameni and P Millet.  Derivation of the diffusion impedance of multi-layer cylinders. application to the electrochemical permeation of hydrogen through pd and pdag hollow cylinders.  Electrochimica Acta, 131:52–59, 2014.
  * [4] Yi-Qiao Song, Seungoh Ryu, and Pabitra N Sen.  Determining multiple length scales in rocks.  Nature, 406(6792):178–181, 2000.
  * [5] Ronald A Siegel.  A laplace transform technique for calculating diffusion time lags.  Journal of Membrane Science, 26(3):251–262, 1986.
  * [6] Giuseppe Pontrelli and Filippo de Monte.  Mass diffusion through two-layer porous media: an application to the drug-eluting stent.  International Journal of Heat and Mass Transfer, 50(17-18):3658–3669, 2007.
  * [7] Rob Phillips, Jane Kondev, Julie Theriot, Hernan G Garcia, and Nigel Orme.  Physical Biology of the Cell.  Garland Science, 2012.
  * [8] V. M Kenkre, L Giuggioli, and Z Kalay.  Molecular motion in cell membranes: analytic study of fence-hindered random walks.  Physical Review E, 77(5):051907, 2008.
  * [9] Akihiro Kusumi, Chieko Nakada, Ken Ritchie, Kotono Murase, Kenichi Suzuki, Hideji Murakoshi, Rinshi S Kasai, Junko Kondo, and Takahiro Fujiwara.  Paradigm shift of the plasma membrane concept from the two-dimensional continuum fluid to the partitioned fluid: high-speed single-molecule tracking of membrane molecules.  Annu. Rev. Biophys. Biomol. Struct., 34:351–378, 2005.
  * [10] Victor Nikonenko and Natalia Pismenskaya.  Ion and molecule transport in membrane systems.  International Journal of Molecular Sciences, 22(7):3556, 2021.
  * [11] W Howard Evans and Patricia EM Martin.  Gap junctions: structure and function.  Molecular Membrane Biology, 19(2):121–136, 2002.
  * [12] Barry W Connors and Michael A Long.  Electrical synapses in the mammalian brain.  Annual Review of Neuroscience, 27:393–418, 2004.
  * [13] Denis S Grebenkov, Dang Van Nguyen, and Jing-Rebecca Li.  Exploring diffusion across permeable barriers at high gradients. i. narrow pulse approximation.  Journal of Magnetic Resonance, 248:153–163, 2014.
  * [14] Denis S Grebenkov.  Exploring diffusion across permeable barriers at high gradients. ii. localization regime.  Journal of Magnetic Resonance, 248:164–176, 2014.
  * [15] Hawthorne L Beyer, Eliezer Gurarie, Luca Börger, Manuela Panzacchi, Mathieu Basille, Ivar Herfindal, Bram Van Moorter, Subhash R. Lele, and Jason Matthiopoulos.  ‘you shall not pass!’: quantifying barrier permeability and proximity avoidance by animals.  Journal of Animal Ecology, 85(1):43–53, 2016.
  * [16] V. M Kenkre and L Giuggioli.  Theory of the Spread of Epidemics and Movement Ecology of Animals: An Interdisciplinary Approach Using Methodologies of Physics and Mathematics.  Cambridge University Press, 2021.
  * [17] Julia C Assis, Henrique C Giacomini, and Milton Cezar Ribeiro.  Road permeability index: evaluating the heterogeneous permeability of roads for wildlife crossing.  Ecological Indicators, 99:365–374, 2019.
  * [18] Paul Lévy.  Sur certains processus stochastiques homogènes.  Compositio Mathematica, 7:283–339, 1940.
  * [19] Willliam Feller.  Introduction to Probability Theory and its Applications, Vol 2.  John Wiley & Sons, New York, 1950.
  * [20] Emil Julius Gumbel.  Statistics of Extremes.  Columbia University Press, New York, 1958.
  * [21] Satya N Majumdar, Arnab Pal, and Grégory Schehr.  Extreme value statistics of correlated random variables: a pedagogical review.  Physics Reports, 840:1–32, 2020.
  * [22] Grégory Schehr and Pierre Le Doussal.  Extreme value statistics from the real space renormalization group: Brownian motion, Bessel processes and continuous time random walks.  Journal of Statistical Mechanics: Theory and Experiment, 2010(01):P01009, 2010.
  * [23] Julien Randon-Furling and Satya N Majumdar.  Distribution of the time at which the deviation of a Brownian motion is maximum before its first-passage time.  Journal of Statistical Mechanics: Theory and Experiment, 2007(10):P10008, 2007.
  * [24] Satya N Majumdar, Julien Randon-Furling, Michael J Kearney, and Marc Yor.  On the time to reach maximum for a variety of constrained Brownian motions.  Journal of Physics A: Mathematical and Theoretical, 41(36):365005, 2008.
  * [25] Grégory Schehr, Satya N Majumdar, Alain Comtet, and Julien Randon-Furling.  Exact distribution of the maximal height of p vicious walkers.  Physical Review Letters, 101(15):150601, 2008.
  * [26] Francesco Mori, Satya N Majumdar, and Grégory Schehr.  Distribution of the time of the maximum for stationary processes.  Europhysics Letters, 135(3):30003, 2021.
  * [27] Francesco Mori, Satya N Majumdar, and Grégory Schehr.  Time to reach the maximum for a stationary stochastic process.  Physical Review E, 106(5):054110, 2022.
  * [28] Prashant Singh and Arnab Pal.  Extremal statistics for stochastic resetting systems.  Physical Review E, 103(5):052119, 2021.
  * [29] Prashant Singh.  Extreme value statistics and arcsine laws for heterogeneous diffusion processes.  Physical Review E, 105(2):024113, 2022.
  * [30] Yan V Fyodorov and Pierre Le Doussal.  Moments of the position of the maximum for gue characteristic polynomials and for log-correlated gaussian processes.  Journal of Statistical Physics, 164(1):190–240, 2016.
  * [31] Mathieu Delorme and Kay Jörg Wiese.  Extreme-value statistics of fractional Brownian motion bridges.  Physical Review E, 94(5):052105, 2016.
  * [32] Mathieu Delorme and Kay Jörg Wiese.  Perturbative expansion for the maximum of fractional brownian motion.  Physical Review E, 94(1):012134, 2016.
  * [33] Tridib Sadhu, Mathieu Delorme, and Kay Jörg Wiese.  Generalized arcsine laws for fractional Brownian motion.  Physical Review Letters, 120(4):040603, 2018.
  * [34] Erik Sparre Andersen.  On the fluctuations of sums of random variables.  Mathematica Scandinavica, pages 263–285, 1953.
  * [35] Satya N Majumdar.  Universal first-passage properties of discrete-time random walks and Lévy flights on a line: Statistics of the global maximum and records.  Physica A: Statistical Mechanics and its Applications, 389(20):4299–4316, 2010.
  * [36] Satya N Majumdar, Alberto Rosso, and Andrea Zoia.  Time at which the maximum of a random acceleration process is reached.  Journal of Physics A: Mathematical and Theoretical, 43(11):115001, 2010.
  * [37] Theodore W Burkhardt.  First-passage and extreme-value statistics of a particle subject to a constant force plus a random force.  Journal of Statistical Physics, 133:217–230, 2008.
  * [38] Prashant Singh and Anupam Kundu.  Generalised ‘arcsine’laws for run-and-tumble particle in one dimension.  Journal of Statistical Mechanics: Theory and Experiment, 2019(8):083205, 2019.
  * [39] Francesco Mori, Pierre Le Doussal, Satya N Majumdar, and Grégory Schehr.  Universal properties of a run-and-tumble particle in arbitrary dimension.  Physical Review E, 102(4):042133, 2020.
  * [40] Francesco Mori, Pierre Le Doussal, Satya N Majumdar, and Grégory Schehr.  Universal survival probability for a d-dimensional run-and-tumble particle.  Physical Review Letters, 124(9):090603, 2020.
  * [41] Prashant Singh, Saikat Santra, and Anupam Kundu.  Extremal statistics of a one-dimensional run and tumble particle with an absorbing wall.  Journal of Physics A: Mathematical and Theoretical, 55(46):465004, 2022.
  * [42] Francesco Mori, Satya N Majumdar, and Grégory Schehr.  Time between the maximum and the minimum of a stochastic process.  Physical Review Letters, 123(20):200201, 2019.
  * [43] Francesco Mori, Satya N Majumdar, and Grégory Schehr.  Distribution of the time between maximum and minimum of random walks.  Physical Review E, 101(5):052111, 2020.
  * [44] Frank Den Hollander, Satya N Majumdar, Janusz M Meylahn, and Hugo Touchette.  Properties of additive functionals of Brownian motion with resetting.  Journal of Physics A: Mathematical and Theoretical, 52(17):175001, 2019.
  * [45] Satya N Majumdar and Alain Comtet.  Local and occupation time of a particle diffusing in a random medium.  Physical Review Letters, 89(6):060601, 2002.
  * [46] DS Grebenkov.  Residence times and other functionals of reflected Brownian motion.  Physical Review E, 76(4):041139, 2007.
  * [47] Alexander M Berezhkovskii, Veaceslav Zaloj, and Noam Agmon.  Residence time distribution of a Brownian particle.  Physical Review E, 57(4):3937, 1998.
  * [48] Alain Comtet and Jean Desbois.  Brownian motion in wedges, last passage time and the second arc-sine law.  Journal of Physics A: Mathematical and General, 36(17):L255, 2003\.
  * [49] Paul C Bressloff and Sean D Lawley.  Residence times of a Brownian particle with temporal heterogeneity.  Journal of Physics A: Mathematical and Theoretical, 50(19):195001, 2017.
  * [50] Golan Bel and Eli Barkai.  Occupation times and ergodicity breaking in biased continuous time random walks.  Journal of Physics: Condensed Matter, 17(49):S4287, 2005.
  * [51] Hermann Joël Ouandji Boutcheng, Thomas Bouetou Bouetou, Theodore W Burkhardt, Alberto Rosso, Andrea Zoia, and Kofane Timoleon Crepin.  Occupation time statistics of the random acceleration model.  Journal of Statistical Mechanics: Theory and Experiment, 2016(5):053213, 2016.
  * [52] Eli Barkai.  Residence time statistics for normal and fractional diffusion in a force field.  Journal of statistical physics, 123:883–907, 2006.
  * [53] Shai Carmi, Lior Turgeman, and Eli Barkai.  On distributions of functionals of anomalous diffusion paths.  Journal of Statistical Physics, 141:1071–1092, 2010.
  * [54] John E Tanner.  Transient diffusion in a system partitioned by permeable barriers. application to nmr measurements with a pulsed field gradient.  The Journal of Chemical Physics, 69(4):1748–1754, 1978.
  * [55] Jack G Powles, MJD Mallett, Gerald Rickayzen, and WAB Evans.  Exact analytic solutions for diffusion impeded by an infinite array of partially permeable barriers.  Proceedings of the Royal Society of London. Series A: Mathematical and Physical Sciences, 436(1897):391–403, 1992.
  * [56] Toby Kay and Luca Giuggioli.  Diffusion through permeable interfaces: fundamental equations and their application to first-passage and local time statistics.  Physical Review Research, 4(3):L032039, 2022.
  * [57] Hannes Risken and Hannes Risken.  Fokker-planck equation.  Springer, 1996.
  * [58] George E Roberts and Hyman Kaufman.  Table of Laplace Transforms.  WB Saunders, 1966.
  * [59] Milton Abramowitz, Irene A Stegun, and Robert H Romer.  Handbook of mathematical functions with formulas, graphs, and mathematical tables.  American Association of Physics Teachers, 1988.
  * [60] Mark Kac.  On distributions of certain Wiener functionals.  Transactions of the American Mathematical Society, 65(1):1–13, 1949\.
  * [61] Satya N Majumdar.  Brownian functionals in physics and computer science.  In The Legacy Of Albert Einstein: A Collection of Essays in Celebration of the Year of Physics, pages 93–129. World Scientific, 2007.
  * [62] Debraj Das and Luca Giuggioli.  Dynamics of lattice random walk within regions composed of different media and interfaces.  Journal of Statistical Mechanics: Theory and Experiment, 2023(1):013201, 2023.
  * [63] Toby Kay and Luca Giuggioli.  Subdiffusion in the presence of reactive boundaries: A generalized Feynman–Kac approach.  Journal of Statistical Physics, 190(5):92, 2023.
  * [64] Harry Bateman.  Higher transcendental functions, volume 1.  McGraw-Hill Book Company, 1953.