Prove this limit in the weak topology of $L^2([0,T])$ Consider a finite interval $[0,T]$ and an uniform partition $\pi:=(t_0,t_1,...,t_n)$ where $t_i=iT/n$ for any $i$ and $\|\pi\|$ is the lenght of each subinterval, namely $\|\pi\|=T/N$.
In this book it's stated that the functions $\sum_{i=0}^{n-1} \frac{t_{i+1}-t}{\|\pi\|}\mathbf{1}_{(t_i,t_{i+1}]}(t)$ converge to $1/2$ in the weak topology of $L^2([0,T])$ as $\|\pi\|\to 0$.
My attempt:
Let $f\in L^2([0,T])$ then consider the following integral
$$\int_0^T \sum_{i=0}^{n-1} \frac{t_{i+1}-t}{\|\pi\|}\mathbf{1}_{(t_i,t_{i+1}]}(t) f(t)dt=\sum_{i=0}^{n-1} \frac{1}{\|\pi\|}\int_{t_i}^{t_{i+1}}(t_{i+1}-t)f(t)dt,$$
then I can integrate by parts to obtain (letting $F(t):=\int_0^t f(s)ds$)
$$=\sum_{i=0}^{n-1} \frac{1}{\|\pi\|}\left[F(t)(t_{i+1}-t)\bigg\rvert_{t_i}^{t_{i+1}}+\int_{t_i}^{t_{i+1}}F(t)dt\right]=\sum_{i=0}^{n-1} \frac{1}{\|\pi\|}\left[F(t_i)\|\pi\|+\int_{t_i}^{t_{i+1}}F(t)dt\right].$$
From here I can keep going with the calculation but I don't see how to obtain the $1/2$ honestly, maybe this is not the right approach.
Would you mind giving me some hint?
PS: if in the numerator we have $(t-t_i)$ instead of $(t_{i+1}-t)$ does the convergence to $1/2$ hold true?
 A: For the sake of simplicity, assume that $T = 1$.
We can prove that the result holds even if $f \in L^1$, i.e.,
\begin{equation*}
\forall f \in L^1([0,1]), \qquad \int_0^1 \sum_{i=0}^{n-1} \frac{t_{i+1}-t}{\|\pi\|}\mathbf{1}_{(t_i,t_{i+1}]}(t) f(t)\mathrm{d}t \to \frac{1}{2} \int_0^1 f(t) \mathrm{d}t, \qquad n \to \infty\;.
\end{equation*}
To prove that, fix $f \in L^1([0,1])$ and define:
\begin{align*}
\forall n \in \mathbb{N}, \forall t \in[0,1] \qquad f_n(t)
&:=
   \sum_{i=1}^n \bigg(  \Big( n\cdot\int_{(i-1)/n}^{i/n}f(s)\mathrm{d}s \Big) \cdot \mathbf{1}_{(\frac{i-1}{n},\frac{i}{n}]}(t) \bigg) \;, \qquad
\\
g_n(t)&:=n\cdot\sum_{i=1}^n \Big(\frac{i}{n}-t\Big)\mathbf{1}_{(\frac{i-1}{n},\frac{i}{n}]}(t) \;.
\end{align*}
Using the answer to this question it can be proved that $\|f_n-f\|_1 \to0,n\to\infty$, from which it follows in particular that $\int_0^1 f_n(t) \mathrm{d}t \to \int_0^1 f(t) \mathrm{d}t, n\to \infty $ and that
\begin{equation*}
\bigg|\int_0^1 \big(f(t)-f_n(t)\big)g_n(t)\mathrm{d}t\bigg| \le \|f-f_n\|_1\|g_n\|_\infty \le \|f-f_n\|_1 \to 0\;, \qquad n\to\infty
\end{equation*}
Then:
\begin{align*}
   \int_0^1 \sum_{i=0}^{n-1} \frac{t_{i+1}-t}{\|\pi\|}\mathbf{1}_{(t_i,t_{i+1}]}(t) f(t)\mathrm{d}t
&=
\sum_{i=0}^{n-1} \frac{1}{\|\pi\|}\int_{t_i}^{t_{i+1}}(t_{i+1}-t)f(t)\mathrm{d}t
\\
&=
   \int_0^1 f(t)g_n(t)\mathrm{d}t
\\
&=
   \int_0^1 f_n(t)g_n(t)\mathrm{d}t + \int_0^1 \big(f(t)-f_n(t)\big)g_n(t)\mathrm{d}t
\\
&=
   \frac{1}{2} \int_0^1 f(t) \mathrm{d}t + \int_0^1 \big(f(t)-f_n(t)\big)g_n(t)\mathrm{d}t
\\
&\to
   \frac{1}{2} \int_0^1 f(t) \mathrm{d}t + 0 = \frac{1}{2} \int_0^1 f(t) \mathrm{d}t\;, \qquad  n \to \infty. 
\end{align*}
