So, I thought I had a good grasp on how Fubini's theorem works, but then I found this exercise:
Let $\;f: [0,a] \rightarrow \mathbb{R}$ be a continuous function Use Fubini's theorem to prove
\begin{align} \int_{0}^{a}\left(\int_{0}^{x}\left(\int_{0}^{y} f(z) dz \right)dy \right)dx = \frac{1}{2}\int_{0}^{a}f(z)(a-z)^2dz \end{align}
So... I tried changing the integration order in every possible way, but the integral on the right never came out. I thought about using the fundamental theorem by defining $\;F(y) = \int_{0}^{y} f(z)dz$ and going from there, but to be honest I'm kind of clueless.
Any insight would be greatly appreciated
When integrating over a triangle, you can use an indicator function of the triangle and apply Fubini Theorem: $\newcommand{\dif}{\mathrm d}$ $$\begin{align*} \int_0^a \int_0^x \int_0^y f(z)\,\dif z\,\dif y\,\dif x &= \int_0^a \int_0^x \int_0^x [z \leq y]f(z)\,\dif z\,\dif y\,\dif x \\ &= \int_0^a \int_{[0,x]^2} [z \leq y]f(z)\,\dif (z \times y)\,\dif x \\ &= \int_0^a \int_0^x \int_0^x [z \leq y]f(z)\,\dif y\,\dif z\,\dif x \\ &= \int_0^a \int_0^x f(z) \left(\int_0^x [z \leq y] \dif y \right)\dif z\,\dif x \\ &= \int_0^a \int_0^x f(z) (x - z)\,\dif z\,\dif x \\ \end{align*}$$ Can you continue from here? $[\cdot]$ is the Iverson bracket.