Using Parseval's Identity to estimate the integral of a function. We can expand the cosine function in the interval $[0,\pi]$ in a sine series, obtaining an odd, $2\pi$-periodic extension of $cos (x)$. Let $f$ be that function, and define $g(x) = \int_{0}^{x}f(t) {\rm d}t $. Using a basic Fourier Series theorem we get that the series of $f$ can be integrated term by term, thus we have a series expansion of $g$. I was asked to use Parseval's Identity to estimate the error in that series of $g$, as in, if $s_n(x)$ is the partial sum of the series of $g$, I want to estimate $|g(x) - s_n(x)|$. I'm really not sure how to use the identity to do that...
Sorry if my question is a bit confusing, I'm a bit unclear on the English vocabulary of this subject.
 A: The Fourier sine series of the wanted odd extension of the cosine function is:
$$ f(x)=\frac{4}{\pi}\sum_{n\geq 1}\frac{2n}{4n^2-1}\,\sin(2nx) \tag{1}$$
but Parseval's identity just gives an identity for the $L^\color{red}{2}$ norm, while 
$$ \sup_{x\in(0,\pi)}\left|f(x)-S_N(x)\right|=\sup_{x\in (0,\pi)}\left|\,f(x)-\frac{4}{\pi}\sum_{n=1}^{N}\frac{2n}{4n^2-1}\,\sin(2n x)\right| \tag{2}$$
is an $L^{\color{red}{\infty}}$ norm. Luckily, they are not completely unrelated. Parseval's identity gives:
$$\begin{eqnarray*} \int_{0}^{\pi}\left| f(x)-S_N(x)\right|^2\,dx &=& \frac{8}{\pi}\sum_{n>N}\left(\frac{2n}{4n^2-1}\right)^2\\&\leq&\frac{8}{\pi}\sum_{n>N}\left(\frac{1}{4n-3}-\frac{1}{4n+1}\right)=\frac{8}{\pi(4N+1)}, \tag{3}\end{eqnarray*} $$
hence $\left|f(x)-S_N(x)\right|$ is expected to behave like $\frac{1}{\sqrt{N}}$ for any $x$ sufficiently far from $\pi\mathbb{Z}$ (at a distance $\geq\frac{1}{N}$). 
If $x$ is close to $\pi\mathbb{Z}$, Gibbs' phenomenon is expected to occur (see also this question of mine) and
$$ \lim_{N\to \infty} \sup_{x\in(0,\pi)}\left|\,f(x)-S_N(x)\right| = C\tag{4} $$
for some positive constant $C$ that is not terribly difficult to compute (it is just $1$). Now we may perform the same steps for:
$$ g(x)=\int_{0}^{x}f(t)\,dt = \frac{4}{\pi}\sum_{n\geq 1}\frac{1-\cos(2nx)}{4n^2-1}=\frac{2}{\pi}-\frac{4}{\pi}\sum_{n\geq 1}\frac{\cos(2n x)}{4n^2-1}.\tag{5}$$
For the $L^2$ norm Parseval's identity gives:
$$ \int_{0}^{\pi}\left|\,g(x)-S_N(x)\right|^2\,dx =\frac{8}{\pi}\sum_{n>N}\frac{1}{(4n^2-1)^2}\leq\frac{1}{6\pi N^3}\tag{6} $$
while the crude bound $\left|\cos(2n x)\right|\leq 1$ yet gives:
$$ \sup_{x\in\mathbb{R}}\left|\,g(x)-S_n(x)\right|\leq\frac{4}{\pi}\sum_{n>N}\frac{1}{4n^2-1}=\frac{2}{\pi(2N+1)}.\tag{7}$$
Anyway, the previous analysis shows that, sufficiently far from $\pi\mathbb{Z}$, i.e. at a distance $\geq\frac{1}{N}$, the term $\left|g(x)-S_N(x)\right|$ behaves like $\frac{1}{N\sqrt{N}}$, that is less than the RHS of $(7)$. Anyway, both $(7)$ and the improved bound prove the uniform convergence of $S_N(x)$ towards $g(x)$, according to Weierstrass M-test.
