# Criteria for swapping integration and summation order

I have a function (a potential from an electrostatic potential via a Fourier series) in the form of

$$V(x, y, z)=\sum_n\sum_m \ a(x, n, m) b(y, n) c(z, m) \int\int f(u, v) d(u,n) e(v,m) du\, dv$$

Here functions $a(), b(), c(), d(), e()$ are known, well behaved (mostly Fourier terms, so smooth sines or expoentials). $f()$ is unknown.

I can certainly safely move all of the terms into the integral:

$$V(x, y, z)=\sum_n\sum_m \ \int\int a(x, n, m) b(y, n) c(z, m) f(u, v) d(u,n) e(v,m) du\, dv$$

This form is not yet useful to me. I want to switch it around to be in the form $$V(x, y, z) = \int\int f(u, v) w(u,v) du\, dv$$ where all the summations get combined into a weight function $w(u, v)$ with all the summation nastiness hidden inside. (My final goal is to evaluate this weight function numerically.)

I'm sure this is possible... it's a method that's used to compute Greens functions in various applications. But in my derivation steps, I get to the step where the summation and integration $\sum\sum\int\int$ must be swapped to $\int\int\sum\sum$ and I can't figure out when this is "legal" and when it isn't. It's a trick that many derivations simply seem to leave as given: they just say "we swap the order" in papers like this and lectures like this. Or I find dense theory (not practice) about convergence in complex poles with finite cuts and bruises, Fubini the Great's magic trick, superMeasuringTape theory, yadda yadda, including here.

So I understand there's a wealth of fancy theoretical math on this question, and I understand that some lazy physicists just swap the order and don't even try to justify it. I am hoping someone can give me some intermediate balance between these extremes, something which says when the swap is justified and when it's not, assuming really smooth, constantly differentiable, terms like I have in my first equation above.

Is the swap always safe for my example above, for any smooth functions $a() b() c() d()$ and $e()$?

Thanks!

• In general it depends on the domain of integration and how badly behaved the functions are. For starters see en.wikipedia.org/wiki/Fubini's_theorem . – Qiaochu Yuan Jun 28 '11 at 2:30
• Do the integral signs represent antiderivatives or are those definite integrals? And the more information you can give us about the functions involved, the more we will be able to help. – Corey Jun 28 '11 at 2:52

So these theorems say that a sum and an integral $\sum_n \int f(n,x) dx$ (or more generally, several of each) can be interchanged (or rearranged) in either of the following cases:
1. $f \ge 0$, or
2. $\sum_n \int |f(n,x)| dx < \infty$ (and by case 1, the condition $\int \sum_n |f(n,x)|dx < \infty$ is also equivalent).