Is the condition sufficient? I am stuck on the following problem:
Let $f:\mathbb{R} \to \mathbb{R}$ be continuous and $2\pi$-periodic and $n$ be a positive integer. If for any integer $p \in [0,n-1]$,
$$\int_{0}^{2\pi} f(t) \cos(pt)\,\mathrm{d}t=\int_{0}^{2\pi} f(t) \sin(pt)\,\mathrm{d}t=0,$$
then is it true that $f$ has at least $2n$ roots on $[0,2\pi]$?  
I tried to prove the problem using induction. $p=0$ is easy , but $p=1$ is giving me a hard time. 
Edit: After the comment of Dear Dunham , it's seems that we need both integral to be equal to zero , in other to work , in that case  we have the form : 
$$ \int_{0}^{2\pi} f(t) e^{ipt} \mathrm{d}t=0$$   , 
Now it looks like the trigonometric version of Prove that $f$ has $m+1$ zeros if $\int_{a}^{b} x^nf(x)dx=0$ for all $n\le m$ 
Edit:  I made some progress with the new version of the question in the case $f$ is not identicaly $0$ , and proved $M \geq n$ , where $M$ is the number of zeros of $f$ as follow :
Let $(T_{n})$ the sequence of Tchebychev polynomial , $\cos(nt)=T_{n}(\cos(t))$ and $\deg(T_{n})=n$ . hence $(T_{0},...,T_{n-1})$ is a basis of $R_{n-1}[X]$ ,$0\leq a_{1}<a_{2}<... <a_{m}\leq \pi \leq a_{m+1}<..<a_{p}$ the zeros of $f$ and suppose that $p\leq n-1$  .
For $i \in [1,m-1]$ such that $a_{i}<x<a_{i+1}$ since cosinus is decreasing in  $[0,\pi[$ then $b_{i+1}=\cos(a_{i+1}) < \cos(x) < b_{i}=\cos(a_{i})$  ,
on the other hand, for $j \in [m ,p-1]$ we have $c_{j}=\cos(a_{j}) < \cos(x) < c_{j+1}=\cos(a_{j+1})$  since here cosine is increasing in $[\pi ,2 \pi]$. 
We have then $(d_{n})$ constructed from $(b_{n})$ and $(c_{n})$ such that :  $\forall x \in [0,2\pi]-J :  f(x)  \Pi_{i=1}^{p} (\cos(x)-d_{i}) > 0$ where 
$J=\{a_{1},a_{2},....,a_{p}, d_{1},...,d_{p}\}$ , the polynomial $P(x)=\Pi_{i=1}^{p}(x-d_{i})$ is of degree at most $n-1$ , hence we have $(t_{i})$ such that:  $P(\cos(t))=\sum_{i=1}^{n-1} t_{i}T_{i}(\cos(t))$ by linearity of the integral, we conclude that : $\int_{0}^{2\pi} f(t)P(t)=0$ hence $f(x)=0$ For any  $x \in [0,2\pi]-J$ , hence by continuity $f=0$ every where, contradiction .    
I feel that I can improve this solution , by a better choice of the sequence of polynomial , one that also include the orthoganility with the familly $\sin(pt)$ $p \in [[0,n-1]]$ this information is critical to improve the bound , any help ? thank you a lot . 
 A: original problem
If $f(t)=\cos(t)+\sin(t)$ then there are only 2 zeros, yet the conditions are true for any value of $n$.
Revised problem: proof sketch
Let $f:\mathbb{R}\rightarrow \mathbb{R}$ be continuous and $2\pi$ periodic with $M\in \mathbb{N}$ zeros. Also, suppose $\int f(t)e^{ipt}dt=0$ for $|p|<n$.
Define $f_k$ to be the $k$th zero mean antiderivative of $f$.
Since $f_1$ has $M$ critical values, $f_1$ has at most $M$ zeros. Similarly, $f_k$ has at most $M$ zeros for all $k$.
Now, $f_1$ has a convergent Fourier series
\begin{equation}
f_1(t) = \sum_{\ell\geq n} a_\ell \cos(\ell t) +b_\ell \sin(\ell t)
\end{equation} 
Then $f_{4L+1}$ has Fourier series
\begin{equation}
f_{4L+1}(t) = \sum_{\ell\geq n} 
\frac{a_\ell}{\ell^{4L}} \cos(\ell t) 
+\frac{b_\ell}{\ell^{4L}} \sin(\ell t)
\end{equation}
For $L$ sufficiently large, all terms except the first
\begin{equation}
\frac{a_n}{n^{4L}} \cos(n t)
+\frac{b_n}{n^{4L}} \sin(n t)
\end{equation}
are negligible. This first term has $2n$ zeros, so $f_{4L+1}$ has at least $2n$ zeros. Thus $M\geq 2n$.
Definition: 
Given a continuous $2\pi$-periodic function $g:\mathbb{R}\rightarrow \mathbb{R}$ with mean 0, we can find an antiderivative
\begin{equation*}
\widetilde G(x) = \int_0^x g(t)dt.
\end{equation*}
Then the mean zero antiderivative of $g$ is
\begin{equation*}
G(x) = \widetilde G(x) - \int_0^{2\pi} \widetilde{G}(t)dt.
\end{equation*}
By the $k$th mean zero antiderivative, we mean $f_1$ is the mean zero antiderivative of $f$, $f_2$ is the mean zero antiderivative of $f_1$, and so on.
Proposition: 
In the series, 
\begin{equation}
f_{4L+1}(t) = \sum_{\ell\geq n} 
\frac{a_\ell}{\ell^{4L}} \cos(\ell t) 
+\frac{b_\ell}{\ell^{4L}} \sin(\ell t)
\end{equation}
for sufficiently large $L$, all terms except the first are neglibible.
Proof: 
 WLOG assume $a_n$ or $b_n$ is nonzero. Note that 
\begin{equation}
a_n \cos(n t)
+b_n \sin(n t)
\end{equation}
has $2n$ zeros and $2n$ extrema. The absolute value of the extrema is $\sqrt{|a_n|^2+|b_n|^2}$. Therefore, we shall make $L$ large enough so that the sum of the other terms is at most $\frac{\sqrt{|a_n|^2+|b_n|^2}}{2n^{4L}}$. We have $|a_{\ell}|\le \frac1{\sqrt{2\pi}}\int_0^{2\pi}|\cos(\ell x)f(x)|dx\le \frac1{\sqrt{2\pi}}\int_0^{2\pi}|f(x)|dx$ and the same bound for $|b_{\ell}|$, $\forall\ell$. The terms are bounded as follows
\begin{align*}
\left|\sum_{\ell\geq n+1} 
\frac{a_\ell}{\ell^{4L}} \cos(\ell t) 
+\frac{b_\ell}{\ell^{4L}} \sin(\ell t)\right|
&\leq
2\max_{\ell>n }\{|a_\ell|,|b_\ell|\}
\sum_{\ell\geq n+1} 
\frac{1}{\ell^{4L}} \\
&\leq
2\max_{\ell>n }\{|a_\ell|,|b_\ell|\}
+
\left(
\frac{1}{(n+1)^{4L}}
+
\sum_{\ell\geq n+2} 
\frac{1}{\ell^{4L}} 
\right)\\
&\leq
2\max_{\ell>n }\{|a_\ell|,|b_\ell|\}
\left(
\frac{1}{(n+1)^{4L}}
+
\int_{n+1}^{\infty}
x^{-4L}
\right)\\
&=
2\max_{\ell>n }\{|a_\ell|,|b_\ell|\}
\left(
\frac{1}{(n+1)^{4L}}
+
\frac{1}{(4L-1)(n+1)^{4L-1}}
\right)\\
&\leq
4\max_{\ell>n }\{|a_\ell|,|b_\ell|\}
\frac{1}{(n+1)^{4L-1}}
\end{align*}
Now, we just have to show that 
\begin{equation*}
4\max_{\ell>n }\{|a_\ell|,|b_\ell|\}
\frac{1}{(n+1)^{4L-1}}
\leq
\frac{\sqrt{|a_n|^2+|b_n|^2}}{2n^{4L}}
\end{equation*}
or equivalently
\begin{equation*}
\frac{8n\max_{\ell>n }
\{|a_\ell|,|b_\ell|\}}
{\sqrt{|a_n|^2+|b_n|^2}}
\leq
\left(
\frac{n+1}{n}
\right)^{4L-1}
\end{equation*}
The left-hand side is constant, while the right-hand side diverges to $\infty$ as $L\rightarrow \infty$. Hence the result is true for some $L$. 
Proposition: 
Suppose $f$ has $M\in \mathbb{N}$ zeros. Then
$f_k$ cannot have more zeros than $f$ for all $k$.
Proof: 
Consider $f_1$ as a differentiable function on the circle $\mathbb{T}$.  The derivative of $f_1$ is $f$, which has $M\in \mathbb{N}$ zeros. Since $f$ is continuous, the derivative of $f_1$ is defined everywhere, so the only critical values of $f_1$ are the zeros of $f$. Let $t_0$ and $t_1$ be any two consecutive zeros of $f$. Then $f_1$ is either strictly increasing or strictly decreasing on $[t_0,t_1]$. Hence $f_1$ has at most one zero on this interval. There are $M$ pairs of consecutive zeros of $f$. Hence $f_1$ has at most $M$ zeros. A similar argument applies to $f_2$ and so on.  
A: I provide a new solution here for someone who is interested.
WLOG, assume $f(-\pi)=f(\pi)\neq 0$(if not, just find a $x_0$ s.t. $f(x_0)\neq 0$ and do the transform $g(x)=f(x-\pi+x_0$). 
Since $f(x)$ is continuous and periodic, there are only even points to change the sign of $f(x)$. Let these points to be 
$$
x_1<x_2<\cdots<x_{2k}. 
$$
Then construct a function
$$
g(x)=\left(\sin \frac{x-x_1}{2}\right)\cdot\left(\sin \frac{x-x_2}{2}\right)\cdots\left(\sin \frac{x-x_{2k}}{2}\right).
$$
Then we get 
\begin{equation}
\int_{-\pi}^\pi f(x)g(x)\mathrm{d} x>0. \tag{1}\label{1}
\end{equation}
It can be rewritten as
\begin{align}g(x)= &\left(\sin \frac{x}{2}\cos\frac{x_1}{2}-\cos\frac{x}{2}\sin\frac{x_1}{2}\right)\cdot \left(\sin \frac{x}{2}\cos\frac{x_2}{2}-\cos\frac{x}{2}\sin\frac{x_2}{2}\right)\\
&\cdots \left(\sin \frac{x}{2}\cos\frac{x_{2k}}{2}-\cos\frac{x}{2}\sin\frac{x_{2k}}{2}\right)\\
=&f_1(\cos x)\sin x+f_2(\cos x)\tag{2}\label{2}
\end{align}
where $f_1$ and $f_2$ are polynomials and $\text{deg}f_1=k-1, \text{deg}f_2=k$. These two terms can be written as
\begin{equation}
f_1(\cos x)\sin x = a_k \sin kx + a_{k-1}\sin (k-1)x+\cdots+a_1\sin x + a_0\tag{3}\label{3}
\end{equation}
\begin{equation}
f_2(\cos x) = b_k \cos kx + b_{k-1}\cos (k-1)x+\cdots+b_1\cos x + b_0.\tag{4}\label{4}
\end{equation}
You can prove it by induction(see the notation below). If degree $k\leq n$, we get
$$
\int_{-\pi}^\pi f(x)g(x)\mathrm{d}x=0
$$
by using the condition of the problem.
It controdicts to the equation \eqref{1}. Hence $k\geq n+1$ and the number of roots of $f(x)$ in $[-\pi,\pi]$ is at least $2n+2$.

Notation: Assume for any $k<n$, we have
\begin{equation}
f_1(\cos x)\sin x = a_k \sin kx + a_{k-1}\sin (k-1)x+\cdots+a_1\sin x + a_0
\end{equation}
\begin{equation}
f_2(\cos x) = b_k \cos kx + b_{k-1}\cos (k-1)x+\cdots+b_1\cos x + b_0
\end{equation}
for all $ f_1, f_2\in \mathbb{R}_k[x]$. 
Then for all $ g_1, g_2\in\mathbb{R}_{n}[x]$ , you can extract a $\cos x$ and write them as
$$
g_1(\cos x)\sin x = \cos x(a_{n-1} \sin (n-1)x + a_{n-2}\sin (n-2)x+\cdots+a_1\sin x + a_0)
$$
$$
g_2(\cos x) = \cos x(a_{n-1} \cos (n-1)x + a_{n-2}\cos (n-2)x+\cdots+a_1\cos x + a_0).
$$
Then use the formula
$$
\cos\alpha\sin\beta=\frac{1}{2}\left[\sin(\beta+\alpha)+\sin(\beta-\alpha)\right]
$$
and
$$
\cos\alpha\cos\beta=\frac{1}{2}\left[\cos(\beta+\alpha)+\cos(\beta-\alpha)\right].
$$
