Cauchy formula for repeated integrations I have proved the following formula for an arbitrary Riemann-Integrable function $f$ on the interval $[a,b]$:
$$ \int_{t=a}^b \left( \int_{s=a}^t f(s)ds\right) dt = \int_{t=a}^b (b-t)f(t)dt \hspace{1 cm} (*)$$
and I have also generalized it to the closed formula for the the n-th iteration (which you can find here https://en.wikipedia.org/wiki/Cauchy_formula_for_repeated_integration).
After having proved it by induction and by integration by parts, I have thought of an alternative way of showing this result.
For instance, let us just look at the case n=2: suppose that in the previous formula $f$ is itself an integral function of the form:
$$f(s) = \int_{r=a}^s g(r)dr$$
for Riemann-Integrable $g$ on $[a, b]$.
Now we can iterate $(*)$:
$$\int_{t=a}^b (b-t)f(t)dt = \int_{t=a}^b (b-t) \left( \int_{r=a}^t g(r)dr \right) dt = \int_{t=a}^b \left( \int_{r=a}^t (b-t)g(r)dr\right) dt = \int_{t=a}^b (b-t)^2 g(t)dt $$
therefore:
$$ \int_{t=a}^b \left( \int_{s=a}^t \left( \int_{r=a}^s g(r) dr\right) ds\right) dt = \int_{t=a}^b (b-t)^2 g(t)dt $$
which is actually wrong since there is no factor $1 / 2!$.
I really would like to know where I did wrong because to me this alternative proof seems more natural than the one I initially came up with. As always any comment or answer is welcome and let me know if I can explain myself clearer!
 A: We want to show
\begin{align}
I^{-n}(x)=\underbrace{\int_a^x \cdots \int_a^{x_{n-2}} \int_a^{x_{n-1}}}_{ \text{n-times}} f(x_n)\,dx_n\,dx_{n-1}\cdots\,dx_1&=\frac{1}{(n-1)!}\int_a^x (x-x_n)^{n-1}f(x_n) \,dx_n \tag{1}
\end{align}
First define:
\begin{align*}
I^{-1}(x)&=\int_a^x f(x_1)\,dx_1
\end{align*}
then
\begin{align*}
I^{-2}(x)&=\int_a^x \int_a^{x_1} f(x_2)\,dx_2\,dx_1\\
&=\int_a^x I^{-1}(x_1)\,dx_1\\
&=\int_a^x \int_{x_2}^x f(x_2)\,dx_1\,dx_2\\
&=\int_a^x (x-x_2) f(x_2)\,dx_2\\
\end{align*}
Integrating one more time we obtain
\begin{align*}
I^{-3}(x)&=\int_a^x \int_a^{x_1} \int_a^{x_2} f(x_3)\,dx_3\,dx_2\,dx_1\\
&=\int_a^x I^{-2}(x_1)\,dx_1\\
&=\int_a^x \int_a^{x_1}(x_1-x_3)f(x_3)\,dx_3\,dx_1\\
&=\int_a^x \int_{x_3}^x(x_1-x_3)f(x_3)\,dx_1\,dx_3\\
&=\int_a^x f(x_3) \int_0^{x-x_3} w\,dw\,dx_3\\
&=\frac{1}{2!}\int_a^x (x-x_3)^2f(x_3) \,dx_3\\
\end{align*}
Lets now proof (1)
Applying the induction hypothesis we get
\begin{align*}
I^{-n}(x)&=\int_a^x \cdots \int_a^{x_{n-2}} \int_a^{x_{n-1}} f(x_n)\,dx_n\,dx_{n-1}\cdots\,dx_1\\
&=\int_a^x I^{-(n-1)}(x_1)\,dx_1\\
&=\frac{1}{(n-2)!}\int_a^x \int_a^{x_1}(x_1-x_n)^{n-2}f(x_n)\,dx_n\,dx_1\\
&=\frac{1}{(n-2)!}\int_a^x \int_{x_n}^x(x_1-x_n)^{n-2}f(x_n)\,dx_1\,dx_n\\
&=\frac{1}{(n-2)!}\int_a^x f(x_n) \int_0^{x-x_n} w^{n-2}\,dw\,dx_n\\
&=\frac{1}{(n-1)!}\int_a^x (x-x_n)^{n-1}f(x_n) \,dx_n\\
\end{align*}
Here is a picture of the region of integration:


