# $F(x , y)=\cos ^{y}\left(\frac{\pi}{x}\right)+\cos ^{y}\left(\frac{3 \pi}{x}\right)+\cos ^{y}\left(\frac{5 \pi}{x}\right)$

I am stuck with this problem , may you help me , it is from Spanish math olympiad ....

Given $$F(x , y)=\cos ^{y}\left(\frac{\pi}{x}\right)+\cos ^{y}\left(\frac{3 \pi}{x}\right)+\cos ^{y}\left(\frac{5 \pi}{x}\right)$$

Calculate

$$M=F(7 , 2)+F(7 , 3)+F(7 , 5)-F(7 , 6)$$

a) $$37 / 32$$

b) $$7 / 4$$

c) $$19 / 16$$

d) $$53 / 32$$

e)$$41 / 32$$

• What have you tried ?
– EDX
Jun 2, 2020 at 7:36
• First Let define $$p_n:=\left(2\cos\frac\pi7\right)^n+\left(2\cos\frac{5\pi}7\right)^n+\left(2\cos\frac{3\pi}7\right)^n\quad(n\in\mathbb{Z})$$ $$p_0=3,\quad p_1=1,\quad p_2=5$$ $$\forall n\in\mathbb{Z}c\quad p_{n+3}-p_{n+2}-2p_{n+1}+p_n=0$$ Your sum can be easily express in term of that first $p_n$. NB: $p_n$ is deduce from the fact that $$x^3-\frac{x^2}2-\frac x2+\frac18=0$$ has for roots $$\cos\frac\pi7,\quad-\cos\frac{2\pi}7,\quad\cos\frac{3\pi}7$$
– EDX
Jun 2, 2020 at 7:45
• @EDX IMHO you should post it as an answer Jun 2, 2020 at 7:55

First let's define

$$p_n:=\left(2\cos\frac\pi7\right)^n+\left(2\cos\frac{5\pi}7\right)^n+\left(2\cos\frac{3\pi}7\right)^n\quad(n\in\mathbb{Z})$$

$$p_0=3,\quad p_1=1,\quad p_2=5$$

$$\forall n\in\mathbb{Z}c\quad p_{n+3}-p_{n+2}-2p_{n+1}+p_n=0$$

$$M=\dfrac{p_2}{4}+\dfrac{p_3}{8}+\dfrac{p_5}{32}-\dfrac{p_6}{64}$$

So

$$M= \dfrac{5}{4}+\dfrac{4}{8}+\dfrac{16}{32}-\dfrac{38}{64}=\dfrac{106}{64}=\dfrac{53}{32}$$

Nota bene:

The expression of $$p_n$$ can be deduced to the fact that :

$$x^3-\frac{x^2}2-\frac x2+\frac18=0$$

has for roots $$\cos\frac\pi7,\quad-\cos\frac{2\pi}7,\quad\cos\frac{3\pi}7$$

and using the relation between coefficient of your polynom and the roots.

• This is brilliant 👏 , but how did you get this step $\forall n\in\mathbb{Z}c\quad p_{n+3}-p_{n+2}-2p_{n+1}+p_n=0$ ? Jun 2, 2020 at 8:24
• It is from the polynom $P=x^3+x^2/2-x/2+1/8$ multiply all by 8 it doesn't change the root. And the polynom generate the sequence $p_n$ in the meaning that using the kernel lemma on $P$ on the operator $a_n \to a_{n+1}$, and because $P$ is splitted square-free, you can get expression of $p$. It is the reversed idea that for every polynom splitted and squared free, you can generated a sequence by taking its root as $(a)^n+b^n...$ and the iterative relation where $a_ix^i$ correspond to the $p_i$ you defined. Here it is, for instance 8x^3 correspond to $p_3$ because of the factor $2^n$ in$p_i$
– EDX
Jun 2, 2020 at 9:30
• If it is not clear enough, I can explain you when I would have more time. Or I you are urged look at kernel lemma and it's application in solving recursively defined linear sequences by splitted polynom.
– EDX
Jun 2, 2020 at 9:32
• Okey Mr@EDX i will wait you to explain it more please Jun 2, 2020 at 9:51
• More simple reasonong: as $\cos\frac{\pi}{7},\cos\frac{3\pi}{7},\cos\frac{5\pi}{7}$ are the roots of $x^3-\frac{x^2}{2}-\frac{x}{2}+\frac{1}{8}=0$ then $2\cos\frac{\pi}{7},2\cos\frac{3\pi}{7},2\cos\frac{5\pi}{7}$ are the roots of $\left(\frac{x}{2}\right)^3-\frac{x^2}{8}-\frac{x}{4}+\frac{1}{8}=0\Leftrightarrow x^3-x^2-2x+1=0$. Recall $p_n=\sum\limits_{x^3-x^2-2x+1=0} x^n$, but $x^{n-3}(x^3-x^2-2x+1)=0$, hence $x^n-x^{n-1}-2x^{n-2}+x^{n-3}=0$ hence the desired recurrent relation. @EDX correct? Jun 2, 2020 at 10:14

A way to kill the problem, not to solve:
Let $$w=e^{\frac{\pi}{7}i}$$, $$\cos\left(\frac{k\pi}{7}\right)=\frac{w^k+w^{-k}}{2}$$, $$w^{14}=1$$, $$F(7,2)=\frac{w^{20} + w^{16} + w^{12} + 6 w^{10} + w^8 + w^4 + 1}{4 w^{10}}\\= \frac{1}{4}\left(w^{10} + w^6 + w^2 + 6 w^0 + w^{12} + w^8 + w^4\right)$$ $$F(7,3)=\frac{w^{30} + w^{24} + 3 w^{20} + 4 w^{18} + 3 w^{16} + 3 w^{14} + 4 w^{12} + 3 w^{10} + w^6 + 1}{8 w^{15}}\\ =\frac{1}{8}\left(4 w^{13} + 4 w^{11} + 4 w^9 + 4 w^5 + 4 w^3 + 4 w\right)$$ $$F(7,5)=\frac{1}{32 w^{25}}\left( w^{50} + 6 w^{40} + 5 w^{34} + 11 w^{30} + 15 w^{28} + 10 w^{26} + 10 w^{24} + 15 w^{22} + 11 w^{20} + 5 w^{16} + 6 w^{10} + 1\right)\\ =\frac{1}{32}\left(16 w^{13} + 16 w^{11} + 16 w^9 + 16 w^5 + 16 w^3 + 16 w\right)$$ $$F(7,6)=\frac{1}{64 w^{30}}\left(w^{60} + 6 w^{50} + w^{48} + 6 w^{42} + 15 w^{40} + 16 w^{36} + 6 w^{34} + 15 w^{32} + 60 w^{30} + 15 w^{28} + 6 w^{26} + 16 w^{24} + 15 w^{20} + 6 w^{18} + w^{12} + 6 w^{10} + 1\right)\\ =\frac{1}{64}\left(22 w^{12} + 22 w^{10} + 22 w^8 + 22 w^6 + 22 w^4 + 22 w^2 + 60 \right)$$ $$\hbox{So }F(7,3)+F(7,5)=w^{13} + w^{11} + w^9 + w^5 + w^3 + w =w\frac{w^{14}-1}{w^2-1}-w^7=1,\\ F(7,2)-F(7,6)=\frac{5}{4}-\frac{60-22}{64}+\left(\frac{1}{4}-\frac{22}{64}\right)\frac{w^{14}-1}{w^2-1}=\frac{21}{32}$$ and the whole sum $$=\dfrac{53}{32}$$, answer d)

• This is so intelligent, thank you very much Jun 2, 2020 at 8:26