Boundary change in double integral: $\int_t^T \left( \int_t^u r(s)ds \right)du = \frac{1}{T}\int_t^T (T-s)r(s)ds$ I have following problem. I have been reading an article on pricing Asian options and I have found one article directly concerning my topic. However, it is horribly written and I am trying to deconstruct it.
Source: http://www.math.zju.edu.cn/amjcu/B/200602/02.pdf
(calculation leading to (3.10)
I have trouble understanding, why the authors could write following:
$\int_t^T \left( \int_t^u r(s)ds \right)du =  \frac{1}{T}\int_t^T (T-s)r(s)ds$
Obviously, the equation is ture for any non time dependent $r$, but can it be generalised for any function $r(s)$?  
Could you please show me or delegate me to relevant theorem that can help me explain this? 
Thank you very much for your help!
J.

One may see an integration by parts here,
$$
\begin{align}
\int_t^T \left( \int_t^u r(s)ds \right)du &=\left[ \frac{(u-T)}{T}\left(\int_t^u r(s)ds\right)\right]_t^T-\frac1T\int_t^T(u-T)r(u)\:dt
\\\\&=\color{red}{0}+\frac1T\int_t^T(T-u)r(u)\:dt
\end{align}
$$ as announced.
