# Computing quadratic variation of $\int_0^t f_n(s) \, dB_s$ for a piecewise constant function $f_n$

Given that $f_n(s,w)$ is bounded, piecewise constant, and $B$ is a brownian motion. I am trying to compute the quadratic variation of $$F_n(t,w)\equiv\int_0 ^t f_n(s,w)dB(s,w)\equiv\sum_{i=1}^m f_n(t_i,w)(B(t_{i+1},w)-B(t_i,w)),$$ where $t_{m+1}=t,t_1=0$ and $f_n$ constant on $[t_i,t_{i+1})$. The quadratic variation (in $L^2$) should be $\int _0 ^t f_n^2(s,w)ds$.

Let $P$ be a partition of $[0,t]$. Then the quadratic variation is $$[F_n(t,w)]_t=\lim_{\Vert P \Vert \to 0}\sum_{k=1}^n ((F_n(t_k,w)-F_n({t_{k-1}},w))\\=\lim_{\Vert P \Vert\to 0}\sum \int_{t_{k-1}}^{t_k}f_ndB(s,w)$$

Since $f$ is constant on $[t_i,t_{i+1})$, I can express this as $\lim \int_0 ^tf_ndB(s,w)$, but where does the square come form and how does $dB(s,w)$ become $ds$ in the limit?

The square comes from the very definition of the quadratic variation:

$$[F_n]_t = \lim_{|\Pi| \to 0} \sum_{k=1}^N (F_n(t_k)-F_n(t_{k-1}))^{\color{red}{2}}.$$

Note that the limit is an $L^2$-limit. Since you already have a candidate for the limit, the easiest thing is to check that

$$I:=\left\| \sum_{k=1}^N (F_n(t_k)-F_n(t_{k-1}))^2 - \int_0^t f_n(s)^2 \, ds \right\|_{L^2(\mathbb{P})}$$

converges to $0$ as the mesh size of the partition $\Pi = 0=t_0< \ldots < t_N = t$ tends to $0$. Since $f_n$ is piecewise constant, we have

\begin{align*} I &= \left\| \sum_{k=1}^N (F_n(t_k)-F_n(t_{k-1}))^2 - \sum_{k=1}^N \int_{t_{k-1}}^{t_k} f_n(t_{k-1})^2 \, ds \right\| \\ &= \left\| \sum_{k=1}^N f_n(t_{k-1})^2 (B_{t_k}-B_{t_{k-1}})^4 - \sum_{k=1}^N f_n(t_{k-1})^2 (t_k-t_{k-1}) \right\| \\ &= \left\| \sum_{k=1}^N f_n(t_{k-1})^2 \big[ (B_{t_k}-B_{t_{k-1}})^2-(t_k-t_{k-1}) \big] \right\|\end{align*}

Now use the boundedness of $f_n$ and the fact that $B_{t_k}-B_{t_{k-1}} \stackrel{d}{=} \sqrt{t_k-t_{k-1}} B_1$ to conclude that the right-hand side converges to $0$.