Sums of powers of cosines and sines shifted by $2\pi/3$ I have stumbled across these two identities
$$
\begin{split}
\cos^2(x)+\cos^2(x+2\pi/3)+\cos^2(x+4\pi/3) &= 3/2,\\
\cos^4(x)+\cos^4(x+2\pi/3)+\cos^4(x+4\pi/3) &= 9/8.
\end{split}
$$
There is also the more intricate
$$
\begin{split}
\cos^2(x)\sin^2(x)+\cos^2(x+2\pi/3)\sin^2(x+2\pi/3)+\cos^2(x+4\pi/3)\sin^2(x+4\pi/3) &= 3/8,\\
\cos^4(x)\sin^4(x)+\cos^4(x+2\pi/3)\sin^4(x+2\pi/3)+\cos^4(x+4\pi/3)\sin^4(x+4\pi/3) &= 9/128,
\end{split}
$$
and of course the most elementary
$$
\cos(x)+\cos(x+2\pi/3)+\cos(x+4\pi/3)=0.
$$
The last identity admits a rather intuitive interpretation in terms of unitary complex numbers centered about the origin. My questions are:

*

*Do the other identities admit similar more or less intuitive interpretations as well?

*Do such identities have names?

*Not all powers and combinations produce a constant; What is the general form of the expressions that do?

Context: The first two identities came up while calculating the elastic response of a two-dimensional truss (a planar lattice of nodes connected with springs) that is invariant by rotations of order 3, in which case $x$ describes the orientation of the truss. We know that such trusses must exhibit an isotropic response and that justifies, in a rather convoluted manner, that these expressions must be constants. The other expressions I found by trial and error. I am looking for a satisfying, non-brute-force, non-too-group-theoretic, explanation.
 A: This is an answer to question 3.
Let
$$f_n(x):=\cos^n(x)+\cos^n\bigg(x+\frac{2\pi}{3}\bigg)+\cos^n\bigg(x+\frac{4\pi}3\bigg)$$
$$\small g_n(x):=\cos^n(x)\sin^n(x)+\cos^n\bigg(x+\frac{2\pi}3\bigg)\sin^n\bigg(x+\frac{2\pi}3\bigg)+\cos^n\bigg(x+\frac{4\pi}3\bigg)\sin^n\bigg(x+\frac{4\pi}3\bigg) $$
where $n$ is a positive integer.
This answer proves the following two claims :
Claim 1 : $f_n(x)$ is a constant function if and only if $n=1,2,4$.
Claim 2 : $g_n(x)$ is a constant function if and only if $n=1,2,4$.

Claim 1 : $f_n(x)$ is a constant function if and only if $n=1,2,4$
Proof :
You already noticed that $f_1(n),f_2(n)$ and $f_4(n)$ are constant functions.
Now, let us prove that if $f_n(x)$ is a constant function, then $n=1,2,4$ as follows :
$$\begin{align}&\text{$f_n(x)$ is a constant function}
\\\\&\implies f_n(0)=f_n\bigg(\frac{\pi}{6}\bigg)
\\\\&\implies 1+\bigg(-\frac 12\bigg)^n+\bigg(-\frac 12\bigg)^n=\bigg(\frac{\sqrt 3}{2}\bigg)^n+\bigg(-\frac{\sqrt 3}{2}\bigg)^n+0
\\\\&\implies 2^n+2(-1)^n-(\sqrt 3)^n-(-\sqrt 3)^n=0
\\\\&\implies \begin{cases}2^n-2=0&\text{if $n$ is odd}\\\\2(\sqrt 3)^{n-1}\bigg(\bigg(\frac{2}{\sqrt 3}\bigg)^{n-1}-\sqrt 3\bigg)+2=0&\text{if $n$ is even}\end{cases}
\\\\&\implies n=1,2,4\end{align}$$
since for odd $n$ , we have $2^n-2=0\implies n=1$, and for even $n$, letting $h(n):=2(\sqrt 3)^{n-1}\bigg(\bigg(\frac{2}{\sqrt 3}\bigg)^{n-1}-\sqrt 3\bigg)+2$, we see that $h(2)=h(4)=0$ and that $h(n)$ is increasing for $n\ge 6$ with $h(6)=12$.

Claim 2 : $g_n(x)$ is a constant function if and only if $n=1,2,4$.
Proof :
You already noticed that $g_2(n)$ and $g_4(n)$ are constant functions. We have $g_1(n)=0$.
Now, let us prove that if $g_n(x)$ is a constant function, then $n=1,2,4$ as follows :
$$\small\begin{align}&\text{$g_n(x)$ is a constant function}
\\\\&\implies g_n(0)=g_n\bigg(\frac{\pi}{4}\bigg)
\\\\&\implies 0+\bigg(-\frac 12\bigg)^n\bigg(\frac{\sqrt 3}{2}\bigg)^n+\bigg(-\frac 12\bigg)^n\bigg(\frac{-\sqrt 3}{2}\bigg)^n\\&\qquad\qquad =\bigg(\frac{1}{\sqrt 2}\bigg)^n\bigg(\frac{1}{\sqrt 2}\bigg)^n+\bigg(-\frac{1+\sqrt 3}{2\sqrt 2}\bigg)^n\bigg(\frac{\sqrt 3-1}{2\sqrt 2}\bigg)^n+\bigg(\frac{\sqrt 3-1}{2\sqrt 2}\bigg)^n\bigg(-\frac{1+\sqrt 3}{2\sqrt 2}\bigg)^n
\\\\&\implies 2^n+2(-1)^n-(\sqrt 3)^n-(-\sqrt 3)^n=0
\\\\&\implies n=1,2,4\end{align}$$
where the last step is the same as that of the proof for claim 1.
A: Yes, any polynomial identity involving $\cos(mx + c)$ and $\sin(mx+c)$ for various constants $c$ and integers $m$ can be written in the form
$R(z) = 0$ where $z = e^{ix}$ and $R$ is a rational function involving the $e^{ic}$.  For this to be true, the numerator of $R(z)$ must simplify to the polynomial $0$.
For example, let's take
$$ \cos^2(x) + \cos^2(x+2\pi/3) + \cos^2(x+4\pi/3)=3/2 $$
Expressed in terms of $z = e^{ix}$, this becomes
$$ \frac{z^2}{4} + \frac{1}{2} + \frac{1}{4z^2} + \frac{z^2}{4} e^{4\pi i/3} + \frac{1}{2} + \frac{1}{4 z^2} e^{-4\pi i/3} + \frac{z^2}{4} e^{8\pi i/3} + \frac{1}{2} + \frac{1}{4 z^2} e^{-8\pi i/3} = \frac{3}{2} $$
which simplifies to
$$ \left(1 + e^{4\pi i/3} + e^{8\pi i/3}\right) \frac{z^2}{4} + 
\left(1 + e^{-4\pi i/3} + e^{-8\pi i/3}\right) \frac{1}{4 z^2} = 0 $$
and that is true, as we verify by showing $$1 + e^{4\pi i/3} + e^{8\pi i/3} = 0$$
and $$ 1 + e^{-4\pi i/3} + e^{-8\pi i/3} = 0$$
Note that if $w = e^{4\pi i/3}$, the first is $1 + w + w^2 = (1-w^3)/(1-w)$, and
$w^3 = e^{4\pi i} = \left(e^{2\pi i}\right)^2 = 1$.  Similarly for the second.
EDIT: For question 3, you basically want to know what polynomial identities are satisfied by the $e^{ic}$.  If there is only one $c$, then $e^{ic}$ must be an algebraic number, and all polynomial identities it satisfies are multiples of its minimal polynomial.  For example, if $c = 2 m \pi/n$
with $m$ and $n$ coprime, then the minimal polynomial is the cyclotomic polynomial $C_n(w)$.  Things can be more complicated if there are several different $c$.
EDIT: For example, the $6$'th cyclotomic polynomial is $C_6(w) = w^2 - w + 1$, and its roots are $e^{2\pi i k/6}$. where $k$ and $6$ are coprime, i.e. $e^{\pi i/3}$ and $e^{- \pi i/3}$.
We might take $$(z+1/z)(w - 1 + 1/w) = z w + \frac{1}{zw} - z - \frac{1}{z} + \frac{z}{w} + \frac{w}{z}$$
which with $w = \exp(i\pi/3)$ and $z = \exp(ix)$ becomes
$$ 2 \cos(x+\pi/3) - 2 \cos(x) + 2 \cos(x-\pi/3) = 0 $$
A: If $\cos3y=\cos3x$
$3y=2n\pi\pm3x$ where $n$ is any integer
$y=\dfrac{2n\pi}3+x$ where $n=0,1,2$
Again, $\cos3y=4\cos^3y-3\cos y$
So, the roots of $$4\cos^3y-3\cos y-\cos3x=0$$ are  $p=\cos x,q=\cos\left(\dfrac{2\pi}3+x\right),r=\cos\left(\dfrac{4\pi}3+x\right)$
Using Vieta's formula, $$p+q+r=\dfrac04\ \ \ \  (1)\text{ and }pq+qr+rp=\dfrac{-3}4\ \ \ \  (2)\text{ and }pqr=\dfrac{\cos3x}4\ \ \ \  (3)$$
By $(1),(2)$ $$p^2+q^2+r^2=(p+q+r)^2-2(pq+qr+rp)=?\  \ \  \ (4)$$
By $(1),(3)$ $$p^3+q^3+r^3=3pqr=?\  \ \  \ (5)$$
A little Transformation of equation

*

*Let $c=\cos^2y$
$$(\cos3x)^2=(4\cos^3y-3\cos y)^2$$
$$\implies16c^3-24c^2+9c-\cos^23x=0$$ whose roots are $p^2,q^2,r^2$
Again applying Vieta's formula,  $$p^2+q^2+r^2=\dfrac{24}{16}\  \ \  \ (6)\text{ compare with }(4)$$
$$p^2q^2+q^2r^2+r^2p^2=\dfrac9{16}\  \ \  \ (7)\text{ and } p^2q^2r^2=\dfrac{\cos^23x}{16}\  \ \  \ (8)\text{ compare with }(3)$$
By $(6),(7)$ $$p^4+q^4+r^4=(p^2+q^2+r^2)^2-2(p^2q^2+q^2r^2+r^2p^2)=?\  \ \  \ (9)$$

*

*Let $s=\dfrac1{\cos y}$
$$\dfrac4{s^3}-\dfrac3s-\cos3x=0\iff(\cos3x)s^3+3s^2-4=0$$ whose roots are $\dfrac1p,\dfrac1q,\dfrac1r$
$$\implies\dfrac1p+\dfrac1q+\dfrac1r=-\dfrac3{\cos3x}=-3\sec3x\ \ \ \ (10)$$
Similarly, $$\dfrac1{pq}+\dfrac1{qr}+\dfrac1{rp}=?\ \ \ \ (11)\text{ and }\dfrac1{pqr}=?\ \ \ \ (12)$$
Finally as  $\dfrac1p=\sec x$ etc.,
using $(10,11),$ $$\sec^2x+\sec^2\left(\dfrac{2\pi}3+x\right)+\sec^2\left(\dfrac{4\pi}3+x\right)=\left(\dfrac1p+\dfrac1q+\dfrac1r\right)^2-2\left(\dfrac1{pq}+\dfrac1{qr}+\dfrac1{rp}\right)=?$$
Generalization
$$\cos ny=\cos nx$$ Can this be left as an exercise?
