Quadratic variation of ito integral Is it true in general that if $f$ is a deterministic function, and $W$ is brownian motion, then the quadratic variation of $\int_0^t f(W_s) dW_s$ is $\int_0^t f^2(W_s) ds$? 
Is it also true in general that the quadratic variation of $\int_0^t f(s)dW_s$ is $\int_0^t f^2(s)ds$?
Also, is the quadratic variation of $\int_0^t f(W_s) ds =0$?
I have been using these formulas in my work as they seem to be generally true, but I haven't been able to prove them (I struggle to work with quadratic variation from the definition) and I would love to see a proof. 
My definition of quadratic variation of a continuous local martingale $M$ is the unique, continuous, increasing and adapted process $\langle M\rangle$ with $\langle M\rangle _0 
=0 $ such that $M^2 - \langle M \rangle$ is a continuous local martingale. 
Thanks very much!
 A: Let $X,Y$ be semimartingales and $\xi$ be an $X$-integrable process. Then,
$$\left[\int\xi\,dX,Y\right] = \int\xi\,d[X,Y]$$
and 
$$\left[\int\xi\,dX\right]=\int\xi^2\,d[X]$$
where $[\cdot, \cdot ]$ denotes the quadratic covariation of two processes and $[\cdot ]$ denotes the quadratic covariation of a process with itself.
The proof of such statements is much easier if you use the following definition of $[\cdot]$:
Given a stochastic partition ${\mathcal P} = \left\{0=\tau_0\le\tau_1\le\tau_2\le\cdots\uparrow\infty\right\}$, we define
$$[X]^{{\mathcal P}}(t) \equiv \sum_{n=1}^\infty\left(X(\tau_n\wedge t)-X(\tau_{n-1}\wedge t)\right)^2$$
Taking a sequence of such partitions such that the mesh of the partitions is going to 0 in probability as $n$ increases, we define $[X]$ as the following limit
$$ [X]^{{\mathcal P}_n} \xrightarrow{ucp}[X]$$
The "ucp" convergence is the uniform convergence on compacts in probability.
A: Assume that $E \int_0^t f^2(W_u)du < \infty.$ Define
\begin{align}
I_t &:= \int_0^t f(W_u)dW_u, 0\leq t \leq T;\\
X_t &:= \int_0^t f^2(W_u)du, 0\leq t \leq T.
\end{align}
Then
\begin{align}
E[I_t^2-X_t | \mathscr F_s] &= E\left[\left( \int_0^t f(W_u)dW_u \right)^2-\left. \int_0^t f^2(W_u)du \right| \mathscr F_s \right] \\
&= E\left[I_s^2 + \left( \int_s^t f(W_u)dW_u \right)^2 +2I_s \int_s^t f(W_u)dW_u -X_s - \left. \int_s^tf^2(W_u)du \right | \mathscr F_s \right]\\
&= I_s^2 + E\left[ \left(\int_s^t f(W_u)dW_u \right)^2 \right]+2I_s \underbrace{E\left[ \int_s^t f(W_u)dW_u \right]}_{=0} -X_s \\
&- E\left[ \int_s^t f^2(W_u)du \right] \\
&=I_s^2 - X_s,
\end{align}
where in the last step I have used the Ito isometry. Thus the process $I^2 -X$ is a martingale and therefore a local martingale and by definition of quadratic vatiation (your definition in the question), X is the quadratic variation process of I.
The other question, the process $\int_0^t f(W_u)du, 0 \leq t \leq T$ is of finite variation so its quadratic variation is zero.
