TITLE: Density of first hitting time of Brownian motion with drift
QUESTION [44 upvotes]: I just started learning about Brownian motion and I am struggling with this question:
Suppose that $X_t = B_t + ct$, where $B$ is a Brownian motion, $c$ is a constant. Set $H_a = \inf \{ t: X_t =a \}$ for $ a >0$. Show that for $c \in \mathbb{R}$, the density of $H_a$ is 
\begin{equation}
f_{H_a} (t) = \frac{ a \exp \Big\{ \frac{- (a-ct)^2}{2t} \Big\} }{\sqrt{2 \pi t^3}}.
\end{equation}

REPLY [14 votes]: I will also use slightly different notation. The solution presented here uses the PDE approach to solve this problem and does not need the Girsanov theorem or the Joint distribution.
Theorem : Let the arithmetic Brownian motion process $X \left(t\right)$ be defined by the following Brownian motion driven SDE
\begin{equation}
\mbox{d}X \left(t\right) =  \mu \mbox{d}t + \sigma \mbox{d}{W}\left(t\right).
\end{equation}
with initial value $X_0$. Let $\tau =\inf \left(u |X(u) \le B\right)$ denote the first passage time for the barrier $X_0 < B$. Then the first passage time $\tau$ is distributed as Inverse Gaussian Distribution
\begin{equation}
\tau \sim IG\left(\frac{B - X_0}{\mu}, \frac{\left(B - X_0\right)^2}{\sigma^2}\right),\label{abmFirstPassageDist}
\end{equation}
and for $t > 0$ the pdf of $\tau$ is
\begin{equation}
f(t) = \sqrt{\frac{(B - X_0)^2}{2 \pi \sigma^2 t^3}} \exp\left[-\frac{ \left(\mu t - B + X_0\right)^2}{2 \sigma^2 t}\right]\label{abmFirstPassageDensity}.
\end{equation}
Proof:
The Kolmogorov Forward Equation corresponding to the SDE is
\begin{equation}
\frac{\partial p\left(x, t\right)}{\partial t} = -\mu \frac{\partial p\left(x, t\right)}{\partial x} + \frac{1}{2} \sigma^2 \frac{\partial^2 p\left(x, t\right)}{\partial x^2}. 
\end{equation}
To obtain the survival probability function, we first solve this PDE with the following initial and boundary value conditions
\begin{equation}
p\left(x, 0\right) = \delta\left(x - x_0\right); \qquad p\left(\infty, t\right) = p\left(x = B, t\right) = 0 \qquad (t > 0)\nonumber
\end{equation}
where $x = x_0$ is the starting point of the diffusive process, containing the initial concentration of the distribution and $B > x_0$ denotes the barrier.
This BVP can be solved using the standard method of images technique.
The free-space fundamental solution (Green’s function) of this PDE is 
\begin{equation}
\phi\left(x, t\right) = \frac{1}{\sqrt{2\pi \sigma^2 t}}\,
\exp\left[{-\frac{\left\lbrack x  - \mu t \right\rbrack^{2}}{2\sigma^2 t}}\right]
\end{equation}
hence, given initial condition the normalized solution for an unrestricted process, starting from $x_0$ can be obtained as
\begin{equation}
\phi_{x_0}\left(x, t\right) = \frac{1}{\sqrt{2\pi \sigma^2 t}}\,
\exp\left[{-\frac{\left\lbrack x  - \mu t - x_0\right\rbrack^{2}}{2\sigma^2 t}}\right]
\end{equation}
To solve this problem with the method of images, the barrier at $B$ is replaced by a mirror source located at a generic point $x = m$, with $m > B$  such that the solutions of equation emanating from the original and mirror sources exactly cancel each other at the position of the barrier at each instant of time.
This implies the initial conditions in must now be changed to
\begin{equation}
\qquad p\left(x, 0\right) = \delta\left(x - x_0\right) - \exp\left(- \eta\right)\delta\left(x - m\right),\nonumber
\end{equation}
where $\eta$ determines the strength of the mirror image source. Due to the linearity of
the PDE, a solution of this BVP is provided by
\begin{equation}
\qquad p\left(x, t\right) = \phi_{x_0}\left(x, t\right) - \exp\left(- \eta\right)\phi_{m}\left(x, t\right), \tag{1}
\end{equation}
where $\eta$ determines the strength of the mirror image source and $m > B$ is the location of this source.
The boundary condition requires for $x = B$, $p\left(x, t\right) = 0$
for all $t > 0$, which yields
\begin{eqnarray}
\nonumber
\frac{\left\lbrack x - \mu t - x_0 \right\rbrack^{2}}{2 \sigma^2 t} &=&
\eta + \frac{\left\lbrack x - \mu t - m\right\rbrack^{2}}{2 \sigma^2 t}
\\
\Leftrightarrow\;\;
\left\lbrack x - \mu t - x_0\right\rbrack^{2} &=&
2 \eta \sigma^2 t  + \left\lbrack x - \mu t - m\right\rbrack^{2}. \tag{2}
\end{eqnarray}
Upon substituting $x = B$ and $t = 0$, we get
\begin{equation}
\left\lbrack B - x_0 \right\rbrack^{2} = \left\lbrack B - m\right\rbrack^{2}\nonumber
\end{equation}
upon recalling $m > b$, we see that $m = 2 B - x_0$. Upon resubstituting the value of $m$ and $x = B$ in equation $(2)$ we obtain $\eta = \frac{2 \mu  (x_0 - B)}{\sigma ^2}$. With these choices of $m$ and $\eta$,
$(1)$  gives the solution of the BVP as
\begin{eqnarray}\label{p(x,t)}
p\left(x, t\right) &=& \frac{1}{\sqrt{2\pi \sigma^2 t}}\,
\left\{\exp\left[{-\frac{\left\lbrack x  - \mu t - x_0\right\rbrack^{2}}{2\sigma^2 t}}\right] - \exp\left[-\frac{2 \mu  (x_0 - B)}{\sigma ^2}\right] \exp\left[{-\frac{\left\lbrack x  - \mu t - 2 B + x_0\right\rbrack^{2}}{2\sigma^2 t}}\right]\right\}.
\end{eqnarray}
Under the condition $B > x_0$, the survival probability can be obtained as 
\begin{eqnarray}\nonumber
S(t) &=& \int_{- \infty}^{b } {p\left(x, t\right){\kern 1pt} \,dx} \\\nonumber
&=&\frac{1}{2} \left\{\text{erfc}\left[\frac{-B + x_0 + \mu  t}{\sqrt{2} \sigma  \sqrt{t}}\right] - \exp\left[\frac{2 \mu  (B-x_0)}{\sigma ^2}\right] \text{erfc}\left[\frac{B - x_0 +\mu  t}{\sqrt{2} \sigma  \sqrt{t}}\right]\right\}
\end{eqnarray}
where $\text{erfc}\left(z\right)$ denotes the complementary error function.
The first passage density can now be obtained as 
\begin{eqnarray}
f\left(t\right) &=& - \frac{\mbox{d} S\left(t\right)}{\mbox{d}t}\\\nonumber
&=& \frac{(B - x_0)}{\sqrt{2 \pi } \sigma  t^{3/2}} \exp\left[ -\frac{( x_0 - B + \mu  t)^2}{2 \sigma ^2 t}\right].
\end{eqnarray}
In particular, a Brownian motion with drift $\mu$ reaches the level B with probability one if and only if $\mu$ and $B$ have the same sign and $B > x_0$. If $\mu$ and $B$ have opposite signs, this density is "defective" in the sense that $\mathbb{P}\left(\tau_B  < \infty\right) < 1$. To put it another way the drift must orient the process towards the barrier, for a non-defective density to exist.