# Trying to compute the quadratic covariation

Hi everyone this is my first question here. I have the following question on my exercise sheet: let $B$ be a brownian motion, $\phi$ a progressively measurable function such that $E \int_0^T \phi_t dt \lt\infty$, $\forall T>0$. Set $X_t:= \int_0^t \phi_s dB_s$. Compute $\left<X,B\right>_t$, i.e. the quadratic covariation of $X_t$ and $B_t$. (the space is endowed with a filtration $\left(F_t\right)_{t\geq 0}$ and the brownian motion is adapted w.r.t. to it)

$\boldsymbol{First}$ $\boldsymbol{attempt}$: let $\Pi_n$:=$\{0=t_0<\ldots<t_n= t \}$ be a partition of $[0,t]$. $$\left<X,B\right>_t:= \lim_{|\Pi_n|\to0}\sum_{i=0}^{n-1}[X_{t_{i+1}}-X_{t_{i}}][B_{t_{i+1}}-B_{t_{i}}]=\\ \lim_{|\Pi_n|\to0}\sum_{i=0}^{n-1}X_{t_{i+1}}[B_{t_{i+1}}-B_{t_{i}}]-X_{t_{i}}[B_{t_{i+1}}-B_{t_{i}}].$$ The second term should converge to $\int_0^t X_s dB_s$ in $L^2$, but i don't know what to do with the first term since it cannot converge to the Ito integral of $X$ w.r.t. the brownian motion.

$\boldsymbol{Second}$ $\boldsymbol{attempt}$: I know that $$\left<X,B\right>_t= \frac{1}{4} (\left<X+B\right>_t-\left<X-B\right>_t).$$ Now, since $\left<X+B\right>_t$ is the unique process s.t. $\left(X_t+B_t\right)^2-\left<X+B\right>_t$ is a martingale, if i compute $E[X_t^2+B_t^2+2X_tB_t|F_s]$, $s<t$ i will be done.

I know that $E[B_t^2|F_s]=B_s^2+t-s$.

My strategy for $2E[X_tB_t|F_s]$ is to consider the simple process $\phi^{Q}_t=\sum_{k=0}^{m-1}\phi_{t_{k}}\mathbb{1}_{[t_{k},t_{k+1}]}(t)$, where Q is a partition of $[0,t]$ and to compute $2E[\sum_{k=0}^{n-1}\phi^Q_{t_k}\left(B_{t_{k+1}}-B{t_k}\right)B_t|F_s]$ but i cannot proceed further.

Since this is homework i ask only for a hint

Let $\psi$ be a progressively measurable function such that $\mathbb{E}\int_0^T \psi(t)^2 \, dt < \infty$ for all $T>0$. Then the quadratic variation of $$Y_t := \int_0^t \psi_s \, dB_s \tag{1}$$ equals $$\langle Y \rangle_t = \int_0^t \psi^2(s) \, ds.$$
Hint: Write $$X_t + B_t \qquad \text{and} \qquad X_t -B_t$$ as a stochastic integral of the form $(1)$ and apply the above statement to calculate $\langle X+B \rangle$ and $\langle X-B \rangle$, respectively.