Calculate definite Integral I=$\int_{-\infty}^{\infty}e^{-ax^2}dx=\sqrt\frac{\pi}{a}$
But if we change variable: $ax^2=t$
I=$\int_{0}^{\infty}\frac{e^{-t}}{2\sqrt{at}}dt=\frac{1}{2\sqrt{a}}\Gamma(\frac12)=\frac12\sqrt\frac{\pi}{a}$
Where's wrong?
True answer is $\sqrt\frac{\pi}{a}$
 A: Let $$I = \int^{\infty}_{-\infty}e^{-ax^2}dx = 2\int^{\infty}_{0}e^{-ax^2}dx$$
Put $ax^2=t^2\;,$ Then $2axdx=-2tdt\Rightarrow axdx=tdt$
So $\displaystyle dx=\frac{t\sqrt{a}}{at}dt = \frac{1}{\sqrt{a}}dt$
So $$I = \frac{2}{\sqrt{a}}\int^{\infty}_{0}e^{-t^2}dt = \frac{2}{\sqrt{a}}\times \frac{\sqrt{\pi}}{2} = \sqrt{\frac{\pi}{a}}$$
$\bf{Calculation\;  of \; \displaystyle \int^{\infty}_{0}e^{-x^2}dx}$
Let $\displaystyle J = \int^{\infty}_{0}e^{-x^2}dx$
Replace $x\rightarrow ax\;,$ Then $\displaystyle J = \int^{\infty}_{0}ae^{-a^2x^2}dx$
So $$J\times e^{-a^2}  = \int^{\infty}_{0}e^{-a^2(1+x^2)}adx$$
So $$J\times \int^{\infty}_{0}e^{-a^2}da  = \int^{\infty}_{0}\int^{\infty}_{0}e^{-a^2(1+x^2)}adadx=\frac{1}{2}\int^{\infty}_{0}\frac{1}{1+x^2}dx = \frac{1}{2}\cdot \frac{\pi}{2}$$
So $$J\times J = \frac{\pi}{4}\Rightarrow J = \frac{\sqrt{\pi}}{2}$$
A: The integrand is an even function so you can write
$$\int\limits_{-\infty}^{\infty} \mathrm{e}^{-ax^{2}} dx
= 2 \int\limits_{0}^{\infty} \mathrm{e}^{-ax^{2}} dx$$ 
Your subsequent steps are correct.
