upper bound for Fourier series I have a question concerning the upper bound of the sum of the Fourier series and how to prove the following.
I have the sum as follows:
$$\int^\pi_{-\pi} |\frac{1}{n} \sum_{k = m-n}^{m-1} S_k|^2 \leq \int_{-\pi}^{\pi} |f|^2$$
where $ f \in L^2[-\pi, \pi]$ with $m,n \in \mathbb{N} , m>n$, and
$$S_p = \sum_{k = -p}^{p} \hat f_k e^{ikx}$$
where $\hat{f}_k$ is the $k$'th Fourier series coefficient defined as
$$\hat f_k = \frac{1}{2\pi}\int^{\pi}_{-\pi} f(y) e^{-iky} dy$$
I've also tried using the fact that $e^{ikx}$ forms a basis in $L^2$ but I haven't achieved much
edit: changed $c_k$ to $\hat f$
 A: Let
$$A_j = \sum_{p=0}^{j-1}S_p,$$
the sum of the first $j$ partial sums of the Fourier series of $f$. Observe that
$$\sum_{p=m-n}^{m-1}S_p = \sum_{p=0}^{m-1}S_p - \sum_{p=0}^{m-n-1}S_p = A_m - A_{m-n}$$
Let's find a simpler formula for $A_j$:
$$\begin{aligned}
A_j &= \sum_{p=0}^{j-1}S_p \\
&= \sum_{p=0}^{j-1} \sum_{k=-p}^{p} \hat{f}_k e^{ikx} \\
&= \sum_{k=-(j-1)}^{j-1}(j-|k|)\hat{f}_k e^{ikx}
\end{aligned}$$
The last line is obtained by reversing the order of summation and counting how many times the term $\hat{f}_k e^{ikx}$ occurs for each $k \in \{-(j-1), \ldots, -1, 0, 1, \ldots, j-1\}$. Drawing a picture helps if this isn't clear.
Now let's simplify $A_{m} - A_{m-n}$:
$$\begin{aligned}
A_{m} - A_{m-n} &= \sum_{k=-(m-1)}^{m-1}(m-|k|)\hat{f}_k e^{ikx} -
\sum_{k=-(m-n-1)}^{m-n-1}(m-n-|k|)\hat{f}_k e^{ikx} \\
&= \sum_{k=-(m-1)}^{m-1} a_k \hat{f}_k e^{ikx}
\end{aligned}$$
where
$$a_k = \begin{cases}
m-|k| & \text{if }m-n \leq |k| \leq m-1 \\
n & \text{if }|k| \leq m-n-1 \\
\end{cases}$$
Now let's look at the expression inside the absolute values in your integral. Let's call it $g(x)$:
$$\begin{aligned}
g(x) &= \frac{1}{n}\sum_{k=m-n}^{m-1}S_k \\
&= \frac{1}{n}(A_{m} - A_{m-n}) \\
&= \frac{1}{n}\sum_{k=-(m-1)}^{m-1} a_k \hat{f}_k e^{ikx} \\
&= \sum_{k=-(m-1)}^{m-1} b_k \hat{f}_k e^{ikx} \\
\end{aligned}$$
where
$$b_k = \frac{a_k}{n} = \begin{cases}
\displaystyle\frac{m-|k|}{n} & \text{if }m-n \leq |k| \leq m-1 \\
1 & \text{if }|k| \leq m-n-1 \\
\end{cases}$$
Note that $0 \leq \displaystyle \frac{m-|k|}{n} \leq 1$ when $m-n \leq |k| \leq m-1$. Therefore $|b_k| \leq 1$ for all $|k| \leq m-1$. Consequently,
$$\sum_{k=-(m-1)}^{m-1}|b_k|^2 |\hat{f}_k|^2 \leq \sum_{k=-(m-1)}^{m-1} |\hat{f}_k|^2 \leq \sum_{k=-\infty}^{\infty} |\hat{f}_k|^2$$
All that remains is to apply Parseval's theorem to both sides of the inequality:
$$\frac{1}{2\pi}\int_{-\pi}^{\pi}|g(x)|^2\ dx = \sum_{k=-(m-1)}^{m-1}|b_k|^2 |\hat{f}_k|^2 \leq \sum_{k=-\infty}^{\infty} |\hat{f}_k|^2 = \frac{1}{2\pi}\int_{-\pi}^{\pi}|f(x)|^2\ dx$$
Multiplying by $2\pi$ gives the desired result.
A: First note that
$$
\int_{-\pi}^\pi |S_k|^2\,dx=2\pi\sum_{j=-k}^{k}|\hat{f}_k|^2\le 
2\pi\sum_{j=-\infty}^{\infty}|\hat{f}_k|^2\le
\int_{-\pi}^\pi |f|^2\,dx,
$$
Then, using the fact that
$$
|a_1+\cdots+a_n|^2\le n(|a_1|^2+\cdots+|a_n|^2)
$$
we obtain
$$
\frac{1}{n^2}\int_{-\pi}^\pi \left|\sum_{k=m-n}^{m-1}S_k\,\right|^2\,dx
\le \frac{1}{n}\sum_{k=m-n}^{m-1}\int_{-\pi}^\pi |S_k|^2\,dx\le 
\int_{-\pi}^\pi |f|^2\,dx.
$$
Proof of the Fact:
$$
|a_1+\cdots+a_n|^2\le (|a_1|+\cdots+|a_n|)^2=\sum_{i,j=1}^n|a_i||a_j|\\ \le
\frac{1}{2}\sum_{i,j=1}^n(|a_i|^2+|a_j^2|)=
n(|a_1|^2+\cdots+|a_n|^2)
$$
$$
$$
