Let's say you have $$\int^\infty_0 f(x) dx$$ and you substitute $x=u^2$ so that the integral becomes, $$\int^\infty_0 f(u) du$$ or $$\int^{-\infty}_0 f(u) du$$
My question is, which of these integral intervals are valid? Are they both always valid or are there cases when only one of them or none of them are valid? And if there are such cases how do I determine when that is the case?
Edit:
The integral in question is: $$\int^{\infty}_0 e^xx^{y-1}dx, \space\space\space y>0$$ I did this substitution: $x=u^2$, because I wanted to arrive to this: $$2\int^{\infty}_0 e^{u^2}u^{2y-1}du$$
So what would be a better substitution?