In probability, I have seen some examples for which both Fubini's theorem and integration by parts (for Riemann-Stieltjes integrals with cdf as integrator) provide different but correct solutions. For example
- In proving $E(|X|)=\int_0^\infty P(|X| > t)dt$, Edvin and Did used Fubini's theorem, while Ben used integration by parts;
- In proving $\operatorname{median}(X)$ solves $\min_{c \in \mathbb{R}} E |X-c|$, Did used Fubini's theorem, while Sivaram used integration by parts in Edit.
So I wonder if the two are related somehow? For example, in some cases (especially the two examples above), can one lead to the other?
A wide guess for going from Fubini's theorem to integration by parts is:
Integration by parts says
$$ \begin{align} f(b)g(b) - f(a)g(a) & = \int_a^b g(x) \, df(x) + \int_a^b f(x) \, dg(x). \end{align} $$
If there is some $c \in \mathbb{R}$ such that $g(c)=0$, then $$ \int_a^b g(x) \, df(x) = \int_a^b \int_c^x dg(t) \, df(x ) $$ If Fubini's theorem or some of its variants can apply, then for some $d \in \mathbb{R}$, $$ \int_a^b \int_c^x dg(t) \, df(x ) = \int_c^b \int_d^t df(x) \, dg(t ) = \int_c^b \int_d^x df(t) \, dg(x ) $$ one step closer to $\int_a^b f(x) \, dg(x)$, but still far away from integration by parts.
- No idea yet about going from integration by parts to Fubini's theorem.