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()$?


Dave Terr
  • 253
  • 1
  • 2
  • 7
  • In general it depends on the domain of integration and how badly behaved the functions are. For starters see http://en.wikipedia.org/wiki/Fubini's_theorem . – Qiaochu Yuan Jun 28 '11 at 02: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 02:52

1 Answers1


Fubini's (or Tonelli's) theorem is exactly what you need, I think, and I'm a bit disturbed to see you lump it in with a bunch of other mocking names for important mathematical ideas. Normally it's stated as a theorem about interchanging integrals with respect to measures, but for current purposes it's enough to know that both Riemann integration and summation can be expressed as integration with respect to measures.

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).

Smoothness is not enough for this to hold, essentially because smooth functions can grow rapidly at infinity. (I recommend finding yourself some counterexamples.) So you will have to find out what it is about your functions that allows this to work.

Nate Eldredge
  • 90,018
  • 13
  • 119
  • 248