# Prove that $\int_0^x \int_0^y \int_0^z f(t) dt dz dy = \frac{1}{2} \int_0^x (x-t)^2 f(t) dt$

Prove that

$$\int_0^x \int_0^y \int_0^z f(t) dt dz dy = \frac{1}{2} \int_0^x (x-t)^2 f(t) dt$$

Came across this problem and I'm not even sure how to start it. I figured that if the end goal is $\frac{1}{2} \int_0^x (x-t)^2 f(t) dt$ then I somehow need to transform the integral into:

$$\int_0^x \int_0^{x-t} \int_0^y f(t) dz dy dt$$

This is just changing the integration order but I'm having a hard time picturing this in my head. Is there any tricks to doing this?

-
$f = g \Leftrightarrow f' = g' \land f(0)=g(0)$ –  xavierm02 Apr 19 '13 at 17:57

First, take a look at the innermost double integral $\int_0^y \int_0^z f(t) dt dz$. This is over a triangle with $t$ from $0$ to $z$ and $z$ from $0$ to $y$.
If we go in the other direction, $t$ goes from $0$ to $y$ and $z$ goes from $t$ to $y$ ($t \le z$ is the same as $z \ge t$).
So $\int_0^y \int_0^z f(t) dt dz = \int_0^y \int_t^y f(t) dz dt = \int_0^y f(t)\int_t^y dz dt = \int_0^y f(t)(y-t) dt$.
Now apply this again, and the $(y-t)$ will get integrated to $\frac{(x-t)^2}{2}$.
If you have $n$ nested integrals, this will become $\int_0^x \frac{f(t)(x-t)^{n-1}}{(n-1)!} dx$.