# Can I have some assistance in proving this integral?

We are asked to prove the following integral;

$$\int_0^x(\int_0^tf(u) du) dt=\int_0^xf(u)(x-u)du$$

I know that we have to use integration by parts which when we differentiate a function will help us use the fundamental theorem of calculus. I just don't know when and were to apply this.

• The first step: $\int_0^x(\int_0^tf(u)\mathrm{d}u)\mathrm{d}t=[t(\int_0^tf(u)\mathrm{d}u)]_0^x-\int_0^xt\mathrm{d}(\int_0^tf(u)\mathrm{d}u)$ – Yuta Apr 30 at 5:54

$$\begin{array}\\ \sum_{i=0}^n \sum_{j=0}^i f(j) &=\sum_{j=0}^n \sum_{i=j}^n f(j)\\ &=\sum_{j=0}^n f(j)\sum_{i=j}^n 1\\ &=\sum_{j=0}^n f(j)(n-j+1)\\ \end{array}$$
$$\begin{array}\\ \int_0^x(\int_0^tf(u) du) dt &=\int_0^x\int_u^xf(u) dt du\\ &=\int_0^xf(u)\int_u^x1 dt du\\ &=\int_0^xf(u)(x-u) du\\ \end{array}$$
The change in the order of integration follows from the fact that $$0 \le t \le x$$ and $$0 \le u \le t$$ is the same as $$0 \le u \le x$$ and $$u \le t \le x$$.