# Interchanging the order of integration.

Can someone explain why the following works please?

$\int^t_0 f(s) \int^s_0 f(u) \,du\,ds = \int^t_0 f(s) \int^t_s f(u) \,du\,ds$

EDIT: All I know is that $f(x)$ is an integrable function.

This is to do with non-homogeneous Poisson process and $f(x)$ is the intensity function (it's actually $\lambda(t)$ in the notes)

-
edited my post to clear things up – user1066113 Apr 1 '12 at 12:24

Consider the domains $D=\{(u,s)\mid0\leqslant u\leqslant s\leqslant t\}$ and $D'=\{(u,s)\mid0\leqslant s\leqslant u\leqslant t\}$ and the function $g:(u,s)\mapsto f(u)f(s)$. Then, the LHS is the integral of $g$ on $D$ and the RHS is the integral of $g$ on $D'$. Since $D'$ is the image of $D$ by the symmetry $\tau:(u,s)\mapsto (s,u)$ and since the function $g$ is invariant by $\tau$, both sides coincide.
Edit To convert the LHS and the RHS of the equation in your post into integrals of $g$ on well chosen domains, a systematic way to proceed is to convert every integral $\displaystyle\int_a^b\varphi(x)\mathrm dx$ into $\displaystyle\int [a\leqslant x\leqslant b]\varphi(x)\mathrm dx$, where $[\ \ ]$ denotes the Iverson bracket. For example, the LHS becomes $$\int [0\leqslant s\leqslant t]f(s)\int[0\leqslant u\leqslant s]f(u)\mathrm du\mathrm ds,$$ that is, $$\iint[0\leqslant s\leqslant t]f(s)[0\leqslant u\leqslant s]f(u)\mathrm du\mathrm ds=\iint[0\leqslant u\leqslant s\leqslant t]g(u,s)\mathrm du\mathrm ds.$$ By definition of the domain $D$, this is $$\iint_D g(u,s)\mathrm du\mathrm ds.$$ Likewise, this procedure shows the RHS is $$\iint_{D'} g(u,s)\mathrm du\mathrm ds.$$ For other simplifications that this write-everything-down-as-indicator-functions technique allows, see there.
See Edit.   – Did Apr 1 '12 at 13:00