I need show this exercise:
Let $X$ is complex normed space with interior product and $w\in\mathbb{C}$ is a primitive root of $1$ of orden $n$.
Show that if $x,y\in X$ then $$\langle x,y \rangle = \frac{1}{n} \sum_{k=0}^{n-1}w^k\lVert x+w^k y \rVert^2.$$
My solution:
$(1)\,\,$ If $w\in\mathbb{C}$ is a primitive root of $1$ of orden $n$ then $n=\min\{m\in\mathbb{N}:w^m=1\}$.
$(2)\,\,$ $w^m=1$ if and only if $n|m.\,\,\,$ ($n$ divides $m$, this fact is trivial.)
$(3)\,\,$ Since $w^n=1$ then $|w|^n=|w|\cdot |w|\cdots |w|=|w\cdot w\cdots w|=|w^n|=1\,\,$ then $\,\,|w|=1$.
Now:
\begin{align*} \frac{1}{n} \sum_{k=0}^{n-1}w^k\lVert x+w^k y \rVert^2 &= \frac{1}{n} \sum_{k=0}^{n-1}w^k\langle x+w^k y, x+w^k y \rangle \\ &= \frac{1}{n} \sum_{k=0}^{n-1}\langle w^k x+w^{2k} y, x+w^k y\rangle \\ &= \frac{1}{n} \sum_{k=0}^{n-1} \left(\langle w^kx, x \rangle + \langle w^k x, w^k y \rangle + \langle w^{2k}y, x \rangle + \langle w^{2k}y,w^{2k}y \rangle \right)\\ &= \frac{1}{n} \left( \sum_{k=0}^{n-1} w^k\langle x, x \rangle + \sum_{k=0}^{n-1} \lvert w\rvert^{2k} \langle x, y \rangle + \sum_{k=0}^{n-1} w^{2k} \langle y, x \rangle + \sum_{k=0}^{n-1} w^k \lvert w\rvert^{2k}\langle y,y \rangle \right )\\ &= \frac{1}{n} \left( \langle x, x \rangle\sum_{k=0}^{n-1} w^k + \langle x, y \rangle\sum_{k=0}^{n-1} \lvert w\rvert^{2k} + \langle y, x \rangle\sum_{k=0}^{n-1} w^{2k} + \langle y,y \rangle\sum_{k=0}^{n-1} w^k \lvert w\rvert^{2k} \right )\\ &= \frac{1}{n} \left( \langle x, x \rangle\cdot 0+ \langle x, y \rangle\cdot n + \langle y, x \rangle\cdot 0 + \langle y,y \rangle\cdot 0 \right )\,\,\,\,\,(\ast)\\ &= \langle x, y \rangle \end{align*}
See the results in $(\ast)$. We know that:
$(i)$ $\hspace{0.5cm}$ For $w\neq 1$, $\displaystyle\,\,\,\,\,\,\sum_{k=0}^{n-1} w^k=\dfrac{1-w^{n}}{1-w}=\dfrac{1-1}{1-w}=0.$
$(ii)$ $\hspace{0.5cm}$ $\displaystyle\sum_{k=0}^{n-1} \lvert w\rvert^{2k}=\sum_{k=0}^{n-1} 1^{2k}=\dfrac{1-1}{1-w}=n.$
$(iii)$ $\hspace{0.5cm}$ For $w^2\neq 1$, $\displaystyle\,\,\,\,\,\,\sum_{k=0}^{n-1} w^{2k}=\dfrac{1-w^{2n}}{1-w^{2}}=\dfrac{1-(w^n)^2}{1-w^2}=\dfrac{1-1^2}{1-w^2}=0.$
$(i)$ $\hspace{0.5cm}$ For $w\neq 1$, $\displaystyle\,\,\,\,\,\,\sum_{k=0}^{n-1} w^k|w|^{2k}=\sum_{k=0}^{n-1} w^k=0.$
TO END THE SOLUTION I NEED JUSTIFY WHAT HAPPENS IF $w=1$ and $w^2=1$.
BUT I HAVE NOT BEEN ABLE TO JUSTIFY THIS.
THANKS FOR YOUR HELP!
You have shown the statement for $w\not\in\{1,-1\}$, or the cases where $n>2$.
For the two remaining cases ($w=1,w=-1$), one can show that the statement is wrong. To find a counterexample, use $X=\Bbb C$ and $x=y=1\in X=\Bbb C$, and calculate the left-hand and right-hand side.