Show the diffusion equation is a normalised distribution. The diffusion equation is defined to be $$P(x,t) = \dfrac{1}{\sqrt{4D\pi t}} \exp \left(-\dfrac{x^2}{4Dt}\right),$$ where $D$ is a physical constant.
Show that the reaction diffusion equation is a normalised distribution.
I take that this means that I need to show that $$\int_{-\infty}^\infty P(x,t) \,dx = 1$$ (the sum of probabilities is $1$), which I have shown, and that $$\int_{-\infty}^{\infty} x P(x,t) \,dx = 0$$ or that the expectation is zero.
However, previous parts of the question make us show that $$\int_{-\infty}^\infty x^2 e^{-\alpha x^2} \,dx = 1.$$
Have I got the definition of the expectation wrong? Or am I trying to show the wrong thing? If so, why?
I don't think I'll need help with calculations, but if I do, I'll ask again.
 A: $$
u(x,t) = \frac{1}{\sqrt{4D \pi t}}e^{-x^2/(4Dt)}
$$
is the fundamental solution to the initial value problem,
$$
\frac{\partial u}{\partial t} = D\frac{\partial^2 u}{\partial x^2},\quad u(x,0) = \delta (x)\,.
$$
Note the following: 


*

*For $\alpha>0$, it is well-known that 


$$
\int\limits_{-\infty}^{\infty}e^{-\alpha x^2}\mathrm dx = \sqrt{\frac{\pi}{\alpha}}\,\,\mbox{ and }\,\,\int\limits_{-\infty}^{\infty}xe^{-\alpha x^2}\mathrm dx = 0.\tag{1}
$$


*The r.h.s of each equality in $(1)$ is a differentiable function of $\alpha$. In fact, by appealing to Leibniz's integral rule, we see that 
$$
\int\limits_{-\infty}^{\infty}x^2e^{-\alpha x^2}\mathrm dx = -\int\limits_{-\infty}^{\infty}\left(\frac{\partial}{\partial \alpha}e^{-\alpha x^2}\right)\mathrm dx = -\frac{\partial}{\partial \alpha}\left(~\int\limits_{-\infty}^{\infty}e^{-\alpha x^2}\mathrm dx\right) = - \frac{\partial}{\partial \alpha}\left(\sqrt{\frac{\pi}{\alpha}}\right) = \frac{1}{2}\sqrt{\frac{\pi}{\alpha^3}}\,.
$$
Therefore, 
$$
2\sqrt{\frac{\alpha^3}{\pi}}\int\limits_{-\infty}^{\infty}x^2e^{-\alpha x^2}\mathrm dx = 1,\,\,\color{red}{\mbox{and not}\int\limits_{-\infty}^{\infty}x^2e^{-\alpha x^2}\mathrm dx = 1}.\tag{2}
$$

*Furthermore, as you deduced, using $\alpha = \frac{1}{4Dt}$ in both $(1)$ and $(2)$ gives, 
$$
\frac{1}{\sqrt{4D\pi t}}\int\limits_{-\infty}^{\infty}e^{-\frac{1}{4Dt} x^2}\mathrm dx = 1,\quad\frac{1}{\sqrt{4D\pi t}}\int\limits_{-\infty}^{\infty}xe^{-\frac{1}{4Dt} x^2}\mathrm dx = 0,\quad\frac{1}{\sqrt{4D\pi t}}\int\limits_{-\infty}^{\infty}x^2e^{-\frac{1}{4Dt} x^2}\mathrm dx = 2Dt.
$$
A: I am not quite sure what the problem is. But the expextation of your distribution is indeed zero, since
\begin{equation}
\frac{x}{\sqrt{4D\pi t}}e^{-\frac{x^2}{4Dt}}
\end{equation}
is an odd function. Moreover
\begin{equation}
\int_{-\infty}^{\infty}x^2e^{-\alpha x^2}dx = \sqrt{4\alpha\pi}\int_{-\infty}^{\infty}\frac{1}{\sqrt{4\alpha\pi}}x^2e^{-\alpha x^2} dx= \sqrt{4\alpha\pi}\left(\frac{1}{2\alpha}\right),
\end{equation}
where we used that the second moment of the normal$(0,\frac{1}{\sqrt{2\alpha}})$ distribution equals $(\frac{1}{\sqrt{2\alpha}})^2 + 0^2$.
