Why is it valid to break a double integral into two single integrals? The following double integral comes from a probability exercise in which I have to calculate the probability of a region by integrating the bivariate PDF over that region.
\begin{align*}
\int_1^\infty\int_1^\infty\frac{1}{8}y_1e^{\frac{-(y_1+y_2)}{2}}dy_1dy_2 &= \int_1^\infty\int_1^\infty(\frac{1}{4}y_1e^{\frac{-y_1}{2}})(\frac{1}{2}e^{\frac{-y_2}{2}})dy_1dy_2 \\ \\
&= \int_1^\infty(\frac{1}{4}y_1e^{\frac{-y_1}{2}})dy_1 \times \int_1^\infty(\frac{1}{2}e^{\frac{-y_2}{2}})dy_2
\end{align*}
Why is it allowed to treat the double integral as the product of two single integrals? I kind of get the general idea that we can "pull" the independent terms out of an integral, but I would like a more rigorous explanation to this problem.
 A: $$\int_a^b \int_c^d f(x) g(y) \, dy \, dx = \int_a^b f(x) \int_c^d g(y) \, dy \, dx = \int_a^b f(x) \, dx \ \cdot \ \int_c^d g(y) \, dy.$$
In the first equality, you can pull $f(x)$ out of the inner integral because $\int_c^d Cg(y) \, dy = C \int_c^d g(y) \, dy$.
In the second equality, you can pull the entire term $\int_c^d g(y) \, dy$ out of the outer integral because $\int_a^b f(x) \cdot C \, dx = \left(\int_a^b f(x) \, dx\right)  C$. 

Caveats: it is important that your original integrand was separable, i.e. of the form $f(x) g(y)$. (This is related to the joint PDF of two independent random variables.) It is also important that the limits of integration of the inner integral do not depend on the outer integral's dummy variables.
A: When you integrate w.r.t. $y_1$ you get $\int_1^{\infty} C \frac 1 2 e^{-\frac {y_2} 2}dy_2$ where $C=\int_1^{\infty} \frac 1 4 y_1e^{-\frac {y_1} 2}dy_1$. $C$ is a constant, so you can pull it out of the integral sign. 
A: Maybe an extra step would be helpful:
\begin{align}
\int_a^b \int_c^d f(x) \underbrace{g(y)}_{\substack{\text{pull}\\ \text{out front}}} \, dx \, dy &= \int_a^b g(y) \underbrace{\int_c^d f(x) \, dx}_{\substack{\text{pull}\\\text{out front}}} \, dy \\
&= \int_c^d f(x) \, dx \int_a^b g(y) \, dy.
\end{align}
