Convergence to integral: $\sum_{k=1}^{k_n}f\left(B_{t_{k-1}^{(n)}}\right)\left(B_{t_{k-1}^{(n)}}-B_{t_{k}^{(n)}}\right)^2 \to_p \int_0^Tf(B_t)dt$ The problem goes: 

Let $(B_t)$ be a standard Brownian motion, and
  $f:\mathbb{R}\to\mathbb{R}$ be continuous. Show that if $T>0$ and
  $(P_n)$ is a sequence of partitions of $[0,T]$:
  $$P_n=\{0=t_0^{(n)}<\cdots<t_{k_n}^{(n)}=T\}$$ such that
  $\max_{k=1,\ldots,k_n}\left(t_k^{(n)}-t_{k-1}^{(n)}\right)\to 0$, then
  $$\sum_{k=1}^{k_n}f\left(B_{t_{k-1}^{(n)}}\right)\left(B_{t_{k-1}^{(n)}}-B_{t_{k}^{(n)}}\right)^2\to_p \int_0^Tf(B_t)dt. $$

I denote the l.h.s. $ S^{(n)}:=\sum_{k=1}^{k_n}f\left(B_{t_{k-1}^{(n)}}\right)\left(B_{t_{k-1}^{(n)}}-B_{t_{k}^{(n)}}\right)^2 $ and the r.h.s. limit $S:=\int_0^Tf(B_t)dt=\lim_{n}\sum_{k=1}^{k_n}f\left(B_{t_{k-1}^{(n)}}\right)\left(t_{k}^{(n)}-t_{k-1}^{(n)}\right). $  Then $$E[S^{(n)}]=\sum_{k=1}^{k_n}f\left(B_{t_{k-1}^{(n)}}\right)\left(t_{k}^{(n)}-t_{k-1}^{(n)}\right) .$$
I first observe that since $f$ is continuous, it is bounded, say by $M$, on $[0,T]$. By the Markov inequality $$P(|S^{(n)}-S|>\epsilon)\le \frac{E|S^{(n)}-S|}{\epsilon}.$$ But $$|S^{(n)}-S|\le |S^{(n)}-E[S^{(n)}]|+|E[S^{(n)}]-S|$$ where the second term goes to zero surely (and by BCT I can show its expectation converges to zero). Hence I only need to show that $E|S^{(n)}-E[S^{(n)}]|\to 0.$
I have tried to expand the terms so $$|S^{(n)}-E[S^{(n)}]|=\left| \sum_{k=1}^{k_n}f\left(B_{t_{k-1}^{(n)}}\right)\left[\left(B_{t_{k-1}^{(n)}}-B_{t_{k}^{(n)}}\right)^2 - \left(t_k^{(n)}-t_{k-1}^{(n)}\right)\right]\right| $$ and if somehow I can pull out $M$ from the summation, I would be able to invoke the quadratic variation of Brownian motion so that this term goes to zero in probability. However, I am not positive that pulling out $M$ works here, and even if it does, I am not quite sure how to continue afterward. Any suggestions are welcome. Thanks!
 A: First we consider the case that $f$ is bounded, i.e.
$$\sup_{x \in \mathbb{R}} |f(x)| = \|f\|_{\infty}<\infty.$$
By definition, we have
$$S^{(n)}-S = \sum_{k=1}^{k_n} f(B_{t_{k-1}^{(n)}}) \cdot \bigg[ \left( B_{t_k^{(n)}}-B_{t_{k-1}^{(n)}} \right)^2 - (t_k^{(n)}-t_{k-1}^{(n)}) \bigg].$$
Squaring this expression yields
$$(S^{(n)}-S)^2 = \sum_{k=1}^{k_n} f(B_{t_{k-1}^{(n)}})^2 \cdot \bigg[ \left( B_{t_k^{(n)}}-B_{t_{k-1}^{(n)}} \right)^2 - (t_k^{(n)}-t_{k-1}^{(n)}) \bigg]^2. \tag{1}$$
Here we used that the mixed terms vanish; indeed, if we set $f_k := f(B_{t_{k}^{(n)}})$, $\Delta B_k := B(t_{k}^{(n)})-B(t_{k-1}^{(n)})$, $\Delta t_k := t_k^{(n)}-t_{k-1}^{(n)}$, we see from the tower property that
$$\begin{align*} \mathbb{E}(f_{j-1} (\Delta B_j^2-\Delta t_j) f_{k-1} (\Delta B_k^2-\Delta t_k)) &= \mathbb{E}\bigg[\mathbb{E}\bigg(f_{j-1} (\Delta B_j^2-\Delta t_j) f_{k-1} (\Delta B_k^2-\Delta t_k) \mid \mathcal{F}_{t_{k-1}^{(n)}}\bigg) \bigg] \\ &= \mathbb{E}\bigg[f_{j-1} (\Delta B_j^2-\Delta t_j) f_{k-1} \mathbb{E}\bigg(\Delta B_k^2-\Delta t_k \mid \mathcal{F}_{t_{k-1}^{(n)}}\bigg) \bigg] \\ &= 0 \end{align*}$$
for any $j<k$ (for the last equality recall that $(B_t^2-t,\mathcal{F}_t)_{t \geq 0}$ is a martingale). Now it follows from $(1)$ that
$$\mathbb{E}((S^{(n)}-S)^2) \leq \|f\|_{\infty}^2 \cdot \mathbb{E} \left(\sum_{k=1}^{k_n} \bigg[ \left( B_{t_k^{(n)}}-B_{t_{k-1}^{(n)}} \right)^2 - (t_k^{(n)}-t_{k-1}^{(n)}) \bigg]^2 \right).$$
The latter expression converges to $0$ as $n \to \infty$ since the quadratic variation $\text{var}_2(B,T)$ equals $T$.
This means that $S^{(n)} \to S$ in $L^2$; hence, in probability. In the case that $f$ is not bounded, we use a (standard) stopping argument.

Remark concerning your question: Please note that $\mathbb{E}(S^{(n)})$ does not equal
$$\sum_{k=1}^n f(B_{t_{k-1}^{(n)}}) (t_k^{(n)}-t_{k-1}^{(n)})$$
since $f(B_{t_{k-1}^{(n)}})$ is a random variable!
