Show that $\int_0^b f(x)(b-x)\,dx=\int_0^b(\int_0^x f(t)\,dt)\,dx$ Let f: $\mathbb{R}\rightarrow\mathbb{R}$ be an arbitrary continuous function.
Show that:
$$\int_0^b f(x)(b-x)\,dx=\int_0^b(\int_0^x f(t)\,dt)\,dx$$ 
I have gotten relatively close using integration by parts but inserting the limits have gotten me confused. Any ideas?
 A: I doubt you have learnt Fubini's Theorem for changing the order of multiple integrals, so I'll present an answer using only integration by parts and the Fundamental Theorem of Calculus. 
First, recall the integration by parts formula:
\begin{align}
\int_0^b u'(x)  v(x) \, dx = u(x) v(x) \bigg|_0^b - \int_0^b u(x) v'(x) \, dx
\end{align}
Now, to apply this to your particular question at hand, define the functions $u,v:\Bbb{R} \to \Bbb{R}$ by
\begin{align}
u(x) := \int_0^x f(t) \, dt \quad \text{and} \quad v(x) := b-x
\end{align}
Using the Fundamental Theorem of Calculus (since $f$ is continuous, all the hypotheses of FTC are satisfied), we get that $u'(x) = f(x)$ and a simple computation shows that $v'(x) = -1$. Therefore,
\begin{align}
\int_0^b f(x) (b-x) \, dx &= \int_0^b u'(x) v(x) \, dx \\\\
&= \text{... integration by parts} \\\\
&= \int_0^b \left( \int_0^x f(t) \, dt \right) \, dx
\end{align}
I tried to tailor my notation so that this now becomes a direct application of integration by parts. Can you see how to fill in the details of the argument?
A: Let
$$ G(b)=\int_0^b f(x)(b-x)\,dx-\int_0^b \left(\int_0^x f(t)\,dt \right)\,dx. $$
Then
$$ G'(b)=\int_0^b f(x)\,dx-\int_0^b f(t)\,dt=0 $$
and hence
$$ G(b)\equiv C.$$
Since $G(0)=0$, one has $C=0$ and so $G(b)\equiv0$. Thus
$$ \int_0^b f(x)(b-x)\,dx=\int_0^b \left(\int_0^x f(t)\,dt \right)\,dx. $$
A: If $\Omega=\{(t,x)\in \mathbb{R}^2|0\leq t \leq x \leq b\}$ then
$$\int_0^b \int_0^x f(t) dt dx=\int_{\Omega} f(t) dA = \int_0^b \int_t^b f(t) dx dt=\int_0^b f(t)(b-t)dt=\int_0^bf(x)(b-x)dx.$$
