Fourier Series of Brownian Motion $(B_t)_{t \in [0,1]}$ wrong? In our lecture about Brownian motion, we calculated the fourier series of Brownian motion $(B_t)_{t \in [0,1]}$. We did the following:
We first defined the Brownian bridge $(\beta_t)_{t \in [0,1]}$ as $\beta:= B_t - t B_1$. And let us work with realisations of this stochastic process, thus I will denote by $(\beta_t)_{t \in [0,1]}$ an arbitrary realisation, i.e. $\beta$ is now a continuous function on $[0,1]$ with $\beta_0 =\beta_1 =0$. Then the claim was that if we define 
$$
S_m(\cdot):= \sum_{n=1}^m b_n \sin(\pi n \cdot)
$$
where
$$
b_n:= \int_{[0,1]}\beta_t \sin(\pi n t)dt
$$
then for every realisation of a Brownian bridge, $S_m$ does converge in $L^2([0,1])$ to $\beta$, i.e.
$$
\lim_{m \rightarrow \infty} \int_{[0,1]} (\beta_t - S_m(t))^2 dt
$$
Now the problem is, that I am not very familiar with Fourier series and their convergence properties. But I know that the functions $(\phi_n)_{n \in \mathbb{N}}:=(\sqrt(2)sin(\pi n \cdot))_{n \in \mathbb{N}}$ are an orthonormal basis of the separable Hilbert space $L^2([0,1])$. Therefore it is possible to write
$$
\beta = \sum_{n=1}^\infty \langle \beta,\phi \rangle \phi
$$
which is a limit in the sense
$$
\lim_{m \rightarrow \infty} \int_{[0,1]} (\beta_t- \sum_{n=1}^m c_n sin(\pi n t))^2 dt
$$
where now $c_n:= \sqrt{2} \langle \beta, \phi \rangle = \sqrt{2} \int_{[0,1]} \beta_t \sqrt{2}sin(\pi n t)dt = 2 \int_{[0,1]} \beta_t sin(\pi n t)dt = 2b_n $
So on the one hand we claimed in the lecture that 
$$
\beta_t = \sum_{n=1}^\infty b_n \sin(\pi n \cdot)
$$
But now also clearly
$$
\beta_t = \sum_{n=1}^\infty 2b_n \sin(\pi n \cdot)
$$
where both sums have to be understood as an $L^2$ limit. Is my reasoning wrong? Or did we do something wrong in the lecture?
Thanks a lot in advance!
 A: Your question is not really about the Brownian bridge, but rather it is about the Fourier decomposition in the Hilbert space $L^2[0,1]$. For this reason, I will focus on a specific realization of the Brownian bridge, namely $\beta_t=\sin(\pi t)$, which although it is way too smooth to be a sample path of the Brownian bridge, it nevertheless does lie in the support of the law of the Brownian bridge.
It is clear that in this simplistic case, we must have $b_1=1$ and $b_n=0$ for all $n\geq 2$, if we want the property
$$
\beta_t=\lim_{n\to\infty}S_n(t)
$$
to hold (and then $\beta_t=S_n(t)=S_1(t)$ in fact, since we picked such a simple function for $\beta_t$).
But then, if we perform the integral
$$
\langle \beta_t,\phi_1(t)\rangle = \sqrt{2}\int_0^1 \sin^2(\pi t)\ dt=\frac{\sqrt{2}}{2},
$$
we see that the correct orthogonal decomposition of $\beta_t$ in the Hilbert space is actually
$$
\beta_t=\frac{\sqrt{2}}{2}\phi_1(t)=\frac{\sqrt{2}}{2}\cdot \bigl(\sqrt{2}\sin(\pi t)\bigr)=\sin(\pi t),
$$
i.e. we indeed have $b_1=1$ (and obviously $b_n=0$ for $n\geq 2$ by orthogonality). In summary, the two approaches agree and give the same answer.
The inconsistency, when compared with what you have written down in your answer, is that
$$
b_n=\frac{1}{2}\int_{0}^1\beta_t \sin(\pi n t)\ dt
$$
rather than what you wrote, which was missing the factor of $\tfrac 12$. Since $\sin(\pi n t)$ is not normalized in the Hilbert space (it has norm $\sqrt{2}$) we need to divide by the square of its norm to get the appropriate formula. In general, if $g\in L^2[0,1]$ is a multiple of a basis element, then we would need to define
$$
b_n=\frac{\langle \beta_t,g\rangle}{\|g\|^2},
$$
and as a quick sanity check, notice that when you substitute in $g$ for $\beta_t$ you get $1$, which makes sense since the coefficient must be $1$ when $\beta_t=g$.
