If a single particle sits on an infinite line and undergoes a 1-D random walk, the probability density of its spatio-temporal evolution is captured by a 1-D gaussian distribution.
\begin{align} P(x,t)&=\frac{1}{\sqrt{4 \pi D t}}e^{-\frac{(x-x_0)^2}{4Dt}} \end{align}
However, suppose there are impassable boundaries on the line; on one side, or on both sides. Are there any boundary conditions for which there exists a closed form probability density function for how this particle will behave over time? Any references to such solutions would be extraordinarily helpful.
EDIT. Attempting to generalize Emilio's result below for an arbitrary initial particle position $-L/2 < x_0 < L/2$.
I had to work it out by example. I found the following "images" were required to account for reflections of an off-center particle at position $x_0$: for the first and second reflections on both sides the new gaussians had to be centered on ($-2L+x_0$, $-L-x_0$, $x_0$, $L-x_0$, $2L+x_0$). From the pattern I think the full solution can be expressed, for all integers $n$, as:
\begin{align} P(x,t)&=\frac{1}{\sqrt{4 \pi D t}}\sum_{n=-\infty}^\infty e^{-\frac{(x-nL-(-1)^nx_0)^2}{4Dt}} \end{align}
where the old $x_0$ is now defined as $nL+(-1)^{n}x_0$