When faced with a double integral, such as
try interchanging the integrals and see if this simplifies the expression. This is good in situations in which looks easy to integrate in but not in . (See "Which integrals are simpler to integrate".) However, surprisingly often, even if you just interchange the order of integration without thinking in advance what you will get out of it, something good happens.
Of course, one can similarly interchange sums and integrals, or sums with sums; the latter technique is also known as double counting. The technique is also closely related to linearity of expectation.
Undergraduate real analysis
Let's play around with the Riemann zeta function
where we restrict attention initially to the case , so there is no difficulty making the sum converge. We will try to expand as an integral, so that we can get something interesting by interchanging sums and integrals.
The starting point is the scaling identity
for any which is bounded and rapidly decreasing. One could try a number of different functions here, but a particularly nice one is the Gaussian (basically because it is its own Fourier transform). Inserting this, we soon obtain the identity
(where is the Gamma function) so on summing over all non-zero and interchanging the integrals we obtain
where is the Theta function.
Now we use the fact that is its own Fourier transform. Combining this with the Poisson summation formula we obtain the identity
inserting this identity into the above identity (and dividing into the regions and ) we soon arrive at the formula
This identity has two important consequences. Firstly, the rapid decay of ensures that the right-hand side makes sense for all complex numbers (except for the poles at ), and thus explicitly defines a meromorphic continuation of and hence . Secondly, the right-hand side is symmetric with respect to the reflection , leading to the celebrated functional equation
(More suggestions welcome!)
In order to justify the interchange of integrals, one can use results such as the Fubini-Tonelli theorem. Alternatively, one can create an epsilon of room to regularize, discretize or truncate the integrand to the point where the interchange of integrals can be justified, and then take limits at the end of the argument.
Sometimes it is worthwhile to expand an integrand into a series or integral of other expressions for the sole purpose of applying the interchanging integrals trick. For instance, this is one major motivation for using Fourier identities.