TITLE: How to change the limits of integration
QUESTION [5 upvotes]: I am attempting to solve the integral of the following...
$$\int_{0}^{2 \pi}\int_{0}^{\infty}e^{-r^2}rdr\Theta $$
So I do the following step...
$$=2 \pi\int_{0}^{\infty}e^{-r^2}rdr$$
but then the next step is to substitute $s = -r^2$ which results in...
$$=2 \pi\int_{- \infty}^{0}\frac{1}{2}e^{s}ds$$
The limits of integration are reversed now and the $r$ somehow results in $1/2$.
Can someone explain why this works? Why did substituting cause the limits change and result in the integration above?

REPLY [8 votes]: $s=-r^{2}$ gives $ds=-2rdr$ so $dr =-\frac 1 {2r} ds$. Also, as $r$ increases from $0$ to $\infty$, $s$ decreases from $0$ to $-\infty$.