I would like to implement this equation, which represent the brownian motion in one-dimension (1D) of a particle in a confined 1D box, which initial position is $x_0$ at time $t_0$ and final position is $x$ at time $t$.
\begin{equation} P(x,t|x_0,t_0) =\frac{1}{L} + \frac{2}{L} \sum_{n=1}^{\infty} exp\left[ -\left( \frac{n\pi}{2}\right)^2 \frac{t-t_0} {\tau}\right] cos\left( \frac{n\pi x} {L} \right) cos\left( \frac{n\pi x_0} {L} \right)\end{equation}
One suggestion was given to me is to try identifying if this expression has a closed form.
Do you have any idea how a closed form could be obtained?