On integrals related to $\int^{+\infty}_{-\infty} e^{-x^2} dx = \sqrt{\pi}$

Solution 1:

a. We make the substitution $t=\sqrt{a}x$, $a>0$, thus: $$ \int_{-\infty}^{+\infty}e^{-ax^2}dx =\lim_{\substack{n\rightarrow\infty\\m\rightarrow\infty}}\int_{-n}^{+m}e^{-ax^2}dx =\lim_{\substack{n\rightarrow\infty\\m\rightarrow\infty}}\int_{-n\sqrt{a}}^{+m\sqrt{a}}e^{-t^2}\frac{dt}{\sqrt{a}} =\frac1{\sqrt{a}}\int^{+\infty}_{-\infty} e^{-x^2} dx = \sqrt{\frac{\pi}{a}} $$

b. We differentiating our result from part (a) with respect to $a$. $$ \frac{d}{da} \int^{+\infty}_{-\infty}e^{-ax^2}dx = \frac{d}{da}\left(\sqrt{\frac{\pi}{a}}\right) \quad\Rightarrow\quad \int^{+\infty}_{-\infty}\frac{d}{da}e^{-ax^2}dx = \frac{d}{da}\left(\sqrt{\frac{\pi}{a}}\right) $$

Note that moving $\frac{d}{da}$ inside the integral is justified since both $e^{-ax^2}$ and $\frac{d}{da}(e^{-ax^2})$ are continuous.

Simplifying gives: $$ -\int_{-\infty}^{+\infty}x^2e^{-ax^2}dx = -\frac{\sqrt{\pi}}{2a^{3/2}} \quad\Rightarrow\quad \int_{-\infty}^{+\infty}x^2e^{-ax^2}dx = \frac{\sqrt{\pi}}{2a^{3/2}} $$

c. We must show: (1) $P(x,t)$ is non-negative; and (2) $\int P(x,t)=1$. We establish (1) by noting that $\exp(-x^2/4DT)\geq 0$ for all $x\in\mathbb{R}$. To establish (2), observe the following result which follows from part (a) (we set $a=1/(4Dt)$): $$ \int_{-\infty}^{+\infty}P(x,t)\;dx =\frac{1}{\sqrt{4 \pi D t}} \int_{-\infty}^{+\infty} \exp \left( -\frac{x^2}{4Dt}\right)\;dx =\frac{1}{\sqrt{4 \pi D t}} \sqrt{\frac{\pi}{1/(4Dt)}} = 1 $$

EDIT: Added some clarification for part (c).