How can one prove this property of integrals?$\int_0^bf(x)(b-x)\,dx=\int_0^b\left(\int _0^xf(t)\,dt\right)\,dx$ $$\int_0^bf(x)(b-x)\,dx=\int_0^b\left(\int _0^xf(t)\,dt\right)\,dx$$
I can't understand how this property can be proven but it has held true for everything I have tried. How do you even approach this? I have tried substitution but that gets you no where.
 A: For the R.H.S. we have $$\int_0^b\left(\int^x_0f(t)dt\right)dx=\int_0^b\left(F(x)-F(0)\right)dx=\int_0^bF(x)dx-\int_0^bF(0)dx$$ 
Integrate by parts on the first integral so that $u=F(x)\implies du =f(x) dx$ and $dv=dx\implies v=x$ so we have that $$\int_0^bF(x)dx=xF(x)\bigg|^b_0-\int_0^bxf(x)dx=bF(b)-\int_o^bxf(x)dx$$ so the R.H.S. is equal to $$bF(b)-\int_0^bxf(x)dx-F(0)x\bigg|^b_0=b(F(b)-F(0))-\int_0^bxf(x)dx=$$
$$=\int_0^bbf(x)dx-\int_0^bxf(x)dx=\int_0^bf(x)(b-x)dx$$
A: The left-hand side equals $\int_0^b bf(x)\ dx-\int_0^b xf(x)\ dx$
Now use integration by parts where $u=\int_0^x f(t)dt$ and $dv=dx$. Then $du=f(x)dx$ and $v=x$. We see $uv|_0^b=\int_0^bbf(t)\ dt$ and $\int_0^b v\ du=xf(x)\ dx$, so the right-hand side equals
$$\int_0^bbf(t)dt-\int_0^bxf(x)\ dx$$
which is the same as the left-hand side.
A: Well, assuming you can change the order of integration $$ \int_0^b \int_0^x f(t) \ \text{d}t \ \text{d}x = \int_0^b \int_t^b f(t) \ \text{d}x \ \text{d}t = \int_0^b f(t) \left(\int_t^b  \text{d}x \right) \ \text{d}t = \int_0^bf(t)(b-t) \ \text{d}t $$
A: Define functions $F$ and $G$ as follows:
$$F(b):=\int_0^b f(x)(b-x)\,dx=b \int_0^b f(x)\,dx - \int_0^b xf(x)\,dx \\ G(b):=\int_0^b \left( \int_0^x f(t)\,dt \right) dx.$$
Then, differentiating "with respect to $b$", and using the product rule together with the FTC we have that
$$F'(b)=1 \cdot \int_0^b f(x)\,dx + b \cdot f(b) - bf(b) = \int_0^b f(x)\,dx$$
and that
$$G'(b)=\int_0^b f(t)\,dt$$
for all $b$. This means that $F' = G'$, and then $F=G+c$ for some constant $c$.
Since $F(0)=G(0)=0$, we conclude that $c=0$, and therefore $F = G$, meaning that $F(b)=G(b)$ for all $b$, as desired.
A: \begin{align}
& \int_0^b\left(\int _0^xf(t)\,dt\right)\,dx \\[10pt]
= {} & \iint\limits_{(t,x)\,:\,0\,<\,t\,<\,x\,<\,b} f(t)\, d(t,x) \\[10pt]
= {} & \int_0^b \left( \int_t^b f(t) \, dx \right) dt \\[10pt]
= {} & \int_0^b f(t)(b-t) \, dt.
\end{align}
