The Parseval Identity states that:
$\sum_{n=-\infty}^{\infty}|c_{n}|^2= \frac{1}{2 \pi} \int_{-\pi}^{\pi} |f(x)|^2 dx$
Where $\{c_{n} \}$ are the Fourier coefficients of f.
Is there a general identity for any complete system in $L^{2}(a,b)$?
Supose we have the complete system in $L^{2}(0,1)$, say $\{ \sin(\pi kx ) \}$ for $k\geq1$, I have done an exercise and determined the Parseval Identity should be (In order for the exercise to be correct):
$\sum_{n=0 }^{\infty}|c_{n}|^2= \frac{1}{2 } \int_{0}^{1} |f(x)|^2 dx$
If the system of functions $\{ \varphi_n \}$ is a complete orthogonal system so that $$ \int_{0}^{1}\varphi_{n}(x)\varphi_{m}(x)dx = 0,\;\;\; n\ne m, $$ then you can assume $f = \sum_{m}c_m \varphi_m$ and determine the coefficient $c_n$ by multiplying both sides by $\varphi_n$, integrating over $[0,1]$, ignoring the cross terms on the right, and solving for $c_n$: $$ \int_{0}^{1}f(x)\varphi_{n}(x)dx = c_{n}\int_{0}^{1}\varphi_{n}(x)^{2}dx \\ c_n = \frac{\int_{0}^{1}f(x)\varphi_{n}(x)dx} {\int_{0}^{1}\varphi_{n}(x)^{2}dx} $$ Then, multiplying $f=\sum_{n}c_n\varphi_n$ by $f$ and integrating over $[0,1]$ gives \begin{align} \int_{0}^{1}f(x)^{2}dx & = \sum_{n}c_{n}\int_{0}^{1}f(x)\varphi_{n}(x)dx \\ & = \sum_{n}\frac{\left(\int_{0}^{1}f(x)\varphi_n(x)dx\right)^{2}} {\int_{0}^{1}\varphi_n(x)^{2}dx} \end{align} For the case of $\{ \sin(n\pi x)\}_{n=1}^{\infty}$, which is a complete orthogonal set for $L^{2}[0,1]$, $$ \int_{0}^{1}f(x)^{2}dx = \sum_{n=1}^{\infty} \frac{\left(\int_{0}^{1}f(x)\sin(n\pi x)dx\right)^{2}} {\int_{0}^{1}\sin^{2}(n\pi x)dx}. $$ And, $$ \int_{0}^{1}\sin^{2}(n\pi x)dx = \frac{1}{2}\int_{0}^{1}\sin^{2}(n\pi x)+\cos^{2}(n\pi x)dx = \frac{1}{2}. $$ So, I think your factor is wrong. It should be $2$ instead of $1/2$. That is, $$ \int_{0}^{1}f(x)^{2}dx = 2\sum_{n=1}^{\infty}\left(\int_{0}^{1}f(x)\sin(n\pi x)dx\right)^{2}. $$