# Local time for run and tumble particle

Prashant Singh and Anupam Kundu<EMAIL_ADDRESS><EMAIL_ADDRESS>International Centre for Theoretical Sciences, Tata
Institute of Fundamental Research, Bengaluru 560089, India

###### Abstract

We investigate the local time $(T_{loc})$ statistics for a run and tumble
particle in an one dimensional inhomogeneous medium. The inhomogeneity is
introduced by considering the position dependent rate of the form
$R(x)=\gamma\frac{|x|^{\alpha}}{l^{\alpha}}$ with $\alpha\geq 0$. For
$\alpha=0$, we derive the probability distribution of $T_{loc}$ exactly which
is expressed as a series of $\delta$-functions in which the coefficients can
be interpreted as the probability of multiple revisits of the particle to the
origin starting from the origin. For general $\alpha$, we show that the
typical fluctuations of $T_{loc}$ scale with time as $T_{loc}\sim
t^{\frac{1+\alpha}{2+\alpha}}$ for large $t$ and their probability
distribution possesses a scaling behaviour described by a scaling function
which we have computed analytically. In the second part, we study the
statistics of $T_{loc}$ till the RTP makes a first passage to $x=M~{}(>0)$. In
this case also, we show that the probability distribution can be expressed as
a series sum of $\delta$-functions for all values of $\alpha~{}(\geq 0)$ with
coefficients appearing from appropriate exit problems. All our analytical
findings are supported with the numerical simulations.

##  I INTRODUCTION

Local time refers to the total time that a particle spends in the
neighbourhood of a given point in space when it is evolved till time $t$. The
study of the properties of local time comes handy in a wide range of
interdisciplinary settings. For example, in chemical reactions where a
catalytic agent reacts with reactants that are heterogeneously distributed in
the space, the yield of the product is correlated to the amount of time spent
by the agent in the vicinity of the reactants Wilemski1973 ; Benichou2005 ;
Doi1975 ; Temkin1984 . Similarly, in biological applications, the action of a
molecule inside a cell depends on the time that it spends inside the cell.
This time is called the residence time which in the limit of small cell volume
reduces to the local time Redner2001 ; Pal2019  . Therefore, it is important
to compute the statistical properties of the local time for various processes.
For stochastic processes, deciphering the local time statistics turns out to
be important as it can provide the information about the spatio-temporal
properties of the particle’s trajectory. In the past, the local time has been
widely studied in the context of various stochastic processes like diffusion
in random potential landscape MajumdarSNC2002 ; SabhapanditS2006 , Ornstein-
Uhlenbeck process Kishore2020 , continuous time random walk Carmi2010 ,
Brownian excursions Louchard1984 , uniform empirical process Csorgo1999 ,
reflected Brownian motion Grebenkov2007 , diffusion on graph Comtet2002  and
diffusion under resetting PalA2019 .

While the statistical properties of the local time are quite extensively
studied for Brownian motion (BM) and its generalisations, very less amount of
study has been performed for active processes. We study the statistical
properties of the local time for run and tumble particle (RTP) which is an
emblematic model for active systems. Such study is particularly relevant in
the present day research where the self propelled motion of these particles
are harnessed to produce the useful work Santiago2018  which has the
possibility of potential therapeutic application of the active particles as
drug delivery machines for diseases like cancer and heart disease Ghosh2020 .
Under this circumstance, one important quantity to keep track of would be the
time that the particle spends in the vicinity of the desired location as this
time can quantify the efficiency of these machines. Motivated from these
applications, we study the local time statistics for the run and tumble
particle.

In the random walk literature, run and tumble motion is known as the
persistent Brownian motion and has been substantially studied in the past
Weiss2002 ; Masoliver2017 . Recently the model has seen surge in interest due
to its biological application in modelling the motion of bacteria like E- Coli
Berg2003 . The collective dynamics of interacting RTPs along with their self
propelling nature give rise to various novel phenomena like motility induced
phase separation Tailleur2008 ; Solon2015 , clustering Sepulveda2016 , non-
existence of equation of state SolonA2015  and so on. Furthermore, even at the
individual level a single RTP exhibits interesting features and a myriad of
its properties are known. Examples include - probability distribution in free
space as well as in confining potential Malakar2018 ; DemaerelA2018 ;
DharA2019 ; Basu2020 ; Majumdarresetting2018 , first passage time properties
Angelani2014 ; DoussalMaj2019 ; Mori2019 , arcsine laws Singh2019 , escape
problems Woillez2019 , convex hull Hartmann2020 , large deviation forms
Gradenigo2019 ; Banerjee2019 ; Santra2020 , distribution of maximum
Masoliver1993 ; Bertrand2020 , behaviour in inhomogeneous medium Doussal2020 ;
Singh2020  and so on. Other models like active Brownian particle have also
been considerably studied in the recent years BasuU2018 ; BasuU2019 .

In this paper, we investigate the statistical properties of the local time for
a RTP in one dimension. Generalising the formalism of Feynman and Kac Kac1949
; Kac1951 ; Majumdar2005  to the case of RTP, we deploy this method to obtain
the distribution and moments of the local time. Furthermore, experimentally it
is seen that the motility parameters of E- Coli strongly depend on the
nutrient concentration and nutrient gradient. This provides us the impetus to
generalise the RTP model in an inhomogeneous environment. Recently in
Singh2020 , such generalisation of RTP model was considered on infinite as
well as on semi-infinite line. While the RTP model in homogeneous environment
has been substantially studied and a huge amount of results are known, very
few results exist for the inhomogeneous RTP model. In an attempt in this
direction, we study the statistics of the local time for inhomogeneous RTP
model in this paper. As illustrated later, such extensions give rise to non-
trivial scaling forms. Moreover in many practical applications, the particle
moves in a bounded domain and one is interested in the knowledge of time that
the particle spends in the vicinity of some point before getting absorbed by
the boundaries Pal2019 . For example, the enzymatic action of a diffusing
protein inside a cell is related to the time that the protein spends inside
cell before it finds the correct binding site Redner2001 . Guided by these
applications, we have considered the statistics of local time in semi-infinite
line with the absorbing boundary condition in the second part of the paper.

The paper is organised as follows. In sec. II, we introduce the model and
summarise the main results of our paper. Sec. III deals with the local time
statistics in an infinite line with sec. III.1 containing discussions for
$\alpha=0$ and sec. III.2 for general $\alpha$. We devote sec. IV for the
local time in presence of an absorbing wall with sec. IV.1 for $\alpha=0$ and
sec. IV.2 for general $\alpha$ followed by the conclusion in sec. V.

##  II MODEL AND SUMMARY OF RESULTS

We study the motion of a run and tumble particle (RTP) in one dimension in an
inhomogeneous medium. The time evolution equation for the position of the
particle is given by

$\displaystyle\frac{dx}{dt}=v\sigma(t),$ (1)

where $v~{}(>0)$ is the speed of the particle and $\sigma(t)$ is the its
instantaneous direction which is governed by the telegraphic or dichotomous
noise that alternates between $\pm 1$ with some rate $R$. For constant $R$,
the noise, at different times, are exponentially correlated as
$v^{2}\langle\sigma(t)\sigma(t^{\prime})\rangle=v^{2}e^{-2R|t-t^{\prime}|}$
which makes it a non-Markovian process. However in the limit $R\to\infty$,
$v\to\infty$ keeping $\frac{v^{2}}{R}$ fixed, the particle behaves like a
Brownian particle with diffusion constant $\frac{v^{2}}{2R}$. On the other
hand, when $R\to 0$, the particle performs the ballistic motion.

Here we study the generalised version of this model in which the run and
tumble particle moves in an inhomogeneous medium. The inhomogeneity is
introduced by considering the position dependent rate of flipping $R(x)$
Singh2020 . In this paper, we focus on the following form of the rate:

$\displaystyle
R(x)=\gamma\frac{|x|^{\alpha}}{l^{\alpha}},~{}~{}~{}~{}~{}\text{with
}\alpha\geq 0,$ (2)

where $\gamma$ is a positive constant that sets the timescale for the activity
and $l$ is the length over which the rate varies. For $\alpha=0$, we recover
the usual RTP model with constant rate $\gamma$.

The inhomogeneous model is recently studied in Singh2020 , where the authors
explicitly computed the probability distribution and persistent properties for
all values of $\alpha$. Here we focus on the statistical properties of the
local time (denisty) which is defined as

$\displaystyle T_{loc}(b)=\int_{0}^{t}\delta(x(\tau)-b)d\tau.$ (3)

Physically $T_{loc}(b)db$ is the time that the particle spends in the region
$b$ to $b+db$ out of total time $t$. For simplicity, we take $b=0$ (unless
specified) and denote $T_{loc}(0)$ by simply $T_{loc}$. For a typical
trajectory of the particle, we have illustrated $T_{loc}$ schematically in
Fig. 1. Using the generalisation of the Feynman-Kac formalism Kac1949 ;
Kac1951 ; Majumdar2005 , we compute the probability distribution and moments
of $T_{loc}$ for all values of $\alpha$.

In the second part of the paper, we consider the motion of a RTP starting from
$x_{0}=0$ in presence of an absorbing wall at $x=M$ and study the properties
of the local time at the origin till it gets absorbed by the wall. We
generalise the formalism due to Feynman and Kac and compute the distribution
of $T_{loc}$ for all values of $\alpha$. We summarise our results below:

### Infinite line

  * •

For $\alpha=0$, we derive exactly the moments generating functions from which
we provide the expression of first three moments of $T_{loc}$. Using these
expressions, we find that the local time scales typically as
$T_{loc}\sim\sqrt{t}$ at large $t$ which corresponds to the Brownian limit of
the RTP model. On the other hand, as $t\to 0^{+}$, all moments have non-zero
value which is in contrast to the Brownian motion where moments vanish as
$t\to 0^{+}$.

  * •

We also compute the exact probability distribution of $T_{loc}$ for $\alpha=0$
in Eq. (4) which consists of a series of appropriately weighted
$\delta$-functions as

$\displaystyle
P\left(T_{loc},t\right)=\sum_{m=0}^{\infty}\mathcal{S}_{m}(t)~{}\delta\left(T_{loc}-\frac{2m+1}{2v}\right),$
(4) $\displaystyle\mathcal{S}_{m}(t)=e^{-\gamma t}\left[I_{m}(\gamma
t)+I_{m+1}(\gamma t)\right].$ (5)

While at large $t$ and large $T_{loc}$, the distribution $P(T_{loc},t)$
correctly reduces to that of the Brownian motion with diffusion constant
$\mathfrak{D}_{0}=\frac{v^{2}}{2\gamma}$, the short time behaviour is quite
different from that of a Brownian motion. For $t<<\frac{1}{\gamma}$, we find
that $P(T_{loc},t)\simeq\delta\left(T_{loc}-\frac{1}{2v}\right)$. The
coefficient $\mathcal{S}_{m}(t)$ of the delta function
$\delta\left(T_{loc}-\frac{2m+1}{2v}\right)$ can be associated to the
probability of $m$-th visit by the RTP to the origin starting from the origin.
Thus, as a by-product we also obtain the exact expression for the probability
$\mathcal{S}_{m}(t)$ that the RTP visits the origin $m$-times starting from
the origin till time $t$ in Eq. (5).

  * •

For general $\alpha$, we compute the expressions of all moments for large $t$
and they are given by

$\displaystyle\langle
T_{loc}^{n}(t)\rangle\simeq\frac{n!}{\mathcal{C}_{\alpha}^{n}\Gamma\left(\frac{1+(n+1)(1+\alpha)}{2+\alpha}\right)}t^{\frac{n(1+\alpha)}{2+\alpha}},$
(6)

for $n=1,2,3...$ These late time growths of the moments suggest that the
fluctuations of $T_{loc}$ scales typically as $T_{loc}\sim
t^{\frac{1+\alpha}{2+\alpha}}$ with time which is the extension of $\sqrt{t}$
scaling for $\alpha=0$ case.

  * •

Furthermore, for general $\alpha~{}(>0)$, we show that at large $t$ the
probability distribution for the typical fluctuations of $T_{loc}$ possesses a
scaling behaviour of the form

$\displaystyle
P(T_{loc},t)\simeq\frac{\mathcal{C}_{\alpha}}{t^{\frac{1+\alpha}{2+\alpha}}}~{}f_{\alpha}\left(\frac{\mathcal{C}_{\alpha}T_{loc}}{t^{\frac{1+\alpha}{2+\alpha}}}\right),$
(7)

where $\mathcal{C}_{\alpha}$ is a constant given in Eq. (55) and the scaling
function $f_{\alpha}(z)$ is given explicitly by

$\displaystyle f_{\alpha}(z)=\frac{1}{\pi}\sum_{n=1}^{\infty}$
$\displaystyle\frac{(-z)^{n-1}}{n!}\frac{\Gamma\left(1+n\frac{1+\alpha}{2+\alpha}\right)}{\left(\frac{1+\alpha}{2+\alpha}\right)}$
$\displaystyle\times~{}\sin\left(\pi n\frac{1+\alpha}{2+\alpha}\right).$ (8)

Using saddle point approximation, we show that $f_{\alpha}(z)$ for large $z$
decays as
$~{}~{}~{}~{}~{}~{}~{}~{}~{}f_{\alpha}(z)\sim\text{exp}\left(-\frac{(1+\alpha)^{1+\alpha}}{(2+\alpha)^{2+\alpha}}~{}z^{2+\alpha}\right).$

### In presence of an absorbing wall

  * •

In the second part of the paper, we look at the distribution of $T_{loc}$ in
presence of an absorbing wall at $x=M~{}(>0)$. Here $T_{loc}$ is defined as
the local time (density) about the origin of the RTP starting from
$x_{0}=\epsilon~{}(\to 0^{+})$ before getting absorbed by the wall. For
$\alpha=0$, by solving the backward equations exactly, we obtain the
distribution $\mathcal{P}_{\pm}(T_{loc})$ of $T_{loc}$ and find that the
distribution in this case also consists of a series of $\delta$-functions as

$\displaystyle~{}~{}~{}~{}~{}~{}\mathcal{P}_{+}(T_{loc})=\sum_{m=0}^{\infty}\mathfrak{p}_{0}\left(1-\mathfrak{p}_{0}\right)^{m}\delta\left(T_{loc}-\frac{2m}{v}\right),$
(9)
$\displaystyle~{}~{}~{}~{}~{}~{}\mathcal{P}_{-}(T_{loc})=\sum_{m=1}^{\infty}\frac{\mathfrak{p}_{0}\left(1-\mathfrak{p}_{0}\right)^{m}}{(1-\mathfrak{p}_{0})}\delta\left(T_{loc}-\frac{2m}{v}\right),$
(10)

where $\mathfrak{p}_{0}=\frac{v}{v+\gamma M}$ and subscript “$\pm"$ in
$\mathcal{P}_{\pm}(T_{loc})$ denotes the initial velocity direction. Unlike in
the infinite line case, we find that the distribution can be sensitive to the
initial velocity depending on the initial position. Once again, based on path-
counting analysis, we argue that the $\delta\left(T_{loc}-\frac{2m}{v}\right)$
arises due to the fact that the RTP crosses the origin $m$-times before
getting absorbed by the wall. The coefficient of
$\delta\left(T_{loc}-\frac{2m}{v}\right)$ in Eqs. (9) and (10) is just the
probability that the RTP visits the origin $m$-times starting from the origin
before getting absorbed at the wall.

  * •

It turns out that one can extend the the path-counting analysis (done for
$\alpha=0$) to general $\alpha>0$ which guides us to generalise
$\mathcal{P}_{\pm}(T_{loc})$ in Eqs. (9) and (10) for general $\alpha>0$ as

$\displaystyle~{}~{}~{}~{}\mathcal{P}_{+}(T_{loc})=\sum_{m=0}^{\infty}\mathfrak{p}_{\alpha}\left(1-\mathfrak{p}_{\alpha}\right)^{m}\delta\left(T_{loc}-\frac{2m}{v}\right),$
(11)
$\displaystyle~{}~{}~{}~{}\mathcal{P}_{-}(T_{loc})=\sum_{m=1}^{\infty}\frac{\mathfrak{p}_{\alpha}\left(1-\mathfrak{p}_{\alpha}\right)^{m}}{(1-\mathfrak{p}_{\alpha})}\delta\left(T_{loc}-\frac{2m}{v}\right),$
(12)

where $\mathfrak{p}_{\alpha}=\frac{v(1+\alpha)l^{\alpha}}{\gamma
M^{1+\alpha}+v(1+\alpha)l^{\alpha}}$ represents the probability that the
particle starting from $0^{+}$ gets absorbed at the absorbing boundary without
ever revisiting the origin.

In what follows, we provide a detailed derivation of these results. For the
clarity of presentation, we will relegate some calculations to the appendices.

Figure 1: Schematic of the local time for a typical trajectory of the RTP till
time $t$ (shown by red line). We consider a small interval of thickness
$2\epsilon$ about the origin (shown by green lines). Out of the total time
$t$, the particle spends $T_{2\epsilon}=\tau_{0}+\tau_{1}+\tau_{2}+\tau_{3}$
amount of time in this interval. For this case, the local time (density) is
defined as $T_{loc}=\lim_{\epsilon\to
0}\left[\frac{\tau_{0}+\tau_{1}+\tau_{2}+\tau_{3}}{2\epsilon}\right]$.

Figure 2: Plot of the first three moments of $T_{loc}$ (shown by solid line)
as a function of $t$ for $\alpha=0$ as obtained in Eq. (35) and comparision
with the numerical simulations (shown by red filled circles). We have taken
$v=1,~{}\gamma=1$. The simulation is conducted with $\epsilon=0.001$. for all
plots.

##  III LOCAL TIME STATISTICS IN AN INFINITE LINE

We begin with the calculations of the moments and distribution of $T_{loc}$
for inhomogeneous RTP model with rate $R(x)$ defined in Eq. (2). We denote the
probability distribution of $T_{loc}$ as $P_{\pm}\left(T_{loc},x_{0},t\right)$
given that the particle initially starts from $x_{0}$ with velocity $\pm v$
and is allowed to evolve till time $t$. We define the Laplace transformation
of $P_{\pm}\left(T_{loc},x_{0},t\right)$ with respect to $T_{loc}$ as

$\displaystyle
Q_{\pm}(p,x_{0},t)=\int_{0}^{\infty}~{}dT_{loc}~{}e^{-pT_{loc}}~{}P_{\pm}\left(T_{loc},x_{0},t\right),$
(13)

where $p$ is the conjugate variable of $T_{loc}$.
To derive the statistics of $T_{loc}$, we proceed as follows: Intitively, the
local time (density) can be understood, following P. Lévy Balkema1990 , as

$\displaystyle T_{loc}=\lim_{\epsilon\to
0^{+}}\frac{T_{2\epsilon}}{2\epsilon},~{}\text{with }$ (14) $\displaystyle
T_{2\epsilon}=\int_{0}^{t}\mathbb{I}_{\epsilon}\left(x(\tau)\right)d\tau,$
(15)

where
$\mathbb{I}_{\epsilon}\left(x(\tau)\right)=\Theta\left(x(\tau)+\epsilon\right)\Theta\left(\epsilon-x(\tau)\right)$
with $\Theta(x)$ being the Heaviside Theta function and $\epsilon>0$. The
choice of the Heaviside function ensures that
$\mathbb{I}_{\epsilon}\left(x\right)$ is $1$ for $-\epsilon<x<\epsilon$ and
$0$ otherwise. Here $T_{2\epsilon}$ is the time spent by the RTP inside a
small but non-zero interval $x\in[-\epsilon,\epsilon]$ till time $t$. Denoting
the distribution of $T_{2\epsilon}$ by $G_{\pm}(T_{2\epsilon},x_{0},t)$ with
initial velocity $\pm v$, we consider the Laplace transform with respect to
$T_{2\epsilon}$ as

$\displaystyle
H_{\pm}(q,x_{0},t)=\int_{0}^{\infty}~{}dT_{2\epsilon}~{}e^{-qT_{2\epsilon}}~{}G_{\pm}\left(T_{2\epsilon},x_{0},t\right).$
(16)

Following the formalism due to Feynman and Kac Kac1949 ; Kac1951 ;
Majumdar2005 , we write the backward master equations for
$H_{\pm}(p,x_{0},t)$:

$\displaystyle\partial_{t}H_{+}$
$\displaystyle=~{}~{}v\partial_{x_{0}}H_{+}-R(x_{0})H_{+}+R(x_{0})H_{-}-q\mathbb{I}_{\epsilon}\left(x_{0}\right)H_{+},$
$\displaystyle\partial_{t}H_{-}$
$\displaystyle=-v\partial_{x_{0}}H_{-}+R(x_{0})H_{+}-R(x_{0})H_{-}-q\mathbb{I}_{\epsilon}\left(x_{0}\right)H_{-},$
(17)

with $R(x)$ defined in Eq. (2). These equations are derived explicitly in
Appendix A. Our aim now is to solve these coupled equations for $\alpha\geq
0$. To solve them, we have to specify the initial condition and the boundary
conditions which are given by

$\displaystyle H_{\pm}(q,x_{0},t=0)=1,$ (18) $\displaystyle
H_{\pm}(q,x_{0}\to\pm\infty,t)=1.$ (19)

To understand Eq. (18), we note from the definition of $T_{2\epsilon}$ in Eq.
(15) that, $T_{2\epsilon}\to 0$ in the limit $t\to 0$, which in turn provides
$H_{\pm}(q,x_{0},t\to 0)=1$. The boundary conditions in Eq. (19) can be
understood in the following way. If $x_{0}\to\pm\infty$, then the particle
initially is very far away from the origin and it will not reach the interval
$x\in[-\epsilon,\epsilon]$ in any finite time $t$. This implies that the
particle does not spend any time in the interval which results in
$T_{2\epsilon}$ being equal to zero. In other words,
$G_{\pm}(T_{2\epsilon},x_{0}\to\pm\infty,t)=\delta(T_{2\epsilon})$. Inserting
this form of $G_{\pm}(T_{2\epsilon},x_{0}\to\pm\infty,t)$ in Eq. (16), we see
that $H_{\pm}(q,x_{0}\to\pm\infty,t)=1$.
Recall that ultimately, the aim is to compute
$P_{\pm}\left(T_{loc},x_{0},t\right)$. To obtain this distribution, we
substitute the definition of $T_{loc}$ from Eq. (14) in
$Q_{\pm}\left(p,x_{0},t\right)$ in Eq. (13) and use
$P_{\pm}\left(T_{loc},x_{0},t\right)dT_{loc}=G_{\pm}(T_{2\epsilon},x_{0},t)dT_{2\epsilon}$
which yields

$\displaystyle Q_{\pm}\left(p,x_{0},t\right)=\lim_{\epsilon\to
0}H_{\pm}\left(\frac{p}{2\epsilon},x_{0},t\right).$ (20)

In what follows, we solve the backward equations (17) with the conditions in
Eqs. (18) and (19) and then use Eq. (20) to compute the distribution of
$T_{loc}$. To solve Eqs. (17), we take the Laplace transformation of
$H_{\pm}(p,x_{0},t)$ with respect to $t$ as

$\displaystyle\bar{H}_{\pm}(q,x_{0},s)=\int_{0}^{\infty}dt~{}e^{-st}~{}H_{\pm}(q,x_{0},t).$
(21)

It is straightforward to translate the boundary conditions in Eq. (19) in
terms of $\bar{H}_{\pm}(q,x_{0},s)$ as

$\displaystyle\bar{H}_{\pm}(q,x_{0}\to\pm\infty,s)=\frac{1}{s}.$ (22)

Introducing the following two new functions

$\displaystyle
2\bar{H}(q,x_{0},s)=\bar{H}_{+}(q,x_{0},s)+\bar{H}_{-}(q,x_{0},s),$ (23)
$\displaystyle
2\bar{Z}(q,x_{0},s)=\bar{H}_{+}(q,x_{0},s)-\bar{H}_{-}(q,x_{0},s),$ (24)

we rewrite the master equations (17) in Laplace space as

$\displaystyle
s\bar{H}-1=v\partial_{x_{0}}\bar{Z}-q\mathbb{I}_{\epsilon}\left(x_{0}\right)\bar{H},$
(25) $\displaystyle
s\bar{Z}=v\partial_{x_{0}}\bar{H}-2R(x_{0})\bar{Z}-q\mathbb{I}_{\epsilon}\left(x_{0}\right)\bar{Z}.$
(26)

The second equation can be used to write $\bar{Z}(q,x_{0},s)$ in terms of
$\bar{H}(q,x_{0},s)$ which then can be substituted in Eq. (25) to get a
differential equation only for $\bar{H}(q,x_{0},s)$ which reads

$\displaystyle s\bar{H}-1=\frac{\partial}{\partial
x_{0}}\left(\frac{v^{2}}{s+2R(x_{0})+q\mathbb{I}_{\epsilon}}\frac{\partial\bar{H}}{\partial
x_{0}}\right)-q\mathbb{I}_{\epsilon}\left(x_{0}\right)\bar{H}.$ (27)

In what follows, we will first consider the case $\alpha=0$ for which we are
able to solve it exactly. From this solution, we obtain the moments and
distribution of $T_{loc}$. In the subsequent section III.2 we consider the
general $\alpha$ case for which we provide approximate solution that is valid
for small $s$ (equivalently large $t$).

Figure 3: Left panel: Numerical verification of the local time distribution
$P(T_{loc},t)$ in Eq. (4) for $\alpha=0$ for $v=1,~{}\gamma=1$ and $t=3$. For
simulation, we have chosen $\epsilon=0.01$. Right panel: Schematic of the
realisations that give rise to various terms in $P(T_{loc},t)$ in Eq. (4). For
the red trajectory, starting from the origin, the RTP does not cross the
origin till time $t$ and contributes $T_{loc}=\frac{\epsilon}{2\epsilon
v}=\frac{1}{2v}$ to $P(T_{loc},t)$. Similarly, for blue trajectory, the
particle crosses the origin once till time $t$ and contributes
$T_{loc}=\frac{3\epsilon}{2\epsilon v}=\frac{3}{2v}$ to $P(T_{loc},t)$.

###  III.1 Case I: $\alpha=0$

For $\alpha=0$, the rate function $R(x_{0})$ becomes $x_{0}$ independent and
is given by a constant value $R(x_{0})=\gamma$. This corresponds to the RTP
model in a homogeneous medium Malakar2018 . For this case, Eq. (27) can be
solved exactly for all values of $s$ and $q$. Rewriting this equation, we have

$\displaystyle s\bar{H}-1=\frac{\partial}{\partial
x_{0}}\left(\frac{v^{2}}{s+2\gamma+q\mathbb{I}_{\epsilon}}\frac{\partial\bar{H}}{\partial
x_{0}}\right)-q\mathbb{I}_{\epsilon}\left(x_{0}\right)\bar{H}.$ (28)

It is easy to solve this equation along with the boundary conditions in Eq.
(22). For clarity of the presentation, we have consigned the details of the
derivation to Appendix B and present only the end result here. The final
expressions for $\bar{H}_{\pm}\left(q,x_{0},s\right)$ read

$\displaystyle\bar{H}_{+}\left(q,x_{0},s\right)=\begin{cases}\frac{1}{s}+\mathcal{A}_{1}(q,s)e^{\frac{\lambda_{s}x_{0}}{v}},~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}\text{if
}-\infty<x_{0}<-\epsilon,\\\
\frac{1}{s+q}+\mathcal{A}_{2}(q,s)e^{\frac{\lambda_{q}x_{0}}{v}}+\mathcal{A}_{2}(q,s)\left(\frac{-\lambda_{q}+\gamma+s+q}{\gamma}\right)e^{\frac{-\lambda_{q}x_{0}}{v}},~{}~{}~{}~{}~{}~{}\text{if
}-\epsilon<x_{0}<\epsilon,\\\
\frac{1}{s}+\mathcal{A}_{1}(q,s)\left(\frac{-\lambda_{s}+\gamma+s}{\gamma}\right)e^{\frac{-\lambda_{s}x_{0}}{v}},~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}\text{if
}\epsilon<x_{0}<\infty.\end{cases}$ (29)
$\displaystyle\bar{H}_{-}\left(q,x_{0},s\right)=\begin{cases}\frac{1}{s}+\mathcal{A}_{1}(q,s)\left(\frac{-\lambda_{s}+\gamma+s}{\gamma}\right)e^{\frac{\lambda_{s}x_{0}}{v}},~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}\text{if
}-\infty<x_{0}<-\epsilon,\\\
\frac{1}{s+q}+\mathcal{A}_{2}(q,s)e^{-\frac{\lambda_{q}x_{0}}{v}}+\mathcal{A}_{2}(q,s)\left(\frac{-\lambda_{q}+\gamma+s+q}{\gamma}\right)e^{\frac{\lambda_{q}x_{0}}{v}},~{}~{}~{}~{}\text{if
}-\epsilon<x_{0}<\epsilon,\\\
\frac{1}{s}+\mathcal{A}_{1}(q,s)e^{-\frac{\lambda_{s}x_{0}}{v}},~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}\text{if
}\epsilon<x_{0}<\infty,\end{cases}$ (30)

where $\lambda_{s}=\sqrt{s(s+2\gamma)}$,
$\lambda_{q}=\sqrt{(s+q)(s+q+2\gamma)}$ and $\mathcal{A}_{1}(q,s)$ and
$\mathcal{A}_{2}(q,s)$ are $x_{0}$ \- independent functions that need to be
computed. Note that the solutions $\bar{H}_{\pm}\left(q,x_{0},s\right)$
satisfy the symmetry
$\bar{H}_{+}\left(q,-x_{0},s\right)=\bar{H}_{-}\left(q,x_{0},s\right)$. To
evaluate the functions $\mathcal{A}_{1}(q,s)$ and $\mathcal{A}_{2}(q,s)$, we
use the continuity of these solutions at $x_{0}=\pm\epsilon$ which gives rise
to two linear equations for $\mathcal{A}_{1}(q,s)$ and $\mathcal{A}_{2}(q,s)$.
Solving these equations provides $\mathcal{A}_{1}(q,s)$ and
$\mathcal{A}_{2}(q,s)$ which can then be used to compute the distribution of
residence time $T_{2\epsilon}$ in the interval $x\in[-\epsilon,\epsilon]$.
However in this paper, since we are interested in computing the distribution
of the local time $T_{loc}$ via Eq. (20), we will evaluate these functions at
$q=\frac{p}{2\epsilon}$ and take $\epsilon\to 0$. Also, for simplicity, we
choose $x_{0}=0$ and provide only the expression of
$\mathcal{A}_{2}\left(\frac{p}{2\epsilon},s\right)$ as

$\displaystyle\lim_{\epsilon\to
0}\mathcal{A}_{2}\left(\frac{p}{2\epsilon},s\right)=\frac{\lambda_{s}+s}{s\left(\lambda_{s}+s+\gamma-\gamma
e^{-\frac{p}{v}}\right)}e^{-\frac{p}{2v}}.$ (31)

Inserting this expression in the middle equation of Eqs. (29), we get the
expression of $\bar{\mathcal{H}}_{+}\left(\frac{p}{2\epsilon},0,s\right)$
which by symmetry is also equal to
$\bar{\mathcal{H}}_{-}\left(\frac{p}{2\epsilon},0,s\right)$. This can also be
verified by inserting $\lim_{\epsilon\to
0}\mathcal{A}_{2}\left(\frac{p}{2\epsilon},s\right)$ in
$\bar{\mathcal{H}}_{-}\left(\frac{p}{2\epsilon},0,s\right)$ in the middle
equation of Eqs. (30). Finally, taking Laplace transformation on both sides of
Eq. (20), we get $\bar{Q}_{\pm}(p,0,s)=\lim_{\epsilon\to
0}\bar{\mathcal{H}}_{\pm}\left(\frac{p}{2\epsilon},0,s\right)$ using which we
get

$\displaystyle\bar{Q}(p,s)=\frac{(\lambda_{s}+s)e^{-\frac{p}{2v}}}{s\left(\lambda_{s}+s+\gamma-\gamma
e^{-\frac{p}{v}}\right)},$ (32)

where we have used the notation $\bar{Q}(p,s)$ instead of
$\bar{Q}_{\pm}(p,0,s)$ since it is symmetric with respect to the initial
velocity because $x_{0}=0$. Hence, we also drop the subscripts $\pm$ in the
distribution $P_{\pm}(T_{loc},t)$ and denote it simply by $P(T_{loc},t)$. To
get the distribution $P(T_{loc},t)$, one has to perform two inverse Laplace
transformations - one with respect to $s$ and the other with respect to $p$.
We can also compute the moments of $T_{loc}$ by appropriately differentiating
$\bar{Q}(p,s)$ with respect to $p$. In the next, we first calculate the
moments of $T_{loc}$ followed by the derivation of the distribution
$P(T_{loc},t)$.

Figure 4: Plot of different moments of $T_{loc}$ (shown by red line) as a
function of $t$ for $\alpha=0.5$ as obtained in Eq. (6) and comparision with
the numerical simulations (shown by blue line). Values of oher parameters
chosen are $v=1,~{}\gamma=1,~{}l=1$. The slopes of the plots are (a)
$\frac{3}{5}$, (b) $\frac{6}{5}$ and (c) $\frac{9}{5}$.

####  III.1.1 Moments $\langle T_{loc}^{n}(t)\rangle$ for $\alpha=0$

Let us first look at the moments of $T_{loc}$ for $\alpha=0$. The moments of
$T_{loc}$ are obtained from the derivatives of $\bar{Q}(p,s)$ with respect to
$p$ as

$\displaystyle\langle T_{loc}^{n}(t)\rangle=\mathcal{I}_{s\to
t}^{-1}\left[(-1)^{n}\left(\frac{\partial^{n}\bar{Q}(p,s)}{\partial
p^{n}}\right)_{p=0}\right],$ (33)

where $\mathcal{I}_{s\to t}^{-1}$ indicates the inverse Laplace trasformation
from $s\to t$ and is defined for a general function $g(s)$ in terms of the
Bromwich integral as

$\displaystyle\mathcal{I}_{s\to
t}^{-1}\left[g(s)\right]=\int_{E-i\infty}^{E+i\infty}\frac{ds}{2\pi
i}~{}e^{st}~{}g(s),$ (34)

where $E$ is chosen in such a way that all the singularities are on the left
of the Bromwich contour. Inserting $\bar{Q}(p,s)$ from Eq. (32) in Eq. (33),
one can obtain the expressions of the individual moments although getting a
closed form expression for the $n$-th order moment turns out to be difficult.
Below, we provide the exact expression of the first three moments of
$T_{loc}$:

$\displaystyle\langle T_{loc}(t)\rangle=\frac{e^{-\gamma
t}}{2v}\left[(1+2\gamma t)I_{0}(\gamma t)+2\gamma tI_{1}(\gamma t)\right],$
$\displaystyle\langle T_{loc}^{2}(t)\rangle=\frac{1}{4v^{2}}\left(1+4\gamma
t\right),$ $\displaystyle\langle T_{loc}^{3}(t)\rangle=\frac{e^{-\gamma
t}}{8v^{3}}\left[(1+14\gamma t+16\gamma^{2}t^{2})I_{0}(\gamma t)\right.$
$\displaystyle\left.~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}+\left(6\gamma
t+16\gamma^{2}t^{2}\right)I_{1}(\gamma t)\right],$ (35)

where $I_{\nu}(\gamma t)$ stands for the modified Bessel function of first
kind. In Fig.2, we have plotted the first three moments of $T_{loc}$ and
compared them against the same obtained from numerical simulations. We observe
excellent agreement for all of them.
To contrast these expressions with that of the Brownian motion, it is
instructive to look at the asymptotic forms of $\langle T_{loc}^{n}(t)\rangle$
for small $t$. For small $t$ (or equivalently large $s$), one gets
$\lambda_{s}=\sqrt{s(2\gamma+s)}\simeq s$ which when substituted in
$\bar{Q}(p,s)$ in Eq. (32) gives
$\bar{Q}(p,s)\simeq\frac{e^{-\frac{p}{2v}}}{s}$. Inserting this expression in
Eq. (33) gives the moments for small $t$ as

$\displaystyle\langle
T_{loc}^{n}(t)\rangle\simeq\frac{1}{(2v)^{n}},~{}~{}~{}~{}\text{as }\gamma
t\to 0.$ (36)

Quite remarkably, we find that even when $t\to 0^{+}$, $\langle
T_{loc}^{n}(t)\rangle$ has a non-vanishing value as shown in Eq. (36). Note
that this is in contrast to the case of the Brownian particle where all
moments vanish in this limit. On the other hand, in the limit
$\gamma\to\infty$, $v\to\infty$ keeping
$\mathfrak{D}_{0}=\frac{v^{2}}{2\gamma}$ fixed, we find that
$\bar{Q}(p,s)\simeq\frac{2\mathfrak{D}_{0}}{\sqrt{s}(p+2\sqrt{s\mathfrak{D}_{0}})}$
substituting which in Eq. (33) gives

$\displaystyle\langle
T_{loc}^{n}(t)\rangle\simeq\frac{n!}{\Gamma\left(\frac{n}{2}+1\right)}\left(\frac{t}{4\mathfrak{D}_{0}}\right)^{\frac{n}{2}},~{}~{}\text{as
}\gamma t,~{}v\to\infty.$ (37)

Expectedly, this represents the moments of $T_{loc}$ for the Brownian motion
with diffusion constant $\mathfrak{D}_{0}$ SabhapanditS2006 .

####  III.1.2 $P\left(T_{loc},t\right)$ for $\alpha=0$

We now compute the probability distribution $P(T_{loc},t)$ for which we invert
the Laplace transform $\bar{Q}(p,s)$ in Eq. (32). The expression of
$P(T_{loc},t)$ can be formally written as

$\displaystyle P\left(T_{loc},t\right)$ $\displaystyle=\mathcal{I}_{s\to
t}^{-1}~{}~{}\mathcal{I}_{p\to
T_{loc}}^{-1}\left[\frac{(\lambda_{s}+s)e^{-\frac{p}{2v}}}{s\left(\lambda_{s}+s+\gamma-\gamma
e^{-\frac{p}{v}}\right)}\right],$ $\displaystyle=\mathcal{I}_{s\to
t}^{-1}~{}~{}\mathcal{I}_{p\to
T_{loc}}^{-1}\left[\frac{\lambda_{s}-s}{s\gamma}\sum_{m=0}^{\infty}\left(\frac{\gamma}{\lambda_{s}+s+\gamma}\right)^{m}\right.$
$\displaystyle~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}\times\Bigg{.}e^{-\frac{(2m+1)p}{2v}}\Bigg{]},$
(38)

where $\mathcal{I}_{s\to t}^{-1}~{}\left(\mathcal{I}_{p\to
T_{loc}}^{-1}\right)$ is the inverse Laplace tranformation from $s\to
t~{}(p\to T_{loc})$ and is defined in Eq. (34). Also, in going from first to
second line, we have written the series expansion for the denominator. First
we perform the inversion with respect to $p$ which is of the form $e^{-\beta
p}$ with $\beta=\frac{2m+1}{2v}$ and which is equal to
$\sim\delta\left(T_{loc}-\beta\right)$. Using this in Eq. (38), we get

$\displaystyle P\left(T_{loc},t\right)$ $\displaystyle=\mathcal{I}_{s\to
t}^{-1}\left[\frac{\lambda_{s}-s}{s\gamma}\sum_{m=0}^{\infty}\left(\frac{\gamma}{\lambda_{s}+s+\gamma}\right)^{m}\right.$
$\displaystyle~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}\times\left.\delta\left(T_{loc}-\frac{2m+1}{2v}\right)\right].$
(39)

We are now left with the inverse Laplace transformation with respect to $s$.
To perform this inversion, we use the following identity bateman :

$\displaystyle\mathcal{I}_{s\to
t}^{-1}\left[\frac{\lambda_{s}-s}{s\gamma}\left(\frac{\gamma}{\lambda_{s}+s+\gamma}\right)^{m}\right]=e^{-\gamma
t}\left[I_{m}(\gamma t)+I_{m+1}(\gamma t)\right].$ (40)

Using this formula in Eq. (39), we get the expression of
$P\left(T_{loc},t\right)$ as written in Eq. (4). In Fig. 3 (left panel), we
have compared the expression of $P\left(T_{loc},t\right)$ with the same
obtained from the numerical simulations. Excellent match between them
validates the expression in Eq. (4). To understand various $\delta$\- function
terms in Eq. (4), we look at the trajectories that give rise to these terms.
In Fig. 3 (right panel), we have shown the trajectories that give rise to
$\delta\left(T_{loc}-\frac{1}{2v}\right)$ term (red) and
$\delta\left(T_{loc}-\frac{3}{2v}\right)$ term (blue). The
$\delta\left(T_{loc}-\frac{1}{2v}\right)$ term arises from those trajectories
for which the RTP, starting from the origin, does not cross the origin till
time $t$. The weight of this term will simply be the survival probability
(from origin) whose expression is provided by $\mathcal{S}_{0}(t)$ in Eq. (5).
This expression of survival probability was also obtained in Malakar2018 ;
Singh2020 . Similarly, the $\delta\left(T_{loc}-\frac{3}{2v}\right)$ term in
Eq. (4) integrates the contribution of those trajectories for which particle
crosses the origin once starting from the origin. The coefficient of this term
$\mathcal{S}_{1}(t)$ is just the probability that the RTP crosses the origin
once till time $t$. Extending the same argument, one gets the term
$\mathcal{S}_{m}(t)~{}\delta\left(T_{loc}-\frac{2m+1}{2v}\right)$ when the RTP
crosses the origin $m$\- times till time $t$. Interestingly, as a by-product,
we have obtained $\mathcal{S}_{m}(t)$ which denotes the probability that the
RTP crosses the origin $m$-times till time $t$ starting from the origin (see
Appendix C for derivation).
We now look at the expression of $P\left(T_{loc},t\right)$ in various limits
of $\gamma t$. In the limit $\gamma t\to 0$, all $I_{m}(\gamma t\to 0)=0$
except $m=0$ for which $I_{0}(\gamma t\to 0)=1$. Hence in the R.H.S. of Eq.
(4), only the $m=0$ term contributes and the expression of
$P\left(T_{loc},t\right)$ becomes

$\displaystyle
P\left(T_{loc},t\right)\simeq\delta\left(T_{loc}-\frac{1}{2v}\right),~{}~{}~{}~{}~{}~{}\text{for
}\gamma t\to 0.$ (41)

Using this expression, it is straightforward to verify that $\langle
T^{n}_{loc}(t)\rangle\simeq\frac{1}{(2v)^{n}}$ which matches with the
previously obtained result in Eq. (36). Let us now consider $P(T_{loc},t)$ in
the limit $\gamma t\to\infty$. In this case the relevant scaling limit is
$vT_{loc}\to\infty$ keeping $\frac{vT_{loc}}{\sqrt{\gamma t}}$ fixed to get a
nontrivial expression. One can then replace the summation in the R.H.S. of Eq.
(4) by intergral performing which gives $P(T_{loc},t)\simeq ve^{-\gamma
t}I_{vT_{loc}}(\gamma t)$. We next use the asymptotic form
$I_{vT_{loc}}(\gamma t)\simeq\frac{e^{\gamma t}}{\sqrt{2\pi\gamma
t}}e^{-\frac{v^{2}T_{loc}^{2}}{2\gamma t}}$ and insert this in the expression
of $P(T_{loc},t)$ to get

$\displaystyle P\left(T_{loc},t\right)\simeq\sqrt{\frac{4\mathfrak{D}_{0}}{\pi
t}}e^{-\frac{\mathfrak{D}_{0}T_{loc}^{2}}{t}},~{}~{}~{}~{}~{}\text{as }\gamma
t\to\infty,$ (42)

where $\mathfrak{D}_{0}=\frac{v^{2}}{2\gamma}$. Once again we emphasise that
this expression is valid in the limits $\gamma t\to\infty$,
$vT_{loc}\to\infty$ keeping $\frac{vT_{loc}}{\sqrt{\gamma t}}$ fixed. Since
the particle behaves like a Brownian particle in these limits, Eq. (42)
represents the local time distribution for a Brownian particle in one
dimension with diffusion constant $\mathfrak{D}_{0}$ SabhapanditS2006 .

Figure 5: (a) Comparision of the scaling function $f_{\alpha}(z)$ in Eq. (8)
(shown by solid line) with the same obtained via numerical simulations (shown
by different symbols) for $\alpha=0.5$ and for different values of $t$. We
have chosen $v=1,~{}\gamma=1$ and $l=1$. (b) Same is done for $\alpha=1$.

###  III.2 Case II: General $\alpha$

Let us now look at the statistics of $T_{loc}$ for the general $\alpha$ for
which it is difficult to solve Eq. (27) exactly for arbitrary $t$. On the
other hand, the path-counting analysis used in the previous section to obtain
the distribution of $T_{loc}$ for $\alpha=0$ in Eq. (4) can also be extended
to the general $\alpha$ case with a different form of $\mathcal{S}_{m}(t)$.
However, getting $\mathcal{S}_{m}(t)$ for general $\alpha$, again turns out to
be a challenging task although the Laplace transfrom of it with respect to $t$
can be formally written in terms of the Laplace transform of the first passage
probabilities as illustrated in Appendix C (see Eq. (105)). In this case, we
instead focus at the large $t$ case for which we can make some analytical
progress. Looking at the equation satisfied by $\bar{Z}$ in Eq. (26), we see
that it contains a decay term of the form
$2R(x_{0})\bar{Z}+q\mathbb{I}_{\epsilon}\left(x_{0}\right)$ while the equation
for $\bar{Q}$ contains only $q\mathbb{I}_{\epsilon}\left(x_{0}\right)$ term as
can be seen from Eq. (25). This implies that $\bar{Z}$ decays with time much
faster than $\bar{Q}$. Hence for large $t$, we can neglect the $s\bar{Z}$ term
and rewrite Eqs. (25) and (26) as

$\displaystyle
s\bar{H}-1=v\partial_{x_{0}}\bar{Z}-q\mathbb{I}_{\epsilon}\left(x_{0}\right)\bar{H},$
(43) $\displaystyle
v\partial_{x_{0}}\bar{H}-2R(x_{0})\bar{Z}-q\mathbb{I}_{\epsilon}\left(x_{0}\right)\bar{Z}\simeq
0.$ (44)

Since we are interested in computing the distribution of $T_{loc}$, we change
$q\to\frac{p}{2\epsilon}$ in these two equations. Now taking the limit
$\epsilon\to 0$, one can replace
$\frac{p}{2\epsilon}\mathbb{I}_{\epsilon}\left(x_{0}\right)\to p\delta(x_{0})$
and $\bar{H}\left(\frac{p}{2\epsilon},x_{0},s\right)\to\bar{Q}(p,x_{0},s)$ (as
indicated in Eq. (20)) where
$2\bar{Q}(p,x_{0},s)=\bar{Q}_{+}(p,x_{0},s)+\bar{Q}_{-}(p,x_{0},s)$. Using
this in Eqs. (43) and (44) yields

$\displaystyle s\bar{Q}-1=v\partial_{x_{0}}\bar{Z}-p\delta(x_{0})\bar{Q},$
(45) $\displaystyle
v\partial_{x_{0}}\bar{Q}-2R(x_{0})\bar{Z}-p\delta(x_{0})\bar{Z}\simeq 0,$ (46)

where $\bar{Z}(p,x_{0},s)$ is to be interpreted as
$2\bar{Z}(p,x_{0},s)=\bar{Q}_{+}(p,x_{0},s)-\bar{Q}_{-}(p,x_{0},s)$. To solve
Eqs. (45) and (46), we note that if the particle initially starts from the
origin, then the statistics of $T_{loc}$ is insensitive to the choice of the
initial velocity direction and accordingly, we have
$Q_{+}(p,x_{0}=0,s)=Q_{-}(p,x_{0}=0,s)$. This essentially asserts the
condition that $\delta(x_{0})\bar{Z}(p,x_{0},s)=0$. With this result, we
substitute $\bar{Z}\simeq\frac{v}{2R(x_{0})}\partial_{x_{0}}\bar{Q}$ from Eq.
(46) into Eq. (45) and get a differential equation only for
$\bar{Q}(p,x_{0},s)$ as

$\displaystyle s\bar{Q}-1\simeq v^{2}\frac{\partial}{\partial
x_{0}}\left(\frac{1}{2R(x_{0})}\frac{\partial\bar{Q}}{\partial
x_{0}}\right)-p\delta(x_{0})\bar{Q}.$ (47)

We emphasise that the approximate equality indicates that this equation is
valid only at large $t$. A similar approximation has been recently used in
Singh2020  to study the position distribution and survival probability of RTP.

For $x_{0}\neq 0$ we, from Eq. (47), have

$\displaystyle s\bar{Q}-1\simeq\mathfrak{D}_{\alpha}\frac{\partial}{\partial
x_{0}}\left(\frac{1}{|x_{0}|^{\alpha}}\frac{\partial\bar{Q}}{\partial
x_{0}}\right),$ (48)

where $\mathfrak{D}_{\alpha}=\frac{v^{2}l^{\alpha}}{2\gamma}$. To turn this
equation into a homogeneous form, we make the transformation

$\displaystyle\bar{Q}(p,x_{0},s)=\frac{1}{s}+\mathcal{U}(p,x_{0},s),$ (49)

and rewrite Eq. (48) in terms of $\mathcal{U}$ as

$\displaystyle
s~{}\mathcal{U}\simeq\mathfrak{D}_{\alpha}\frac{\partial}{\partial
x_{0}}\left(\frac{1}{|x_{0}|^{\alpha}}\frac{\partial\mathcal{U}}{\partial
x_{0}}\right).$ (50)

Recall that the boundary condition is
$\bar{Q}(p,x_{0}\to\pm\infty,s)=\frac{1}{s}$, which now gets translated to
$\mathcal{U}(p,x_{0}\to\pm\infty,s)=0$. The general solutions of Eq. (50) are
given in terms of the modified bessel functions of first kind and second kind
as
$|x_{0}|^{\frac{1+\alpha}{2}}I_{\frac{1+\alpha}{2+\alpha}}\left(\frac{2|x_{0}|^{\frac{2+\alpha}{2}}}{2+\alpha}\sqrt{\frac{s}{\mathfrak{D}_{\alpha}}}\right)$
and
$|x_{0}|^{\frac{1+\alpha}{2}}K_{\frac{1+\alpha}{2+\alpha}}\left(\frac{2|x_{0}|^{\frac{2+\alpha}{2}}}{2+\alpha}\sqrt{\frac{s}{\mathfrak{D}_{\alpha}}}\right)$.
However the first solution diverges for $|x_{0}|\to\infty$. Hence we are left
only with the second solution as

$\displaystyle\mathcal{U}(p,x_{0},s)\simeq\mathcal{B}(p,s)|x_{0}|^{\frac{1+\alpha}{2}}K_{\frac{1+\alpha}{2+\alpha}}\left(\frac{2|x_{0}|^{\frac{2+\alpha}{2}}}{2+\alpha}\sqrt{\frac{s}{\mathfrak{D}_{\alpha}}}\right),$
(51)

where $\mathcal{B}(p,s)$ is a $x_{0}$\- independent function that remains to
be computed. Translating this solution to get $\bar{Q}(p,x_{0},s)$ from Eq.
(49)

$\displaystyle\bar{Q}(p,x_{0},s)\simeq\frac{1}{s}+\mathcal{B}(p,s)|x_{0}|^{\frac{1+\alpha}{2}}K_{\frac{1+\alpha}{2+\alpha}}\left(\frac{2|x_{0}|^{\frac{2+\alpha}{2}}}{2+\alpha}\sqrt{\frac{s}{\mathfrak{D}_{\alpha}}}\right).$
(52)

Next to compute $\mathcal{B}(p,s)$, we use Eq. (47) and integrate it from
$-\eta$ to $\eta$ and take $\eta\to 0$. This yields the discontinuity relation

$\displaystyle\left(\frac{1}{|x_{0}|^{\alpha}}\frac{\partial\bar{Q}}{\partial
x_{0}}\right)_{x_{0}=0^{+}}-\left(\frac{1}{|x_{0}|^{\alpha}}\frac{\partial\bar{Q}}{\partial
x_{0}}\right)_{x_{0}=0^{-}}=\frac{p}{\mathfrak{D}_{\alpha}}~{}\bar{Q}(p,0,s).$
(53)

Substituting the form of $\bar{Q}(p,x_{0},s)$ from Eq. (52) in this
discontinuity relation, we get the solution of $\mathcal{B}(p,s)$ as

$\displaystyle\mathcal{B}(p,s)=\frac{1}{s}-\frac{\mathcal{C}_{\alpha}}{s^{\frac{1}{2+\alpha}}\left(p+\mathcal{C}_{\alpha}s^{\frac{1+\alpha}{2+\alpha}}\right)},$
(54)

where

$\displaystyle\mathcal{C}_{\alpha}=2\left(\frac{\mathfrak{D}_{\alpha}}{(2+\alpha)^{\alpha}}\right)^{\frac{1}{2+\alpha}}\frac{\Gamma\left(\frac{1}{2+\alpha}\right)}{\Gamma\left(\frac{1+\alpha}{2+\alpha}\right)}.$
(55)

Finally inserting this form of $\mathcal{B}(p,s)$ in Eq. (52) and setting
$x_{0}=0$, we obtain

$\displaystyle\bar{Q}(p,s)\simeq\frac{\mathcal{C}_{\alpha}}{s^{\frac{1}{2+\alpha}}\left(p+\mathcal{C}_{\alpha}s^{\frac{1+\alpha}{2+\alpha}}\right)},$
(56)

where once again we have used the notation $\bar{Q}(p,s)$ for
$\bar{Q}(p,0,s)$. We next use $\bar{Q}(p,s)$ to calculate the moments and
distribution separately.

####  III.2.1 Moments $\langle T_{loc}^{n}(t)\rangle$ for general $\alpha$

We first calculate the moments for general $\alpha$ case. We again emphasise
that for $x_{0}=0$, the local time statistics is independent of the initial
velocity direction which yields $\bar{Q}(p,s)=\bar{Q}_{\pm}(p,s)$. Following
the definition of $\bar{Q}(p,s)$ in Eq. (21), the moments can be written in
terms of $\bar{Q}(p,s)$ as

$\displaystyle\langle T_{loc}^{n}(t)\rangle=\mathcal{I}_{s\to
t}^{-1}\left[(-1)^{n}\left(\frac{\partial^{n}\bar{Q}(p,s)}{\partial
p^{n}}\right)_{p=0}\right],$ (57)

where $\mathcal{I}_{s\to t}^{-1}$ is the inverse Laplace transformation.
Inserting the expression of $\bar{Q}(p,s)$ from Eq. (56), we get

$\displaystyle\langle T_{loc}^{n}(t)\rangle$
$\displaystyle\simeq\mathcal{I}_{s\to
t}^{-1}\left[\frac{n!}{\mathcal{C}_{\alpha}^{n}s^{\frac{1+(n+1)(1+\alpha)}{2+\alpha}}}\right].$
(58)

Using the inverse Laplace transformation $\mathcal{I}_{s\to
t}^{-1}[s^{-\nu}]=\frac{t^{\nu-1}}{\Gamma(\nu)}$ with $\nu>0$ in Eq. (58), we
find the expression of moments as written in Eq. (6). It is worth mentioning
that for general $\alpha$, the typical fluctuations of $T_{loc}$ scales with
time as $T_{loc}\sim t^{\frac{1+\alpha}{2+\alpha}}$ for large values of $t$.
This behaviour correctly reduces to the $\sqrt{t}$ scaling for $\alpha=0$
which corresponds to the homogeneous RTP model.

In Fig. 4, we have compared our analytical result for moments with results
obtained from the numerical simulations. We have plotted the first three
moments for $\alpha=0.5$. Although there is deviation between them for small
$t$, the match becomes better as we go to higher values of $t$.

####  III.2.2 Scaling form of $P(T_{loc},t)$ at large $t$ for general $\alpha$

We next proceed to calculate $P(T_{loc},t)$ by inverting $\bar{Q}(p,s)$ in Eq.
(56) with respect to $p$ and $s$. Formally, the expression reads

$\displaystyle P(T_{loc},t)$ $\displaystyle\simeq\mathcal{I}_{s\to
t}^{-1}\mathcal{I}_{p\to
T_{loc}}^{-1}\left[\frac{\mathcal{C}_{\alpha}}{s^{\frac{1}{2+\alpha}}\left(p+\mathcal{C}_{\alpha}s^{\frac{1+\alpha}{2+\alpha}}\right)}\right],$
$\displaystyle\simeq\mathcal{I}_{s\to
t}^{-1}\left[\frac{\mathcal{C}_{\alpha}}{s^{\frac{1}{2+\alpha}}}e^{-\mathcal{C}_{\alpha}T_{loc}s^{\frac{1+\alpha}{2+\alpha}}}\right].$
(59)

In going from first line to second line, we have performed the Laplace
inversion with respect to $p$. To obtain the distribution in the $t$ space,
one needs to perform the inversion with respect to $s$. For the purpose of
maintaining the continuity of our discussion, we have relegated the details of
this inversion to Appendix D. Using Eq. (115) and performing some simple
manipulations we find that the distribution possesses the scaling form

$\displaystyle
P(T_{loc},t)\simeq\frac{\mathcal{C}_{\alpha}}{t^{\frac{1+\alpha}{2+\alpha}}}~{}f_{\alpha}\left(\frac{\mathcal{C}_{\alpha}T_{loc}}{t^{\frac{1+\alpha}{2+\alpha}}}\right),$
(60)

where the scaling function $f_{\alpha}(z)$ is given in Eq. (8). In Fig. 4, we
have illustrated this scaling behaviour and plotted the corresponding scaling
function for two different values of $\alpha$ ($\alpha=0.5$ and $\alpha=1$).
For each $\alpha$, we have obtained the simulation data for three different
times and which collapse over the scaling function $f_{\alpha}(z)$ quite
nicely.

Although the series summation in Eq. (8) can be performed analytically for
some values of $\alpha$, however it is difficult to do so for general
$\alpha$. For example when $\alpha=0$, the summation can be carried out and we
recover the result in Eq. (42) for $P(T_{loc},t)$. On the other hand, when
$\frac{\mathcal{C}_{\alpha}T_{loc}}{t^{\frac{1+\alpha}{2+\alpha}}}$ fixed, we
can get a simplified expression of $f_{\alpha}(z)$ by using the saddle point
approximation to evaluate the Bromwich integral in Eq. (59). We refer to
Appendix E for the detailed derivation of this approximate expression using
saddle point method and present only the final result here as

$\displaystyle
f_{\alpha}(z)\simeq\frac{z^{\frac{\alpha}{2}}}{\sqrt{2\pi}}\frac{(1+\alpha)^{\frac{\alpha}{2}}}{(2+\alpha)^{\frac{\alpha-1}{2}}}~{}\text{exp}\left(-\frac{(1+\alpha)^{1+\alpha}}{(2+\alpha)^{2+\alpha}}~{}z^{2+\alpha}\right).$
(61)

We remark that this expression for $f_{\alpha}(z)$ works only for large $z$
and fails for smaller values of $z$.

Figure 6: Comparision of $\mathcal{P}_{\pm}(T_{loc})$ in Eqs. (9) and (10) for
$\alpha=0$ with that from the numerical simulations. We have taken
$v=1,~{}\gamma=1$ and $M=1$. For simulation, we have taken $\epsilon=0.001$

##  IV LOCAL TIME IN PRESENCE OF AN ABSORBING WALL

In the previous section, we dealt with the statistics of $T_{loc}$ when the
particle moves on an infinite line. However, in many physical settings, the
time spent by a particle before getting absorbed becomes important. For
example, in biological systems, the time spent by a molecule at some interior
point of the cell before getting absorbed by the cell boundary may be of prime
interest Redner2001 . Similarly, in chemical reactions where a catalytic agent
interacts with a reactant inside a bounded domain Pal2019 , one may be
interested in the knowledge of the time spent by the agent with the reactant
before it comes out of the domain as the yield of the product may depend on
this time. Motivated from these applications, we study the statistical
properties of the local time in presence of an absorbing wall.

Consider the RTP moving in one dimension with absorbing wall at $x=M$ $(M>0)$.
Starting from $x_{0}\leq M$, we define $T_{loc}$ as the time spent by the
particle in the vicinity of $x=0$ before it hits the wall. This means that
$T_{loc}$ is the time spend about the orgin before the first passage time
$t_{f}$:

$\displaystyle T_{loc}=\int_{0}^{t_{f}}\delta\left(x(\tau)\right)d\tau.$ (62)

In the context of Brownian motion, this quantity and similar path functionals
till $t_{f}$ have been studied in detail. Such path functionals in the
literature are called first passage functionals Majumdar2005 .

Intuitively, the definition in Eq. (62) can be understood as follows:

$\displaystyle T_{loc}=\lim_{\epsilon\to
0^{+}}\frac{T_{2\epsilon}}{2\epsilon},~{}\text{with }$ (63) $\displaystyle
T_{2\epsilon}=\int_{0}^{t_{f}}\mathbb{I}_{\epsilon}\left(x(\tau)\right)d\tau.$
(64)

Let us denote the distribution of $T_{loc}$ in this case as
$\mathcal{P}_{\pm}(T_{loc},x_{0})$ which is different than
$P_{\pm}(T_{loc},x_{0},t)$ written for the case of infinite line. As done
before, once again we define the Laplace transform of
$\mathcal{P}_{\pm}(T_{loc},x_{0})$ with respect to $T_{loc}$ as

$\displaystyle\mathcal{Q}_{\pm}(p,x_{0})=\int_{0}^{\infty}dT_{loc}~{}e^{-pT_{loc}}~{}\mathcal{P}_{\pm}(T_{loc},x_{0}).$
(65)

In this case, we solve this problem by computing the distribution
$\mathbb{P}_{\pm}(T_{2\epsilon},x_{0})$ of $T_{2\epsilon}$ for a small finite
$\epsilon$ and finally take $\epsilon\to 0$ appropriately as indicated in Eq.
(63). As before we define the Laplace transformation of
$\mathbb{P}_{\pm}(T_{2\epsilon},x_{0})$ with respect to $T_{2\epsilon}$ as

$\displaystyle\mathbb{Q}_{\pm}(q,x_{0})=\int_{0}^{\infty}dT_{2\epsilon}~{}e^{-qT_{2\epsilon}}~{}\mathbb{P}_{\pm}(T_{2\epsilon},x_{0}),$
(66)

and write the corresponding backward Fokker-Planck equation as

$\displaystyle
v\partial_{x_{0}}\mathbb{Q}_{+}-R(x_{0})\mathbb{Q}_{+}+R(x_{0})\mathbb{Q}_{-}-q\mathbb{I}_{\epsilon}(x_{0})\mathbb{Q}_{+}=0,$
(67) $\displaystyle
v\partial_{x_{0}}\mathbb{Q}_{-}-R(x_{0})\mathbb{Q}_{+}+R(x_{0})\mathbb{Q}_{-}+q\mathbb{I}_{\epsilon}(x_{0})\mathbb{Q}_{-}=0.$
(68)

To solve these equations, we need to supplement them with appropriate boundary
conditions. The boundary conditions are:

$\displaystyle\mathbb{Q}_{+}(q,x_{0}=M)=1,$ (69)
$\displaystyle\mathbb{Q}_{\pm}(q,x_{0}\to-\infty)<\infty.$ (70)

The first boundary condition arises due to the fact that if the particle
starts initially from $M$ with $+v$ velocity, then it gets absorbed at the
very next instant which means $T_{2\epsilon}=0$, i.e.
$\mathbb{P}(T_{2\epsilon},M)=\delta\left(T_{2\epsilon}\right)$ Translating
this in terms of $\mathbb{Q}_{+}(q,x_{0})$ via Eq. (66) gives the condition in
Eq. (69). To understand the second boundary condition, note that for
$x_{0}\to-\infty$, $t_{f}$ also diverges. However, the time spent inside the
inteval $[-\epsilon,\epsilon]$ does not necessarily diverge or become zero.
Hence we expect $\mathcal{P}_{\pm}(T_{2\epsilon},x_{0})$ to remain finite and
non-zero even when $x_{0}\to-\infty$, which in turn results in the boundary
condition in Eq. (70).

One can, in principle, solve these equations (67) and (68) along with the
boundary conditions and obtain $\mathbb{Q}_{\pm}(q,x_{0})$. Once this is
established, it is straightforward to get the solution of
$\mathcal{Q}_{\pm}(p,x_{0})$ by inserting $T_{loc}$ from Eq. (63) in
$\mathbb{Q}_{\pm}(q,x_{0})$ and taking $\epsilon\to 0$ limit in Eq. (66). The
exact relation reads

$\displaystyle\mathcal{Q}_{\pm}(p,x_{0})=\lim_{\epsilon\to
0}\mathbb{Q}_{\pm}\left(\frac{p}{2\epsilon},x_{0}\right).$ (71)

In the next section, we solve Eqs. (67) and (68) to get
$\mathbb{Q}_{\pm}(q,x_{0})$ and then use Eq. (71) to obtain
$\mathcal{Q}_{\pm}(p,x_{0})$. We consider first the $\alpha=0$ case which is
followed by $\alpha\neq 0$ case in the subsequent sections.

###  IV.1 Case I: $\alpha=0$

We rewrite the backward equations in (67) and (68) for $\alpha=0$ _i.e._
$R(x_{0})=\gamma$

$\displaystyle~{}~{}~{}~{}v\partial_{x_{0}}\mathbb{Q}_{+}-\gamma\mathbb{Q}_{+}+\gamma\mathbb{Q}_{-}-q\mathbb{I}_{\epsilon}(x_{0})\mathbb{Q}_{+}=0,$
(72)
$\displaystyle-v\partial_{x_{0}}\mathbb{Q}_{-}+\gamma\mathbb{Q}_{+}-\gamma\mathbb{Q}_{-}-q\mathbb{I}_{\epsilon}(x_{0})\mathbb{Q}_{-}=0,$
(73)

where $\mathbb{I}_{\epsilon}(x_{0})$ is $1$ if $-\epsilon<x_{0}<\epsilon$ and
$0$ otherwise. It is easy to solve these differential equations along with the
boundary conditions in Eqs. (69) and (70). The final solution reads

$\displaystyle\mathbb{Q}_{+}(q,x_{0})=\begin{cases}\mathbb{B}(q),~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}\text{if
}-\infty<x_{0}<-\epsilon,\\\
\mathbb{E}(q)e^{-\frac{\lambda(q)x}{v}}+\mathbb{F}(q)e^{\frac{\lambda(q)x}{v}},~{}~{}~{}~{}~{}~{}~{}~{}~{}\text{if
}-\epsilon<x_{0}<\epsilon,\\\
\mathbb{C}(q)(x_{0}-M)+1,~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}\text{if
}\epsilon<x_{0}<M.\end{cases}.$ (74)
$\displaystyle\mathbb{Q}_{-}(q,x_{0})=\begin{cases}\mathbb{B}(q),~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}\text{if
}-\infty<x_{0}<-\epsilon,\\\
\mathbb{E}(q)\frac{\lambda(q)+\gamma+q}{\gamma}e^{-\frac{\lambda(q)x}{v}}+\mathbb{F}(q)\frac{-\lambda(q)+\gamma+q}{\gamma}e^{\frac{\lambda(q)x}{v}},~{}~{}~{}~{}~{}~{}~{}~{}~{}\text{if
}-\epsilon<x_{0}<\epsilon,\\\
\mathbb{C}(q)(x_{0}-M-\frac{v}{\gamma})+1,~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}\text{if
}\epsilon<x_{0}<M.\end{cases}.$ (75)

where $\lambda(q)=\sqrt{q(q+2\gamma)}$ and
$\mathbb{B}(q),~{}\mathbb{C}(q),~{}\mathbb{E}(q)$ and $\mathbb{F}(q)$ are
independent of $x_{0}$ but depends on $q$. To evaluate these functions, we use
the continuity of $\mathbb{Q}_{\pm}(q,x_{0})$ at $x_{0}=\pm\epsilon$ along
with the boundary conditions at $x_{0}=M$ and at $x_{0}\to-\infty$. These
conditions give rise to four linear equations for
$\mathbb{B}(q),~{}\mathbb{C}(q),~{}\mathbb{E}(q)$ and $\mathbb{F}(q)$ which
can be solved to get these functions. Since we are interested in computing the
distribution for $x_{0}=\epsilon$, we here need only the expression of
$\mathbb{C}(p)$. Also, since our goal is to compute the
$\mathcal{Q}_{\pm}(p,x_{0})$ using $\mathbb{Q}(q,x_{0})$ via Eq. (71), we
provide here the expression of $\mathbb{C}\left(\frac{p}{2\epsilon}\right)$ in
the limit $\epsilon\to 0$. The expression reads

$\displaystyle\lim_{\epsilon\to
0}\mathbb{C}\left(\frac{p}{2\epsilon}\right)=\frac{\gamma\left(e^{\frac{2p}{v}}-1\right)}{e^{\frac{2q}{v}}(v+\gamma
M)-\gamma M}.$ (76)

Inserting this expression in the last equations in the set of Eqs. (74) and
(75), we get the expressions of
$\mathcal{Q}_{+}\left(\frac{p}{2\epsilon},x_{0}=\epsilon\right)$ in the limit
$\epsilon\to 0$ as

$\displaystyle\mathcal{Q}_{+}(p)=\lim_{\epsilon\to
0}\mathbb{Q}_{+}\left(\frac{p}{2\epsilon},\epsilon\right)=\frac{v}{v+\gamma
M-\gamma Me^{-\frac{2p}{v}}},$ (77)
$\displaystyle\mathcal{Q}_{-}(p)=\lim_{\epsilon\to
0}\mathbb{Q}_{-}\left(\frac{p}{2\epsilon},\epsilon\right)=\frac{ve^{-\frac{2p}{v}}}{v+\gamma
M-\gamma Me^{-\frac{2p}{v}}},$ (78)

where for simplicity, we have written $\mathcal{Q}_{\pm}(p,0)$ simply as
$\mathcal{Q}_{\pm}(p)$. To obtain the distribution, we have to perform the
inverse Laplace transformation from $p$ to $T_{loc}$. To perform this
inversion, we use $\mathcal{I}_{p\to T_{loc}}^{-1}\left[e^{-\tau
p}\right]=\delta(T_{loc}-\tau)$ for $\tau>0$ and put it in Eqs. (77) and (78).
Finally, we get $\mathcal{P}_{\pm}(T_{loc})$ as written in Eqs. (9) and (10).

Figure 7: Shematic of the realisations that give rise to different terms in
$\mathcal{P}_{\pm}(T_{loc})$ in Eqs. (9) and (10) with the initial position
$x_{0}=\epsilon$. In both plots, the absorbing barrier at $x=M$ is shown in
Magenta and the interval $[-\epsilon,\epsilon]$ is shown by dotted green
lines. In left panel, we have shown the typical realisations that give rise to
$\delta(T_{loc})$ term (shown by red colour) and
$\delta\left(T_{loc}-\frac{2}{v}\right)$ term (shown by blue colour) when the
RTP starts with $+v$ velocity. In right panel, we have shown the same for the
initial velocity $-v$. Note that $\delta(T_{loc})$ term does not arise for
$\mathcal{P}_{-}(T_{loc})$ since the particle will definitely pass the
interval $[-\epsilon,\epsilon]$ if it starts from $x_{0}=\epsilon$ with $-v$
velcoity.

In Figure 6, we have verfied the expressions of $\mathcal{P}_{\pm}(T_{loc})$
in Eqs. (9) and (10) against the numerical simulations. We observe excellent
match for both cases. Note that while the summation for
$\mathcal{P}_{+}(T_{loc})$ starts from $n=0$ and includes the term
$\delta\left(T_{loc}-\frac{2}{v}\right)$, the summation for
$\mathcal{P}_{-}(T_{loc})$ does not include this term. To understand this, let
us look at the realisations that give rise to various $\delta$-function terms
in $\mathcal{P}_{\pm}(T_{loc})$. The left panel in Figure 7 shows two path
realisations that give rise to $\delta\left(T_{loc}\right)$ term (red) and
$\delta\left(T_{loc}-\frac{2}{v}\right)$ term (blue) starting from
$x_{0}=\epsilon$ with $+v$ velocity. The $\delta\left(T_{loc}\right)$
integrates the contributions of those realisations for which the particle
reaches the absorbing wall $x=M$ without ever crossing the interval
$[-\epsilon,\epsilon]$. The weight of this term will simply be the probability
that the particle exits via $x=M$ without crossing the $x=0$. Denoting this
exit probability by $\mathfrak{p}_{0}$, the expression of this probability was
recently obtained in Malakar2018 ; Singh2020  as
$\mathfrak{p}_{0}=\frac{v}{v+\gamma M}$ and accordingly we obtain
$\mathfrak{p}_{0}~{}\delta\left(T_{loc}\right)$ as the contribution of such
trajectories in the expression of $\mathcal{P}_{+}(T_{loc})$. Next we look at
the $\delta\left(T_{loc}-\frac{2}{v}\right)$ term in
$\mathcal{P}_{+}(T_{loc})$ which originates from the blue colour path in the
left panel of Figure 7. This term appears when the particle crosses the region
$[-\epsilon,\epsilon]$ twice before getting absorbed and thereby contributing
$T_{loc}=\frac{1}{2\epsilon}\left(\frac{2\epsilon}{v}+\frac{2\epsilon}{v}\right)=\frac{2}{v}$.

To compute the weight of such trajectories we decompose the blue trajectory
(left panel) as $[1\to 2]\bigoplus[2\to 3]\bigoplus[3\to 4]$. Following the
same argument as for $\delta(T_{loc})$, here also one gets the contribution of
$1-\mathfrak{p}_{0}$ and $\mathfrak{p}_{0}$ from parts $1\to 2$ and $3\to 4$
respectively. On the other hand, the part $2\to 3$ corresponds to the return
probability for the RTP at $x=\epsilon$. Since the RTP motion is recurrent,
this part will contribute unity which makes the overall weight as
$\mathfrak{p}_{0}(1-\mathfrak{p}_{0})\delta\left(T_{loc}-\frac{2}{v}\right)$.
Substituting $\mathfrak{p}_{0}=\frac{v}{v+\gamma M}$, we get the coefficient
of $\delta\left(T_{loc}-\frac{2}{v}\right)$ term in the expression of
$\mathcal{P}_{+}(T_{loc})$ in Eq. (9). Generalising this intuition to the case
when the particle crosses the interval $[-\epsilon,\epsilon]$ $2m$ times, one
finds the corresponding contribution to $\mathcal{P}_{+}(T_{loc})$ is
$\mathfrak{p}_{0}(1-\mathfrak{p}_{0})^{m}\delta\left(T_{loc}-\frac{2m}{v}\right)$.
Note that the particle starting from $x_{0}=\epsilon$ has to cross the region
$[-\epsilon,\epsilon]$ even number of times before it gets absorbed at
$x=M>\epsilon$. As a result the $\delta$-functions in the expression of
$\mathcal{P}_{+}(T_{loc})$ appear with $2m/v$ in the argument.

Next we try to understand the origin of various terms in
$\mathcal{P}_{-}(T_{loc})$ in Eq. (10) from Figure 7 (right panel). At first,
recall that the particle will definitely enter the interval
$[-\epsilon,\epsilon]$ and spend nonzero time there when it starts from
$x_{0}=\epsilon$ with $-v$ velocity and consequently one does not get
$\delta(T_{loc})$ term. However, other terms still exist. For example, the
Figure 7 (right panel) shows a realisation which gives a contribution of
$T_{loc}=\frac{2}{v}$ for this case. Once again, the path can be decomposed as
$[1\to 2]\bigoplus[2\to 3]$. While the path $1\to 2$ gives unit contribution
(since the motion is recurrent), the path $2\to 3$ will contribute
$\mathfrak{p}_{0}$ which makes the total contribution as
$\mathfrak{p}_{0}~{}\delta\left(T_{loc}-\frac{2}{v}\right)$. Similarly if the
particle crosses the interval $2m$ times, we get the overall contribution as
$\mathfrak{p}_{0}(1-\mathfrak{p}_{0})^{m-1}\delta\left(T_{loc}-\frac{2m}{v}\right)$.
Note that we have tacitly used the fact that in the limit $\epsilon\to 0$, the
contribution of trajectories with tumbling inside the interval
$x\in[-\epsilon,\epsilon]$ is zero.

Although in our analysis, we have chosen the initial position to be
$\epsilon$, the overall physical argument can be extended to arbitrary initial
position. For $x_{0}=0^{-}$ (_i.e._ $x_{0}=\epsilon$ with $\epsilon\to
0^{-}$), it is possible to argue that the distribution of $T_{loc}$ is
independent of the initial velocity and is given by

$\displaystyle\mathcal{P}_{\pm}(T_{loc})=\sum_{m=0}^{\infty}\mathfrak{p}_{0}(1-\mathfrak{p}_{0})^{m}\delta\left(T_{loc}-\frac{2m+1}{v}\right).$
(79)

On the other hand for $x_{0}=0$ the distribution depends on the initial
velocity and is given by

$\displaystyle\begin{split}\mathcal{P}_{+}(T_{loc})=\sum_{m=0}^{\infty}\mathfrak{p}_{0}(1-\mathfrak{p}_{0})^{m}\delta\left(T_{loc}-\frac{4m+1}{2v}\right),\\\
\mathcal{P}_{-}(T_{loc})=\sum_{m=0}^{\infty}\mathfrak{p}_{0}(1-\mathfrak{p}_{0})^{m}\delta\left(T_{loc}-\frac{4m+3}{2v}\right).\\\
\end{split}$ (80)

Numerical verifications of these expressions are given in appendix F

The path-analysis method seems more useful compared to solving backward Fokker
Planck equation because the latter for general $x_{0}$ could be quite non-
trivial. Also, this physical insight guides us to generalise the results of
$\mathcal{P}_{\pm}(T_{loc})$ in Eqs. (9) and (10) to the other values of
$\alpha$. On the other hand, solving the backward Fokker Planck equations for
general $\alpha$ could be a challenging task. In the next section, we
generalise the results of $\mathcal{P}_{\pm}(T_{loc})$ for $\alpha=0$ to the
arbitrary values of $\alpha$.

Figure 8: Comparision of $\mathcal{P}_{\pm}(T_{loc})$ in Eqs. (81) and (82)
with the numerical simulations for two values of $\alpha$\- (a) $\alpha=0.5$
and (b) $\alpha=1.5$. For both plots, we have chosen
$v=1,~{}\gamma=1,~{}M=1,~{}l=1$. For simulation, we have taken
$\epsilon=0.001$.

###  IV.2 Case II: General $\alpha$

We now look at the distribution of $T_{loc}$ for the general $\alpha$ in
presence of an absorbing wall at $x=M$. Solving the backward Fokker Plank
equations (67) and (68) analytically for arbitrary values of $\alpha~{}(\geq
0)$ is highly difficult except for some special values of $\alpha$. In this
section we show that the derivation of $\mathcal{P}_{\pm}(T_{loc})$ based on
the trajectory analysis in Eqs. (9) and (10) for $\alpha=0$ can be easily
extended to the general values of $\alpha$. Following the physical arguments,
for this case also, we can write the distributions
$\mathcal{P}_{\pm}(T_{loc})$ as

$\displaystyle\mathcal{P}_{+}(T_{loc})=\sum_{m=0}^{\infty}\mathfrak{p}_{\alpha}\left(1-\mathfrak{p}_{\alpha}\right)^{m}\delta\left(T_{loc}-\frac{2m}{v}\right),$
(81)
$\displaystyle\mathcal{P}_{-}(T_{loc})=\sum_{m=1}^{\infty}\mathfrak{p}_{\alpha}\left(1-\mathfrak{p}_{\alpha}\right)^{m-1}\delta\left(T_{loc}-\frac{2m}{v}\right),$
(82)

where we have chosen the initial position to be $x_{0}=\epsilon$ for
simplicity. Also, $\mathfrak{p}_{\alpha}$ stands for the probability that the
RTP starting from the origin exits from $x=M$ without touching the origin. The
expression of $\mathfrak{p}_{\alpha}$ for arbitrary $\alpha$ was obtained in
Singh2020  which reads

$\displaystyle\mathfrak{p}_{\alpha}=\frac{v(1+\alpha)l^{\alpha}}{\gamma
M^{1+\alpha}+v(1+\alpha)l^{\alpha}}.$ (83)

For $\alpha=0$, the expressions in Eqs. (81) and (82) reduce to that in Eqs.
(9) and (10). In Figure 8, we have compared these expressions with that from
the numerical simulations for two non-zero values of $\alpha$. We observe
excellent match of our analytical results with the numerical data.

##  V CONCLUSION

In this paper, we have studied the local time properties of an one dimensional
run and tumble particle in inhomogeneous medium. The inhomogeneity was
administered by taking the position-dependent rate $R(x)$ given in Eq. (2).
For $\alpha=0$ (which corresponds to the homogeneous case), we have derived
the moments generating function from which we computed exactly the first three
moments of $T_{loc}$. Next, we derived the distribution of $T_{loc}$ for this
case which consists of a series of appropriately weighted $\delta$ -functions
at $\delta\left(T_{loc}-\frac{2m+1}{2v}\right)$, where $m=0,1,2,...$(see Eq.
(4)). While for $t>>\frac{1}{\gamma}$ and $vT_{loc}\to\infty$ keeping
$\frac{vT_{loc}}{\sqrt{\gamma t}}$ fixed, this expression correctly converges
to that of the one dimensional Brownian motion. However, in the opposite limit
$t<<\frac{1}{\gamma}$ the statistics is remarkably different from Brownian
motion. For the latter scenario, we have shown that the distribution is
$P(T_{loc},t)\simeq\delta\left(T_{loc}-\frac{1}{2v}\right)$. Due to this, the
moments have non-zero value as $t\to 0^{+}$ which is contrary to that of the
Brownian motion where all moments vanish as $t\to 0^{+}$. The appearance of
$\delta\left(T_{loc}-\frac{2m+1}{2v}\right)$ in $P(T_{loc},t)$ can be
understood from the path-conuting analyisis which also gives the weight of
these $\delta$-functions. Based on this analysis, we showed that the weight of
$\delta\left(T_{loc}-\frac{2m+1}{2v}\right)$ in $P(T_{loc},t)$ is given in
terms of the probability $\mathcal{S}_{m}(t)$ that the RTP visits the origin
$m$-times till time $t$ starting from the origin. The exact expression of
$\mathcal{S}_{m}(t)$ is given in Eq. (5).

For general $\alpha>0$, performing an exact calculation turns out to be
difficult. However for large $t$, we showed that $T_{loc}$ scales with respect
to time as $T_{loc}\sim t^{\frac{1+\alpha}{2+\alpha}}$ and the distribution
possesses a scaling behaviour of the form
$P(T_{loc},t)\simeq\frac{\mathcal{C}_{\alpha}}{t^{\frac{1+\alpha}{2+\alpha}}}~{}f_{\alpha}\left(\frac{\mathcal{C}_{\alpha}T_{loc}}{t^{\frac{1+\alpha}{2+\alpha}}}\right)$,
with the scaling function $f_{\alpha}(z)$ given exactly in Eq. (8). We also
computed all the moments of $T_{loc}$ for large $t$ and general $\alpha>0$.

The second part of our paper dealt with the local time spent by the particle
near the origin in presence of an absorbing wall at $x=M~{}(>0)$. Starting
from $x_{0}=\epsilon$, we define $T_{loc}$ as the time (density) spent by the
particle in the vicinity of the origin before it hits the wall. For
$\alpha=0$, we derived the exact probability distribution of $T_{loc}$ by
solving the backward Fokker-Planck equations. As shown in Eqs. (9) and (10),
the distribution in this case also consists of a series of $\delta$-functions
at the $T_{loc}=\frac{2n}{v}$ where $n=0,1,2,3,...$ for
$\mathcal{P}_{+}(T_{loc})$ and $n=1,2,3,...$ for $\mathcal{P}_{-}(T_{loc})$.
In this case also, the coefficient of
$\delta\left(T_{loc}-\frac{2n}{v}\right)$ can be interpreted as the
probability of $m$-th visits to the origin by the RTP starting from the origin
till it gets absorbed. Quite remarkably, we found that this physical insight
can also be extended to the case of the general $\alpha~{}(>0)$ which guided
us to write exactly the distribution without solving the backward Fokker-
Planck equations. These distributions are given in Eqs. (81) and (82) and
verified numerically in fig. 8.

In this paper, we have focused on one particular class of functionals called
local time. Studying the statistical properties of other functionals is an
interesting future direction. Recently in MajumdarMeerson2020 , the statistics
of first passage functional of type $\int_{0}^{t_{f}}d\tau x^{k}(\tau)$ with
$k>-2$ was studied for one dimensional Brownian motion with a drift where the
distribution was shown to exhibit dynamical phase transition for some values
of $k$. It would be interesting to see how these results get modified for RTP
dynamics. Finally, in this work, we have focused only on the typcial
fluctuations of $T_{loc}$ which was shown to scale at large time as
$T_{loc}\sim t^{\frac{1+\alpha}{2+\alpha}}$. It remains a promising future
direction to explore the atypical fluctuations of $T_{loc}$ and see if the
corresponding distribution admits large deviation forms. Another interesting
direction to extend the current work would be to study the distribution of
local time for active Brownian particle.

###### Acknowledgements.

PS acknowledges fruitful discussions with Soummyadip Basak. AK and PS
acknowledge support of the Department of Atomic Energy, Government of India,
under project no.12-R&D-TFR-5.10-1100. AK acknowledges support from DST,
Government of India grant under project No. ECR/2017/000634.

##  Appendix A Backward master equation for $Q_{\pm}(p,x_{0},t)$

Here we provide a derivation of the Backward master equations in (17) for a
general functional $Y\left[x\left(t\right)\right]$

$\displaystyle Y\left[x\left(t\right)\right]=\int^{t}_{0}d\tau
U\left[x\left(\tau\right)\right],$ (84)

of the trajectory $\\{x(\tau);~{}0\leq\tau\leq t\\}$ of the RTP starting from
$x_{0}$ at $t=0$. Denoting the probability distribution of $Y$ as
$G_{\sigma}(Y,x_{0},t)$ where $\sigma=\pm 1$ is the direction of the initial
velocity, we consider the characteristic function

$\displaystyle
H_{\sigma}(q,x_{0},t)=\int^{\infty}_{0}dYe^{-qY}G_{\sigma}\left(Y,x_{0},t\right)=\left<e^{-qY}\right>_{\left(x_{0},\sigma\right)},$
(85)

where $<...>_{\left(x_{0},\sigma\right)}$ denotes the average with initial
position $x_{0}$ and velocity orientation $\sigma$. Following the definition
in Eq.(85), we write for a small time interval $\Delta t$

$\displaystyle\begin{split}H_{\sigma}&\left(q,x_{0},t+\Delta
t\right)=\left<e^{-q\int^{t+\Delta t}_{0}d\tau
U\left[x\left(\tau\right)\right]}\right>_{\left(x_{0},\sigma\right)}\\\
&=\left<e^{-q\int^{\Delta t}_{0}d\tau U\left[x\left(\tau\right)\right]}\indent
e^{-q\int^{t+\Delta t}_{\Delta t}d\tau
U\left[x\left(\tau\right)\right]}\right>_{\left(x_{0},\sigma\right)}\\\
&=\left(1-qU(x_{0})\Delta t\right)\left<e^{-q\int^{t+\Delta t}_{\Delta t}d\tau
U\left[x\left(\tau\right)\right]}\right>_{\left(x_{0},\sigma\right)}.\end{split}$
(86)

where $(x_{0},\sigma)$ is the initial configuration. In time interval $\Delta
t$ the state $(x_{0},\sigma)$ of the RTP can change to $(x_{0}+\sigma v\Delta
t,\sigma)$ with probability $1-R(x_{0})\Delta t$ and to $(x_{0},-\sigma)$ with
probability $R(x_{0})\Delta t$. We can write Eq.(86) as following:

$\displaystyle H_{\sigma}(q,x_{0},t+\Delta t)$ $\displaystyle=\left(1-qU\Delta
t\right)\left[\left(1-R\Delta t\right)\langle e^{-q\int^{t+\Delta t}_{\Delta
t}d\tau U\left[x\left(\tau\right)\right]}\rangle_{\left(x_{0}+\sigma v\Delta
t,\sigma\right)}+R\Delta t\left<e^{-q\int^{t+\Delta t}_{\Delta t}d\tau
U\left[x\left(\tau\right)\right]}\right>_{\left(x_{0}-\sigma v\Delta
t,-\sigma\right)}\right],$ $\displaystyle=\left(1-qU(x_{0})\Delta
t\right)\left[\left(1-R(x_{0})\Delta t\right)H_{\sigma}(q,x_{0}+\sigma v\Delta
t,t)+R(x_{0})\Delta tH_{-\sigma}(q,x_{0},t)\right].$ (87)

Taking the $\Delta t\to 0$ limit we obtain

$\displaystyle\partial_{t}H_{\sigma}=\sigma
v\partial_{x_{0}}H_{\sigma}-R(x_{0})H_{\sigma}+R(x_{0})H_{-\sigma}-qU(x_{0})H_{\sigma}.$
(88)

If we choose $U(x)=\mathbb{I}_{\epsilon}(x)$ then $Y$ represents the time
spent in the interval $x\in[-\epsilon,\epsilon]$ and for this choice one
obtains the differential equations (17).

##  Appendix B Derivation of $\bar{H}_{\pm}(q,x_{0},s)$ in Eqs. (29) and (30)

In this appendix, we solve the differential equation Eq. (28) to obtain the
solutions of $\bar{H}_{\pm}(q,x_{0},s)$ in Eqs. (29) and (30). To begin with,
we rewrite Eq. (28) here as

$\displaystyle s\bar{H}-1=\frac{\partial}{\partial
x_{0}}\left(\frac{v^{2}}{s+2\gamma+q\mathbb{I}_{\epsilon}}\frac{\partial\bar{H}}{\partial
x_{0}}\right)-q\mathbb{I}_{\epsilon}\left(x_{0}\right)\bar{H},$ (89)

where $\mathbb{I}_{\epsilon}(x_{0})$ is equal to $1$ for
$-\epsilon<x_{0}<\epsilon$ and $0$ otherwise. Let us first look at Eq. (89)
when $-\infty<x_{0}<-\epsilon$ for which $\mathbb{I}_{\epsilon}(x_{0})=0$.
This differential equation then becomes

$\displaystyle
s\bar{H}-1=\frac{v^{2}}{s+2\gamma}\frac{\partial^{2}\bar{H}}{\partial
x_{0}^{2}}.$ (90)

We now make the following transformation

$\displaystyle\bar{H}(q,x_{0},s)=\frac{1}{s}+\mathcal{W}(q,x_{0},s),$ (91)

in Eq. (90) to obtain

$\displaystyle\frac{\partial^{2}\mathcal{W}}{\partial
x_{0}^{2}}=\frac{\lambda_{s}^{2}}{v^{2}}\mathcal{W},$ (92)

where $\lambda_{s}=\sqrt{s(2\gamma+s)}$. This is a simple equation which needs
to be solved with appropriate boundary conditions. From Eqs. (22) and (23), it
is easy to see that $\bar{H}(q,x_{0}\to\pm\infty,s)=\frac{1}{s}$ which,
through Eq. (91) yields $\mathcal{W}(q,x_{0}\to\pm\infty,s)=0$. It is now easy
to solve Eq. (92) along with these boundary conditions to get

$\displaystyle\mathcal{W}(q,x_{0},s)=\mathcal{B}_{1}(q,s)e^{\frac{\lambda_{s}}{v}x_{0}},$
(93)

where $\mathcal{B}_{1}(q,s)$ is a $x_{0}$ \- independent function that needs
to be computed. Using this in Eq. (91) gives

$\displaystyle\bar{H}(q,x_{0},s)=\frac{1}{s}+\mathcal{B}_{1}(q,s)e^{\frac{\lambda_{s}}{v}x_{0}}.$
(94)

To compute $\bar{H}_{\pm}(q,x_{0},s)$, we also need $\bar{Z}(q,x_{0},s)$ as is
evident from Eq. (24). To this aim, we use Eq. (26) appropriately for
$\alpha=0$ to write $\bar{Z}(q,x_{0},s)$ in terms of $\bar{H}(q,x_{0},s)$ as
$\bar{Z}(q,x_{0},s)=\frac{v}{s+2\gamma}\partial_{x_{0}}\bar{H}$. Inserting the
solution of $\bar{H}(q,x_{0},s)$ in Eq. (94) and using Eqs. (23) and (24), we
find

$\displaystyle\bar{H}_{+}(q,x_{0},s)=\frac{1}{s}+\mathcal{A}_{1}(q,s)e^{\frac{\lambda_{s}x_{0}}{v}},$
(95)
$\displaystyle\bar{H}_{-}(q,x_{0},s)=\frac{1}{s}+\mathcal{A}_{1}(q,s)\left(\frac{-\lambda_{s}+s+\gamma}{\gamma}\right)e^{\frac{\lambda_{s}x_{0}}{v}}.$
(96)

We emphasise that these two solutions are valid for $-\infty<x_{0}<-\epsilon$
which are also written in Eqs. (29) and (30). Also, we have defined a new
function $\mathcal{A}_{1}(q,s)$ which depends on $\mathcal{B}_{1}(q,s)$. We
next look at the solution of Eq. (89) when $\epsilon<x_{0}<\infty$. Although
it is possible to solve this equation explicitly, we, however, use the
symmetry $\bar{H}_{\pm}(q,x_{0},s)=\bar{H}_{\mp}(q,-x_{0},s)$ to write the
solutions in the region $\epsilon<x_{0}<\infty$. Using Eqs. (95) and (96), the
solutions can be written as

$\displaystyle\bar{H}_{+}(q,x_{0},s)=\frac{1}{s}+\mathcal{A}_{1}(q,s)\left(\frac{-\lambda_{s}+s+\gamma}{\gamma}\right)e^{-\frac{\lambda_{s}x_{0}}{v}},$
(97)
$\displaystyle\bar{H}_{-}(q,x_{0},s)=\frac{1}{s}+\mathcal{A}_{1}(q,s)e^{-\frac{\lambda_{s}x_{0}}{v}}.$
(98)

These solutions are written in Eqs. (29) and (30) for $\epsilon<x_{0}<\infty$.
We now solve Eq. (89) for $-\epsilon<x_{0}<\epsilon$ for which
$\mathbb{I}_{\epsilon}(x_{0})=1$. Proceeding as before,it is straightforward
to get the solution as

$\displaystyle\bar{H}(q,x_{0},s)=\frac{1}{s+q}+\mathcal{B}_{3}(q,s)e^{\frac{\lambda_{q}x_{0}}{v}}+\mathcal{B}_{4}(q,s)e^{-\frac{\lambda_{q}x_{0}}{v}},$
(99)

where $\lambda_{q}=\sqrt{(s+q)(s+q+2\gamma)}$ and $\mathcal{B}_{3}(q,s)$ and
$\mathcal{B}_{4}(q,s)$ are $x_{0}$\- independent functions. Using Eq. (26), we
find $\bar{Z}(q,x_{0},s)=\frac{v}{s+2\gamma+q}\partial_{x_{0}}\bar{H}$ which,
through Eqs. (23) and (24) gives

$\displaystyle\bar{H}_{+}(q,x_{0},s)=\frac{1}{s+q}+\mathcal{A}_{2}(q,s)e^{\frac{\lambda_{q}x_{0}}{v}}+\mathcal{A}_{3}(q,s)e^{-\frac{\lambda_{q}x_{0}}{v}},$
(100)
$\displaystyle\bar{H}_{-}(q,x_{0},s)=\frac{1}{s+q}+\mathcal{A}_{2}(q,s)\left(\frac{-\lambda_{q}+s+q+\gamma}{\gamma}\right)e^{\frac{\lambda_{q}x_{0}}{v}}$
$\displaystyle~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}+\left(\frac{\lambda_{q}+s+q+\gamma}{\gamma}\right)\mathcal{A}_{3}(q,s)e^{-\frac{\lambda_{q}x_{0}}{v}},$
(101)

where we have defined two new functions $\mathcal{A}_{2}(q,s)$ and
$\mathcal{A}_{3}(q,s)$ that depend on $\mathcal{B}_{3}(q,s)$ and
$\mathcal{B}_{4}(q,s)$. Finally, we use the symmetry
$\bar{H}_{\pm}(q,x_{0},s)=\bar{H}_{\mp}(q,-x_{0},s)$ again to write
$\mathcal{A}_{3}(q,s)=\left(\frac{-\lambda_{q}+s+q+\gamma}{\gamma}\right)\mathcal{A}_{2}(q,s)$
and insert this in Eqs. (100) and (101) to get

$\displaystyle\bar{H}_{\pm}(q,x_{0},s)=$
$\displaystyle\frac{1}{s+q}+\mathcal{A}_{2}(q,s)e^{\pm\frac{\lambda_{q}x_{0}}{v}}$
$\displaystyle+\left(\frac{-\lambda_{q}+s+q+\gamma}{\gamma}\right)\mathcal{A}_{2}(q,s)e^{\mp\frac{\lambda_{q}x_{0}}{v}}.$
(102)

This result is quoted in Eqs. (29) and (30) for
$x_{0}\in[-\epsilon,\epsilon]$.

##  Appendix C Derivation of $\mathcal{S}_{m}(t)$

This appendix deals with the derivation of $\mathcal{S}_{m}(t)$ in Eq. (5).
Based on the path-counting analysis, we saw in Eq. (4) that the distribution
of $T_{loc}$ is given as

$\displaystyle
P\left(T_{loc},t\right)=\sum_{m=0}^{\infty}\mathcal{S}_{m}(t)~{}\delta\left(T_{loc}-\frac{2m+1}{2v}\right),$
(103)

where $\mathcal{S}_{m}(t)$ was interpreted as the probability that the RTP
returns to the origin $m$-times in time $t$ starting from the origin. In this
appendix, we rigorously derive the expression of $\mathcal{S}_{m}(t)$ as given
in Eq. (5) for $\alpha=0$. Let us assume that the RTP initially has $+$
velocity direction. The probability $\mathcal{S}_{m}(t)$ can be formally
written as

$\displaystyle\mathcal{S}_{m}(t)$
$\displaystyle=\int_{0}^{t}d\tau_{1}F_{+}(\tau_{1})\int_{0}^{t-\tau_{1}}d\tau_{2}F_{-}(\tau_{1})...$
$\displaystyle\times\int_{0}^{t-\sum_{i=0}^{m-1}\tau_{i}}d\tau_{m}F_{(-1)^{m-1}}(\tau_{m})\mathbb{S}_{(-1)^{m-1}}\left(t-\sum_{i=0}^{m}\tau_{i}\right),$
(104)

where $F_{\sigma}(\tau_{i})$ is the probability distribution for the RTP to
arrive at the origin, starting from origin with initial velocity direction
$\sigma$, with $\sigma\in[+,-]$ and $\mathbb{S}_{\sigma}(t_{i})$ is the
probability that the RTP has not returned to the origin till time $t_{i}$
starting from the origin. Note that both these quantities are insensitive to
the initial velocity direction which implies that the end result of
$\mathcal{S}_{m}(t)$ will be independent of the initial velocity direction. To
understand Eq. (104), we procede as follows. In time
$[\tau_{1},\tau_{1}+d\tau_{1}]$, the RTP visits the origin for the first time
starting from the origin with speed $v$ which contributes
$F_{+}(\tau_{1})d\tau_{1}$ in Eq. (104). In the further time
$[\tau_{1}+\tau_{2},\tau_{1}+\tau_{2}+d\tau_{2}]$, starting from the origin,
the RTP visits the orgin for the second time. Since the particle was at the
origin at time $\tau_{1}$ with $-v$ speed, we can interprete the second visit
at time $\tau_{1}+\tau_{2}$ as the first-arrival in the time $\tau_{2}$. with
initial speed $-v$. This gives rise to $F_{-}(\tau_{2})d\tau_{2}$ term in Eq.
(104). Similarly, the $m$-th visit to the origin at time
$\tau_{1}+\tau_{2}+\tau_{3}+....+\tau_{m}$ can be interpreted as the first
visit at time $\tau_{m}$ since at time
$\tau_{1}+\tau_{2}+\tau_{3}+....+\tau_{m-1}$, the particle was at the origin
with speed $(-1)^{m-1}v$. Accordingly, we have
$F_{(-1)^{m-1}}(\tau_{m})d\tau_{m}$ term in Eq. (104). Once the particle has
visited the origin $m$-times, the particle will not cross the origin in the
remaining time $t-\tau_{1}-\tau_{2}-...-\tau_{m}$ which gives rise to the
survival probability term
$\mathbb{S}_{(-1)^{m-1}}\left(t-\sum_{i=0}^{m}\tau_{i}\right)$ in Eq. (104).
Finally, we have appropriately integrated over $\tau_{i}$ for all
$i=1,2,3,...,m$.

Although Eq. (104) looks a bit complicated, it possesses the convolution
structure which can be used to simplify expression in terms of the Laplace
variable $s$ with respect to $t$. Using the convolution theorem for Laplace
transforms, the Laplace transform of $\mathcal{S}_{m}(t)$ (which we denote by
$\bar{\mathcal{S}}_{m}(s)$) will just be the product of Laplace transforms of
$F_{\sigma}(\tau)$’s and $\mathbb{S}_{\sigma}(\tau)$. The expression of
$\bar{\mathcal{S}}_{m}(s)$ reads

$\displaystyle\bar{\mathcal{S}}_{m}(s)=\left[\bar{F}_{\sigma}(s)\right]^{m}\bar{\mathbb{S}}_{\sigma}(s),$
(105)

where $\bar{F}_{\sigma}(s)$ and $\bar{\mathbb{S}}_{\sigma}(s)$ are the Laplace
transforms of $F_{\sigma}(\tau)$’s and $\mathbb{S}_{\sigma}(\tau)$
respectively. Since $F_{\sigma}(\tau)$’s and $\mathbb{S}_{\sigma}(\tau)$ are
independent of $\sigma,$ the we have dropped the dependence of initial
velocity direction in Eq. (105) and replaced them with $\sigma$. Coming back
to Eq. (105), note that in deriving $\bar{\mathcal{S}}_{m}(s)$, we have not
made any reference to $\alpha$ which means that Eqs. (103), (104) and (105)
remain true for all $\alpha~{}(\geq 0)$. However, the exact form of
$\bar{F}_{\sigma}(s)$ and $\bar{\mathbb{S}}_{\sigma}(s)$ is known only for
$\alpha=0$ which read Malakar2018 ; Singh2020 ,

$\displaystyle\bar{\mathbb{S}}_{\sigma}(s)=\frac{\lambda(s)-s}{s\gamma},$
(106) $\displaystyle\bar{F}_{\sigma}(s)=\frac{\gamma}{s+\gamma+\lambda(s)},$
(107)

where $\lambda(s)=\sqrt{s(s+2\gamma)}$. Inserting these expressions of
$\bar{F}_{\sigma}(s)$ and $\bar{\mathbb{S}}_{\sigma}(s)$ in Eq. (105), we get

$\displaystyle\bar{\mathcal{S}}_{m}(s)=\left(\frac{\lambda(s)-s}{s\gamma}\right)\left(\frac{\gamma}{s+\gamma+\lambda(s)}\right)^{m}.$
(108)

To perform the inverse Laplace transformation, we use Eq. (40) to get

$\displaystyle\mathcal{S}_{m}(t)=e^{-\gamma t}\left[I_{m}(\gamma
t)+I_{m+1}(\gamma t)\right],$ (109)

which matches with the $\mathcal{S}_{m}(t)$ in Eq. (5).

##  Appendix D Inverse Laplace transformation of
$\frac{1}{s^{\frac{1}{2+\alpha}}}e^{-\mathcal{C}_{\alpha}T_{loc}s^{\frac{1+\alpha}{2+\alpha}}}$

Here we will derive the inverse Laplace transformation of Eq. (59) that leads
to the scaling structure of $P(T_{loc},t)$ in Eq. (60) for general $\alpha$.
To this aim, we consider the following inverse Laplace transformation:

$\displaystyle\Lambda(\beta,t,w)=\mathcal{I}_{s\to
t}^{-1}\left(e^{-ws^{\beta}}\right).$ (110)

Following Montroll1984 , this inverse Laplace transformation is given by

$\displaystyle\Lambda(\beta,t,w)=-\frac{1}{\pi}\sum_{n=1}^{\infty}\frac{(-w)^{n}}{n!}\frac{\Gamma\left(1+n\beta\right)}{t^{n\beta+1}}\sin\left(\pi
n\beta\right).$ (111)

We next define another inverse Laplace transform as

$\displaystyle\mathcal{G}(\beta,t,w)=\mathcal{I}_{s\to
t}^{-1}\left(\frac{e^{-ws^{\beta}}}{s^{1-\beta}}\right).$ (112)

using the definition of inverse Laplace transform in Eq. (34), it is easy to
show that

$\displaystyle\frac{\partial}{\partial t}\mathcal{G}(\beta,t,w)$
$\displaystyle=\frac{\partial}{\partial w}\Lambda(\beta,t,w),$ (113)
$\displaystyle=\frac{1}{\pi}\sum_{n=1}^{\infty}\frac{n(-w)^{n-1}}{n!}\frac{\Gamma\left(1+n\beta\right)}{t^{n\beta+1}}\sin\left(\pi
n\beta\right),$ (114)

where we have used Eq. (111) in going from first line to second line. Finally
integrating Eq. (114) from $t$ to $\infty$, we get

$\displaystyle\mathcal{G}(\beta,t,w)=\frac{1}{\pi}\sum_{n=1}^{\infty}\frac{(-w)^{n-1}}{n!}\frac{\Gamma\left(1+n\beta\right)}{\beta~{}t^{n\beta}}\sin\left(\pi
n\beta\right).$ (115)

Substituting $\beta=\frac{1+\alpha}{2+\alpha}$ and
$w=\mathcal{C}_{\alpha}T_{loc}$, we see that Eq. (112) becomes the inverse
Laplace transfrom of
$\frac{1}{s^{\frac{1}{2+\alpha}}}e^{-\mathcal{C}_{\alpha}T_{loc}s^{\frac{1+\alpha}{2+\alpha}}}$.
Using the form of
$\mathcal{G}\left(\frac{1+\alpha}{2+\alpha},t,\mathcal{C}_{\alpha}T_{loc}\right)$
in Eq. (59), we obtain the scaling form of $P(T_{loc},t)$ in Eq. (60).

Figure 9: Comparision of $\mathcal{P}_{\pm}(T_{loc})$ in Eqs. (79) (left
panel) and (80) (right panel) with the numerical simulations for two values of
$\alpha$\- (a) $\alpha=0.5$ and (b) $\alpha=1.5$. For both plots, we have
chosen $v=1,~{}\gamma=1,~{}M=1$. For simulation, we have taken
$\epsilon=0.001$.

##  Appendix E Derivation of $f_{\alpha}(z)$ for finite $z$

In this appendix, we provide the derivation of the scaling function
$f_{\alpha}(z)$ when $z$ is finite and which is written in Eq. (61). We
rewrite $P(T_{loc},t)$ of Eq. (59) in the form of Bromwich integral as

$\displaystyle P(T_{loc},t)\simeq\int_{E-i\infty}^{E+i\infty}\frac{ds}{2\pi
i}\frac{\mathcal{C}_{\alpha}}{s^{\frac{1}{2+\alpha}}}e^{t\Phi\left(s,\frac{\mathcal{C}_{\alpha}T_{loc}}{t}\right)},$
(116)

where $\mathcal{C}_{\alpha}$ is given by Eq. (55) and $\Phi(s,w)$ is defined
as

$\displaystyle\Phi(s,w)=s-ws^{\frac{1+\alpha}{2+\alpha}},$ (117)

where $w=\frac{\mathcal{C}_{\alpha}T_{loc}}{t}$. At large $t$, the integral in
Eq. (116) will be dominated by the saddle point of $\Phi(s,w)$ in $s$. The
saddle point is given by $\left(\frac{d\phi}{ds}\right)_{s_{*}}=0$, solving
which we find

$\displaystyle
s_{*}=\left(\frac{1+\alpha}{2+\alpha}\right)^{2+\alpha}~{}w^{2+\alpha}.$ (118)

Note that $w$ is kept fixed throughout the derivation. We now expand
$\Phi(s,w)$ about $s=s_{*}$ and substitute in Eq. (116) to get

$\displaystyle P(T_{loc},t)$
$\displaystyle\simeq\frac{e^{t\Phi(s_{*},w)}}{2\pi
i}\frac{\mathcal{C}_{\alpha}}{s_{*}^{\frac{1}{2+\alpha}}}\int_{E-i\infty}^{E+i\infty}ds~{}e^{t\frac{\Phi^{\prime\prime}(s_{*},w)}{2}(s-s_{*})^{2}},$
$\displaystyle\simeq\frac{e^{t\Phi(s_{*},w)}}{2\pi}\frac{\mathcal{C}_{\alpha}}{s_{*}^{\frac{1}{2+\alpha}}}\int_{-\infty+i(s_{*}+E)}^{\infty+i(s_{*}+E)}dy~{}e^{-t\frac{\Phi^{\prime\prime}(s_{*},w)}{2}y^{2}},$
$\displaystyle\simeq\frac{e^{t\Phi(s_{*},w)}}{2\pi}\frac{\mathcal{C}_{\alpha}}{s_{*}^{\frac{1}{2+\alpha}}}\int_{-\infty}^{\infty}du~{}e^{-t\frac{\Phi^{\prime\prime}(s_{*},w)}{2}u^{2}}.$
(119)

We have used the notation $w=\frac{\mathcal{C}_{\alpha}T_{loc}}{t}$ and
$\Phi^{\prime\prime}(s,w)=\frac{d^{2}\Phi}{ds^{2}}$. While going from first
line to second line, we have substituted $s-s_{*}=iy$ and while going to the
third line, we have used that
$\Phi^{\prime\prime}(s_{*},w)=\frac{(2+\alpha)^{1+\alpha}}{(1+\alpha)^{2+\alpha}}\frac{1}{w^{2+\alpha}}$
is always greater than zero. This also implies that the integral is third line
is always convergent. Performing this integral explicitly, we find the
$P(T_{loc},t)$ obeys the scaling form

$\displaystyle
P(t_{loc},t)\simeq\frac{\mathcal{C}_{\alpha}}{t^{\frac{1+\alpha}{2+\alpha}}}~{}f_{\alpha}\left(\frac{\mathcal{C}_{\alpha}T_{loc}}{t^{\frac{1+\alpha}{2+\alpha}}}\right)$
(120)

where $f_{\alpha}(z)$ is given by

$\displaystyle
f_{\alpha}(z)\simeq\frac{z^{\frac{\alpha}{2}}}{\sqrt{2\pi}}\frac{(1+\alpha)^{\frac{\alpha}{2}}}{(2+\alpha)^{\frac{\alpha-1}{2}}}~{}\text{exp}\left(-\frac{(1+\alpha)^{1+\alpha}}{(2+\alpha)^{2+\alpha}}~{}z^{2+\alpha}\right).$
(121)

We emphasise that this expression is valid only for finite $z$ and breaks down
for small values of $z$. The result in Eq. (121) is quoted in Eq. (61) in the
main text.

##  Appendix F Numerical verification of Eqs. (79) and (80)

This appendix provides the numerical verification of Eqs. (79) and (80) which
correspond to the distributions of $T_{loc}$ in presence of an absorbing wall
at $x=M$ with initial position $x_{0}=0$ and $x_{0}=-\epsilon$ respectively
for $\alpha=0$. The numerical verification is shown in Figure 9.

## References

  * (1) G. Wilemski and M. Fixman, J. Chem. Phys. 58, 4009 (1973).
  * (2) O. Benichou, M. Coppey, J. Klafter, M. Moreau and G. Oshanin, J. Phys. A: Math. Gen. 38, 7205 (2005).
  * (3) M. Doi, Chem. Phys., 11, 107 (1975).
  * (4) S. I. Temkin and B. I. Yakobson, J. Phys. Chem. 88, 2679 (1984).
  * (5) S. Redner, A Guide to First-Passage Processes (Cambridge University Press 2001).
  * (6) A. Pal, I. P. Castillo and A. Kundu, Phys. Rev. E 100, 042128 (2019).
  * (7) S. N. Majumdar and A. Comtet, Phys. Rev. Lett. 89, 060601 (2002).
  * (8) S. Sabhapandit, S. N. Majumdar and A. Comtet, Phys. Rev. E 73, 051102 (2006).
  * (9) G. Kishore and A. Kundu, arXiv:2010.06262
  * (10) S. Carmi, L. Turgeman and E. Barkai, J. Stat. Phys. 141, 1071 (2010).
  * (11) G. Louchard, J. Appl. Probab. 21, 479 (1984).
  * (12) M. Csorgo, Z. Shi and M. Yor, Bernoulli 5, 1035 (1999).
  * (13) D. S. Grebenkov, Phys. Rev. E 76, 041139 (2007).
  * (14) A. Comtet, J. Desbois and S. N. Majumdar, J. Phys. A: Math. Gen. 35, L687 (2002).
  * (15) A. Pal, R. Chatterjee, S. Reuveni and Anupam Kundu, J. Phys. A: Math. Theor. 52, 264002 (2019).
  * (16) I. Santiago, Nano Today 19, 11 (2018).
  * (17) A. Ghosh, W. Xu, N. Gupta and D. H. Gracias, Nano Today 31, 100836 (2020).
  * (18) G. H. Weiss, Physica A 311, 381 (2002).
  * (19) J. Masoliver and K. Lindenberg, Eur. Phys. J. B 90, 107 (2017).
  * (20) H. C. Berg, E. coli in Motion (New York: Springer 2003).
  * (21) J. Tailleur and M. E. Cates Phys. Rev. Lett. 100, 218103 (2008).
  * (22) A. P. Solon, M. E. Cates and J. Tailleur, Eur. Phys. J. Spec. Top. 224, 1231 (2015).
  * (23) N. Sepúlveda and R. Soto, Phys. Rev. E 94, 022603 (2016).
  * (24) A. P. Solon, Y. Fily, A. Baskaran, M. E. Cates, Y. Kafri, M. Kardar and J. Tailleur, Nat. Phys. 11 673 (2015).
  * (25) K. Malakar, V. Jemseena, A. Kundu, K. V. Kumar, S. Sabhapandit, S. N. Majumdar, S. Redner and A. Dhar, J. Stat. Mech. (2018) 043215.
  * (26) T. Demaerel and C. Maes, Phys. Rev. E 97, 032604 (2018).
  * (27) A. Dhar, A. Kundu, S. N. Majumdar, S. Sabhapandit, and G. Schehr, Phys. Rev. E 99, 032132 (2019).
  * (28) U. Basu, S. N. Majumdar, A. Rosso, S. Sabhapandit, and G. Schehr, J. Phys. A: Math. Theor. 53, 09LT01 (2020).
  * (29) S. N. Majumdar and M. Evans, J. Phys. A: Math. Theor. 51, 47 (2018).
  * (30) L. Angelani, R. Di Leonardo and M. Paoluzzi, Eur. Phys. J. E 37, 59 (2014).
  * (31) P. Le Doussal, S. N. Majumdar, and G. Schehr, Phys. Rev. E 100, 012113 (2019).
  * (32) F. Mori, P. Le Doussal, S. N. Majumdar and G. Schehr, Phys. Rev. Lett. 124, 090603 (2020).
  * (33) P. Singh and A. Kundu, J. Stat. Mech. (2019) 083205.
  * (34) E. Woillez, Y. Zhao, Y. Kafri, V. Lecomte, and J. Tailleur, Phys. Rev. Lett. 122, 258001 (2019).
  * (35) A. K. Hartmann, S. N. Majumdar, H. Schawe and G. Schehr, J. Stat. Mech. (2020) 053401.
  * (36) G. Gradenigo and S. N. Majumdar, J. Stat. Mech. (2019) 053206.
  * (37) T. Banerjee, S. N. Majumdar, A. Rosso, and G. Schehr, Phys. Rev. E 101, 052101 (2020).
  * (38) I. Santra, U. Basu and S. Sabhapandit, Phys. Rev. E 101, 062120 (2020).
  * (39) J. Masoliver and G. H. Weiss, Physica A 195, 93 (1993).
  * (40) B. Lacroix-A-Chez-Toine and Asaf Miron, arXiv:2006.04841.
  * (41) P. Le Doussal, S. N. Majumdar and G. Schehr, Europhys. Lett. 130, 40004 (2020).
  * (42) P. Singh, S. Sabhapandit and A. Kundu, J. Stat. Mech. (2020) 083207.
  * (43) U. Basu, S. N. Majumdar, A. Rosso and G. Schehr, Phys. Rev. E 98, 062121 (2018).
  * (44) U. Basu, S. N. Majumdar, A. Rosso and G. Schehr, Phys. Rev. E 100, 062116 (2019).
  * (45) M. Kac, Trans. Am. Math. Soc. 65, 1 (1949).
  * (46) Kac, M., in Proceedings of the Second Berkeley Symposium on Mathematical Statistics and Probability, Berkeley, 189 (1950) (edited by J. Neyman University of california press, Berkeley, 1951),
  * (47) S. N. Majumdar, Curr. Sci. 89 2076 (2005).
  * (48) A. A. Balkema and K. L. Chung, Seminar on Stochastic Processes, 1991 (Progress in Probability)
  * (49) H. Bateman, Tables of Integral Transforms (Mcgraw-Hill Book Company, 1954).
  * (50) S. N. Majumdar and B. Meerson, J. Stat. Mech. (2020) 023202.
  * (51) E. W. Montroll and J. T. Bendler, J. Stat. Phys. 34, 129 (1984).