Let $\{u_n\}$ be an orthonormal system in $L^2([0,1])$, prove that $\{u_n\}$ is complete iff
$ \sum_{n=1}^\infty \intop_0^1 \left|\intop_0^x u_n(t)\;dt\right|^2 dx = 1/2.$
It should be noted that in the previous clause I proved that $\{u_n\}$ is complete iff
$\forall x\in [0,1]:x=\sum_{n=1}^\infty \left| \intop_0^x u_n(t)\;dt\right|^2$
and the two are probably related.
Proving that completeness if $\{u_n\}$ implies the equation is a simple consequence of this. I'm stuck on the second direction though, any hints would be appreciated.