Quadratic variation of the Ornstein-Uhlenbeck process Let $(X_t)_{t\geq 0}$ be the zero-mean Ornstein-Uhlenbeck process such that $X_0 = 0$ almost surely, i.e.
$$X_t = \sigma e^{-\alpha t}\int_0^t e^{\alpha s}\,dB_s \quad \qquad (\triangle)$$ 
On the other hand, $(X_t)$ is the unique process that satisfies the SDE
$$dX_t = \alpha X_t\,dt + \sigma\,dB_t \quad X_0 = 0 \qquad (\square)$$
Since the SDE $(\square)$ satisfies the growth and the Lipschitz conditions, we know that the strong solution to this SDE, $(X_t)$, exists, is unique and continuous.
From the latter $[X,X]_t = [\int \alpha X_s\,ds + \int \sigma\,dB_s,\int \alpha X_s\,ds + \int \sigma\,dB_s]_t = [\int \sigma\,dB_s, \int \sigma\,dB_s]_t = \sigma^2 t$
Here I really needed continuity to make sure that the contribution of $\int \alpha X_s\,ds$ to the quadratic variation is $0$ since then this integral is of bounded variation and is continuous. 
Anyway, my question is how would one compute $[X,X]_t$ by just using $(\triangle)$?
I know that for semimartingales $M,N$
$$[G\cdot M,H\cdot N]_t = \int_{(0,t]}G_sH_s\,d[M,N]_t$$
I applied this result to my case as follows
\begin{align}[X,X]_t =& [\sigma e^{-\alpha t}\int_0^t e^{\alpha s}\,dB_s,\sigma e^{-\alpha t}\int_0^t e^{\alpha s}\,dB_s]\\ =& \sigma^2  [\int_0^t e^{-\alpha (t-s)}\,dB_s, \int_0^t e^{-\alpha (t-s)}\,dB_s]\\=& \sigma^2 \int_0^t e^{-2\alpha (t-s)}ds \neq \sigma^2 \end{align}
Clearly, I am doing something wrong in the last step. I feel like the $e^{-\alpha t}$ term in $X_t$ should be handled in a different way but I couldn't wrap my head around this.
 A: You cannot apply the formula
$$[G \bullet M]_t = \int_0^t G_s^2 \, d[M]_s \tag{1}$$
because the Ornstein-Uhlenbeck process $X$ is not of the form
$$X_t = (G \bullet B)_t,$$
but of the form $$X_t = (G_t \bullet B)_t$$ and -as your calculation show- we cannot expect that $(1)$ extends to this larger class of processes. The reason is, roughly, that $dt$-terms need a different compensation than $dB_t$-terms - and if you shift the multiplicative $dt$-term under the stochastic integral, then you pretend that it behaves, in some sense, like a $dB_t$-term ... but it doesn't.
The proper way is the following:


*

*Define $$Y_t := \int_0^t e^{\alpha s} \, dB_s.$$ Calculate $[Y]_t$ (that you can do using $(1)$.)

*Apply Itô's formula to find the stochastic differential $$d(X_t^2) = \sigma^2 d(e^{-2\alpha t} Y_t^2).$$

*The $dt$-term of the stochastic differential $d(X_t^2)$, obtained in step 2, equals the quadratic variation $[X]_t$.

A: In Formula
$$[G\cdot M,H\cdot N]_t = \int_{(0,t]}G_sH_s\,d[M,N]_t,\tag{1}$$
$G$ and $H$ are functions of $s$ only. However, in your case, $G=H=\sigma e^{-\alpha(t-s)}$, which are not functions of $s$ only, and then Formula$(1)$ is not applicable. 
A: You can use it but first you need to use integration by parts to the product of $$X_t = \sigma e^{-\alpha t}\int_0^t e^{\alpha s}\,dB_s \quad \qquad (\triangle)$$
Doing this you will get
$$\sigma e^{-\alpha t}\int_0^t e^{\alpha s}\,dB_s = \sigma ( B_t - B_0 + -a \int_0^t \int_0^s e^{au} dB_u e^{-as} ds) $$
Since the second integral is continuous in t you get that the quadratic variation of $(\triangle)$ is $\sigma [B,B]_t = \sigma t$. 
