Let $(x_n)_{n\in\Bbb N}\subseteq\mathcal L_2([a,b])$ be an orthonormal sequence. I want to prove the following:
$(x_n)_{n\in\Bbb N}$ is complete $\Leftrightarrow\sum_{n=1}^\infty \big|\int_{[a,t]}x_nd\lambda\big|^2=t-a\;\;\forall t\in[a,b]$
where $(x_n)_{n\in\Bbb N}$ being complete means that $\forall x\in\mathcal L_2([a,b])$ if $x\perp x_n\;\forall n\in\Bbb N\Rightarrow\ x=0$
So my attempt goes like this:
($\Rightarrow$)Let $(x_n)_{n\in\Bbb N}$ be complete so $(x_n)_{n\in\Bbb N}$ is a Hilbert base for $\mathcal L_2([a,b])$ and thus the Parseval's identity follows so
$$
\forall x\in\mathcal L_2([a,b])\;\sum_{n=1}^\infty \big|\langle x,x_n \rangle\big|^2=\|x\|^2
$$
in particular we get that $\forall t\in[a,b]$
$$
\sum_{n=1}^\infty \big|\langle \chi_{[a,t]},x_n \rangle\big|^2=\|\chi_{[a,t]}\|^2=\langle \chi_{[a,t]},\chi_{[a,t]} \rangle=\int_{[a,b]}\chi_{[a,t]}d\lambda = \int_{[a,t]}d\lambda=t-a
$$
and
$$
\langle \chi_{[a,t]},x_n \rangle=\int_{[a,b]}\chi_{[a,t]}x_nd\lambda=\int_{[a,t]}x_nd\lambda
$$
thereby
$$
\sum_{n=1}^\infty \Big|\int_{[a,t]}x_nd\lambda\Big|^2=t-a\;\;\forall t\in[a,b]
$$
($\Leftarrow$)Lets assume that $\sum_{n=1}^\infty \Big|\int_{[a,t]}x_nd\lambda\Big|^2=t-a\;\forall t\in[a,b]$ and let $x\in\mathcal L_2([a,b])$ with $x\perp x_n\;\forall n\in\Bbb N$. Lets assume $x\neq 0$ so $(x_n)_{n\in\Bbb N}\cup \{x\}$ is orthonormal, thus
$$
\Big|\int_{[a,t]}xd\lambda\Big|^2+\sum_{n=1}^\infty\Big|\int_{[a,t]}x_nd\lambda\Big|^2=t-a\;\; \forall\ t\in[a,b]\\
\Rightarrow\sum_{n=1}^\infty\Big|\int_{[a,t]}x_nd\lambda\Big|^2=t-a-\Big|\int_{[a,t]}xd\lambda\Big|^2<t-a\;\; \forall\ t\in[a,b]
$$
which contradicts the hypothesis, so $x=0$ and thus $(x_n)_{n\in\Bbb N}$ is complete.
What do you think? Would appreciate your comments and help if I missed something or did something wrong.