Solution (source code)

= Solution

The <survival probability from an absorbing transition density> follows by integrating over final <position>. Since
$$
\int_{-L}^{L}\cos\frac{(2j+1)\pi x}{2L}\,dx
=\frac{4L(-1)^j}{(2j+1)\pi},
$$
the exact <survival probability> for $t>0$ is
$$
S(t)=\frac4\pi\sum_{j=0}^{\infty}\frac{(-1)^j}{2j+1}
e^{-(2j+1)^2u},\qquad u=\frac{\pi^2Dt}{4L^2}.
$$
The slowest Dirichlet mode dominates at large <time>:
$$
\boxed{S(t)\sim\frac4\pi\exp\!\left(-\frac{\pi^2Dt}{4L^2}\right).}
$$
The first relative correction is $-\tfrac13e^{-8u}$. The approximation is a late-time result; extrapolating its prefactor to $t=0$ would incorrectly give a <probability> larger than one. The full alternating series tends to one there.

\Image[/past-exam-of-the-theoretical-physics-ii-course-of-the-university-of-cambridge/2015/paper-1-killed-diffusion.png]
{title=Original absorbing-interval transition densities and the approach of the survival probability to its slowest-mode asymptote}