Does $\int_0^{2\pi} e^{i\theta(t)} (\phi(t))^n dt=0$ $\forall \; n\in\mathbb{N}_0$ imply $\phi$ periodic? PROBLEM. Let $\theta(t)$ and $\phi(t)$ be two real analytic non-constant functions $[0,2\pi]\rightarrow \mathbb{R}$. I am trying to prove the following claim

If the integral
$$
\int_0^{2\pi} e^{i\theta(t)} (\phi(t))^n dt=0
$$
for all $n\in\mathbb{N}_0$ than the first derivative $\theta'$ and $\phi$ are periodic of common period $2\pi/l$ with $1\neq l\in\mathbb{N}$.

Note that this is equivalent to $F(\lambda):=\int_0^{2\pi} e^{i(\theta(t)+\lambda\phi(t))} dt=0$ for all $\lambda \in \mathbb{R}$. In fact, $F(\lambda)$ is analytic in $\lambda$ and its being constantly equal to 0 is equivalent to the vanishing of all its derivatives $F^{(n)}(0)=\int_0^{2\pi} e^{i\theta(t)} (\phi(t))^n dt$. Geometrically this means that the curve obtained by integrating the (tangent) vector function $(\cos(\theta+\lambda\phi),\sin(\theta+\lambda\phi))$ over $[0,2\pi]$ is closed $\forall \lambda$.
Just in case, a back-up less general claim for which I would like to see a clean solution is

If, in the hypotesis above, $\phi$ is a polynomial, then $\phi$ is constantly $0$.


OBSERVATION. If $\theta'$ and $\phi$ are periodic of common period $\frac{2\pi}{l}$ with $1\neq l \in \mathbb{N}$ and $\int_0^{\frac{2\pi}{l}} e^{i\theta}\neq 0$ then the converse implication is true. In fact, in this setting $\theta=c\cdot t+\theta_p(t)$ with $c=\frac{2\pi}{l}(\theta(\frac{2\pi}{l})-\theta(0))$
and $\theta_p$ periodic of period $\frac{2\pi}{l}$. Then
$$
\begin{align}
\int_0^{2\pi} e^{i(\theta(t)+\lambda\phi(t))} dt &=& \sum_{j=0}^{l-1} \int_{j \frac{2\pi}{l}}^{(j+1) \frac{2\pi}{l}} e^{i(c\cdot t+\theta_p(t)+\lambda\phi(t))} dt \\
&=& \sum_{j=0}^{l-1} e^{i\cdot j \cdot \frac{2\pi}{l}} \int_{0}^{\frac{2\pi}{l}} e^{i(c\cdot t+\theta_p(t)+\lambda\phi(t))} dt,
\end{align}
$$
where the last equality is obtained by repetedly applying the substitution $t'=t-\frac{2\pi}{l}$. Since we know $\sum_{j=0}^{l-1} e^{i\cdot j \cdot \frac{2\pi}{l}} \int_{0}^{\frac{2\pi}{l}} e^{i\theta(t)}dt=\int_0^{2\pi} e^{i\theta(t)} dt=0$ then also the integral above must be $0$. In the following picture the curve associated to $\theta(t)=t + \cos( 12 t)$ deformed in the direction $\cos(3 t)$. In this case $l=3$ and the curve is closed $\forall \lambda$.
$\theta(t)=t + \cos( 12 t)$ deformed in the direction $\cos( 3 t)$. In this case $l=3$ and the curve is closed $\forall \lambda$." />
IDEA. If $\theta$ monotone one can substitute $s=\theta(t)$ in the integral and get
$$
\int_{\theta(0)}^{\theta(2\pi)} e^{i s} \frac{(\phi(\theta^{-1}(s)))^n}{\theta'(\theta^{-1}(s))} ds=0.
$$
In this case the idea behind the hypotesis becomes apperent: $\phi(\theta^{-1}(s))$ is periodic of non-trivial period iff $\phi$ and $\theta'$ have the common period property. It seems here that looking at the Fourier expansion of our functions on $[\theta(0),\theta(2\pi)]$ could be a good idea: the condition we have means indeed that, $\forall n$, the first harmonic of the function $\frac{(\phi(\theta^{-1}(s)))^n}{\theta'(\theta^{-1}(s))}$ is $0$. Fourier coefficients of a product are obtained by convolutions and therefore the condition above becomes, $\forall n$:
$$
\sum_{k_n=-\infty}^{+\infty} \sum_{k_{n-1}} ...  \sum_{k_{2}}\sum_{k_{1}} \widehat{\frac{1}{\theta'}}(1-\sum_{i=1}^{n} k_i) \prod_{i=1}^{n}  \widehat{\phi}(k_i)=0.
$$
Is this approach viable? Can one from here exploit the fact that a function is periodic of non-trivial period iff there exists $k$ such that only harmonics multiple of $k$ are different from 0? Other way round, do non-zero harmonics of coprime orders imply a contradiction with our constraints? As for a toy example, if $\theta(t)=t$,$\theta'(s)=1$ and $\phi(s)=\cos(2s)+\cos(3s)$ already $\widehat{f^2}(1)= 2 \widehat{f}(3)\widehat{f}(-2) \neq 0$; in the general setting interaction of coefficients is not straightforward.
NOTE: This question originated from Orthogonality relation in $L^2$ implying periodicity. As suggested in the comments to the previous post, since the target of the question changed over time and edits were major, here I hope I gave a clearer and more consistent presentation of my problem.
Thank you for your time.
 A: I missed the real analyticity condition (my comment makes perfect sense for $C^\infty$ though), so let's move points in a fancy way to satisfy it.
First, observe that if $a_0,a_1,a_2$ are positive reals close to $1$, then there exist unique $\theta_1\approx \frac {2\pi} 3$ and $\theta_2\approx \frac {4\pi}3$ such that $a_0+a_1e^{i\theta_1}+a_2e^{i\theta_2}=0$. Moreover, $\theta_{1,2}$ are real analytic functions of $a_{0,1,2}$ in some neighborhood of $1$. This is just the implicit function theorem.
Now choose your favorite $2\pi$-periodic real analytic function $F(\tau)$ with uniformly  small derivative that is not periodic with any smaller period (say, $\varepsilon\cos\tau$) and put $t(\tau)=\tau+F(\tau)$. Then $\tau$ is uniquely determined by $t$ and the dependence is real analytic as well.
Next define $\theta_{1,2}(\tau)$ by $\theta_j(\tau)\approx \frac {2\pi j}3$ such that
$$
t'(\tau)+t'(\tau+\tfrac{2\pi}3)e^{i\theta_1(\tau)}+t'(\tau+\tfrac{4\pi}3)e^{i\theta_2(\tau)}=0
$$
Everything is real analytic so far.
By uniqueness, we must have the relations $\theta_1(\tau+\frac{2\pi}{3})=\theta_2(\tau)-\theta_1(\tau)$ and $\theta_1(\tau+\frac{4\pi}{3})=2\pi -\theta_2(\tau)$. Thus $\theta_1(\tau)+\theta_1(\tau+\frac{2\pi}{3})+\theta_1(\tau+\frac{4\pi}{3})=2\pi$. This implies that there exists a real analytic $\Theta(\tau)$ such that $\Theta(\tau+\frac{2\pi}3)=\Theta(\tau)+\theta_1(\tau)$ (just divide the Fourier coefficients by appropriate numbers to get the periodic part and add $\tau$; note that the identity for $\theta_1$ implies that $\widehat\theta_1(3k)=0$ for $k\ne 0$, so no division by $0$ will be encountered). Then, automatically, $\Theta(\tau+2\pi)=\Theta(\tau)+2\pi$ and 
$$
\Theta(\tau+\frac{4\pi}3)=\Theta(\tau+\frac{2\pi}3)+\theta_1(\tau+\frac{2\pi}3)
\\
=\Theta(\tau)+\theta_1(\tau)+\theta_1(\tau+\frac{2\pi}3)=\Theta(\tau)+\theta_2(\tau)
$$
Hence, we have the identity
$$
\sum_{j=0}^2 t'(\tau+\tfrac{2\pi j}3)e^{i\Theta(\tau+\frac{2\pi j}3)}=0
$$ 
We can now pick up any $\frac{2\pi}3$-periodic real analytic function $\Psi(\tau)$, multiply the terms by the corresponding values of $\Psi^n$ (they are equal), integrate in $\tau$ from $0$ to $\frac{2\pi}3$, and use the standard change of variable formula to get
$$
\int_0^{2\pi} e^{i\Theta(\tau(t))}\Psi(\tau(t))^n\,dt=0
$$
but $\psi(t)=\Psi(\tau(t))$ is no longer $\frac{2\pi}3$ periodic in $t$ because the composition kills periodicity.
As I said from the beginning, "there are many fancy ways to move six  (well, even three) points around the circle and keep the sum balanced".
A: Another way of constructing a counterexample and a picture.
Consider a curve allowing a parametrization as trigonometric polynomial, that is 
$$
\gamma(t)=\Bigl(a_0+\sum_{j=1}^N a_j \cos(j\cdot t + \alpha_j),b_0+\sum_{j=1}^N b_j \cos(j\cdot t + \beta_j)\Bigl),
$$
with $N\in \mathbb{N}$, $(a_j),(b_j)\in \mathbb{R}^{N+1}$ and $(\alpha_j),(\beta_j) \in \mathbb{R}^N$, and such that $\|\gamma'\|>0$. Such curves are closed and satisfy for any natural number $l>N$
$$
\int_0^{2\pi} \gamma'(t) \cos(h\cdot l\cdot t) dt =(0,0), \; \forall h \in \mathbb{N}.
$$
Using the complex notation we can write $\gamma'(t)$ as $ v(t)\mathrm{e}^{i\theta(t)}$ where $v(t)=\|\gamma'(t)\|$ is the speed of $\gamma$ and $\theta$ is the turning angle associated to the parametrization. After reparametrizing via $t(s)$ to the arc-length (always possible as long as the curve is regular) we obtain, possibly scaling our curve to a length of $2\pi$, 
$$
\int_0^{2\pi} \mathrm{e}^{i\theta(t(s))} \cos(h\cdot l\cdot t(s)) ds =0, \; \forall h \in \mathbb{N}.
$$
Since $\cos(l\cdot t(s))^n$ can be rewritten as a linear combination of terms of the form $\cos(h\cdot l\cdot t(s))$ we also get 
$$
\int_0^{2\pi} \mathrm{e}^{i\theta(t(s))} \cos(l\cdot t(s))^n ds =0, \; \forall n \in \mathbb{N},
$$
and in general the function $\cos(l\cdot t(s))$ won't be periodic of any period smaller than $2\pi$.
In the next figure the turning angle $\theta$ of a trigonometric curve of degree $3$ is linearly changed to $\theta+\lambda\phi$ with $\phi(t)=\mathrm{e}^{\cos(4t)}+2\cos(4t)$ while the curve remains closed (it is possible to prove that any composition with $L^1$ functions mantains our property). From top left to bottom right $\lambda$ goes from $0$ to $0.8$ by $0.1$ increments.

