Integration by substitution limits confusion If I have the integral: $\displaystyle\int_{0}^{\infty}t^{-\frac{1}{2}}e^{-t} dt$
Am I allowed to make the substitution $t=x^2$, because I am then not sure what the limits of integration would be as for $t$ positive $x$ could be negative or positive?

Here are the conditions for making a substitution:
$\int_{y_0}^{y_1}f(y) dy = \int_{x_0}^{x_1}f(h(x))h'(x) dx$
if:
1. $f : [y_0, y_1] → R$ is continuous on $[y_0, y_1]$,


*$h : [x_0, x_1] → [y_0, y_1]$ is differentiable on $[x_0, x_1]$, with $h
′$ continuous on $[x_0, x_1]$,

*$h(x_0) = y_0$ and $h(x_1) = y_1$


note that this doesn't actually mean that h has to be bijective.
By taking limits you can extend this to improper integrals with infinities in the limits.
Also if you can satisfy the conditions 1 and 2 above but $h(x_0)=y_1$ and $h(x_1)=y_0$ ($y_1 > y_0$) you can fiddle about and show that you still $\int_{y_0}^{y_1}f(y) dy = \int_{x_0}^{x_1}f(h(x))h'(x) dx$ (do this by subtituting with $h_2(x) = h(x_0 + x_1 - x)$ which does satisfy the conditions above).
So you can actually get it to work both ways,
In your case:
$t(x) = x^2$
$t((- \infty ,0]) = [0, \infty)$
$t'(x) = 2x$
$\int_{0}^{\infty}t^{-\frac{1}{2}}e^{-t} dt = \int_{0}^{-\infty}|x^{-1}|e^{-x^2}*2x dx = \int_{0}^{-\infty}-2e^{-x^2} dx$ (x<=0)
$=\int_{-\infty}^{0}2e^{-x^2} dx$
And you can see that this is going to be the same as $\int_{0}^{\infty}2e^{-x^2} dx$ which is what you get if you do it with the other choice of limits.
