Skip to main content
added 4 characters in body
Source Link
Fedor Petrov
  • 108.8k
  • 9
  • 264
  • 459

The following argument is very short, but bit tricky, so I remain it along with the previous answer.

Actually this sum quickly factorizes: using $\cos (x+y)+\cos (x-y)=2\cos x\cos y$ and denoting $(j+k)\cdot \frac{n+1}2=a,(j-k)\cdot \frac{n+1}2=b$ we get $$\cos 2\pi j/n+\cos 2\pi k/n=2\cos 2\pi a/n \cdot \cos 2\pi b/n.$$ Here $j, k, a, b$ may be considered as residues modulo $n$ ($\cos 2\pi a/n$ depends only on $a$ modulo $n$), and the map $(j,k)\mapsto (a,b)$ is bijective on $(\mathbb{Z}/n\mathbb{Z})^2$, thus $$ 2\sum_{j,k=0}^{n-1}\frac1{\cos 2\pi j/n+\cos 2\pi k/n}=\sum_{a,b=0}^{n-1}\frac1{\cos 2\pi a/n\cdot \cos 2\pi b/n}=\left(\sum_{a=0}^{n-1}\frac1{\cos 2\pi a/n}\right)^2. $$ It remains to calculate the sum $\sum_{a=0}^{n-1}\frac1{\cos 2\pi a/n}$. Denoting $\omega=e^{2\pi i/n}$ we get $$ \sum_{a=0}^{n-1}\frac1{\cos 2\pi a/n}=\sum_{a=0}^{n-1}\frac{2\omega^a}{1+\omega^{2a}}= \sum_{a=0}^{n-1}\frac{\omega^a+\omega^{(2n+1)a}}{1+\omega^{2a}}=\\ \sum_{a=0}^{n-1} (\omega^a-\omega^{3a}+\dots+(-1)^{(n-1)/2}\omega^{na}+\dots+\omega^{2na})=(-1)^{(n-1)/2}n, $$$$ \sum_{a=0}^{n-1}\frac1{\cos 2\pi a/n}=\sum_{a=0}^{n-1}\frac{2\omega^a}{1+\omega^{2a}}= \sum_{a=0}^{n-1}\frac{\omega^a+\omega^{(2n+1)a}}{1+\omega^{2a}}=\\ \sum_{a=0}^{n-1} (\omega^a-\omega^{3a}+\dots+(-1)^{(n-1)/2}\omega^{na}+\dots+\omega^{(2n-1)a})=(-1)^{(n-1)/2}n, $$ since the geometric progressions $\sum_{a=0}^{n-1} \omega^{ma}$ sums up to $$\sum_{a=0}^{n-1} \omega^{ma}=\begin{cases}0& \text{for}\, m\, \text{not divisible by}\, n\\ n& \text{for}\, m\, \text{divisible by}\, n. \end{cases}$$

The following argument is very short, but bit tricky, so I remain it along with the previous answer.

Actually this sum quickly factorizes: using $\cos (x+y)+\cos (x-y)=2\cos x\cos y$ and denoting $(j+k)\cdot \frac{n+1}2=a,(j-k)\cdot \frac{n+1}2=b$ we get $$\cos 2\pi j/n+\cos 2\pi k/n=2\cos 2\pi a/n \cdot \cos 2\pi b/n.$$ Here $j, k, a, b$ may be considered as residues modulo $n$ ($\cos 2\pi a/n$ depends only on $a$ modulo $n$), and the map $(j,k)\mapsto (a,b)$ is bijective on $(\mathbb{Z}/n\mathbb{Z})^2$, thus $$ 2\sum_{j,k=0}^{n-1}\frac1{\cos 2\pi j/n+\cos 2\pi k/n}=\sum_{a,b=0}^{n-1}\frac1{\cos 2\pi a/n\cdot \cos 2\pi b/n}=\left(\sum_{a=0}^{n-1}\frac1{\cos 2\pi a/n}\right)^2. $$ It remains to calculate the sum $\sum_{a=0}^{n-1}\frac1{\cos 2\pi a/n}$. Denoting $\omega=e^{2\pi i/n}$ we get $$ \sum_{a=0}^{n-1}\frac1{\cos 2\pi a/n}=\sum_{a=0}^{n-1}\frac{2\omega^a}{1+\omega^{2a}}= \sum_{a=0}^{n-1}\frac{\omega^a+\omega^{(2n+1)a}}{1+\omega^{2a}}=\\ \sum_{a=0}^{n-1} (\omega^a-\omega^{3a}+\dots+(-1)^{(n-1)/2}\omega^{na}+\dots+\omega^{2na})=(-1)^{(n-1)/2}n, $$ since the geometric progressions $\sum_{a=0}^{n-1} \omega^{ma}$ sums up to $$\sum_{a=0}^{n-1} \omega^{ma}=\begin{cases}0& \text{for}\, m\, \text{not divisible by}\, n\\ n& \text{for}\, m\, \text{divisible by}\, n. \end{cases}$$

The following argument is very short, but bit tricky, so I remain it along with the previous answer.

Actually this sum quickly factorizes: using $\cos (x+y)+\cos (x-y)=2\cos x\cos y$ and denoting $(j+k)\cdot \frac{n+1}2=a,(j-k)\cdot \frac{n+1}2=b$ we get $$\cos 2\pi j/n+\cos 2\pi k/n=2\cos 2\pi a/n \cdot \cos 2\pi b/n.$$ Here $j, k, a, b$ may be considered as residues modulo $n$ ($\cos 2\pi a/n$ depends only on $a$ modulo $n$), and the map $(j,k)\mapsto (a,b)$ is bijective on $(\mathbb{Z}/n\mathbb{Z})^2$, thus $$ 2\sum_{j,k=0}^{n-1}\frac1{\cos 2\pi j/n+\cos 2\pi k/n}=\sum_{a,b=0}^{n-1}\frac1{\cos 2\pi a/n\cdot \cos 2\pi b/n}=\left(\sum_{a=0}^{n-1}\frac1{\cos 2\pi a/n}\right)^2. $$ It remains to calculate the sum $\sum_{a=0}^{n-1}\frac1{\cos 2\pi a/n}$. Denoting $\omega=e^{2\pi i/n}$ we get $$ \sum_{a=0}^{n-1}\frac1{\cos 2\pi a/n}=\sum_{a=0}^{n-1}\frac{2\omega^a}{1+\omega^{2a}}= \sum_{a=0}^{n-1}\frac{\omega^a+\omega^{(2n+1)a}}{1+\omega^{2a}}=\\ \sum_{a=0}^{n-1} (\omega^a-\omega^{3a}+\dots+(-1)^{(n-1)/2}\omega^{na}+\dots+\omega^{(2n-1)a})=(-1)^{(n-1)/2}n, $$ since the geometric progressions $\sum_{a=0}^{n-1} \omega^{ma}$ sums up to $$\sum_{a=0}^{n-1} \omega^{ma}=\begin{cases}0& \text{for}\, m\, \text{not divisible by}\, n\\ n& \text{for}\, m\, \text{divisible by}\, n. \end{cases}$$

Source Link
Fedor Petrov
  • 108.8k
  • 9
  • 264
  • 459

The following argument is very short, but bit tricky, so I remain it along with the previous answer.

Actually this sum quickly factorizes: using $\cos (x+y)+\cos (x-y)=2\cos x\cos y$ and denoting $(j+k)\cdot \frac{n+1}2=a,(j-k)\cdot \frac{n+1}2=b$ we get $$\cos 2\pi j/n+\cos 2\pi k/n=2\cos 2\pi a/n \cdot \cos 2\pi b/n.$$ Here $j, k, a, b$ may be considered as residues modulo $n$ ($\cos 2\pi a/n$ depends only on $a$ modulo $n$), and the map $(j,k)\mapsto (a,b)$ is bijective on $(\mathbb{Z}/n\mathbb{Z})^2$, thus $$ 2\sum_{j,k=0}^{n-1}\frac1{\cos 2\pi j/n+\cos 2\pi k/n}=\sum_{a,b=0}^{n-1}\frac1{\cos 2\pi a/n\cdot \cos 2\pi b/n}=\left(\sum_{a=0}^{n-1}\frac1{\cos 2\pi a/n}\right)^2. $$ It remains to calculate the sum $\sum_{a=0}^{n-1}\frac1{\cos 2\pi a/n}$. Denoting $\omega=e^{2\pi i/n}$ we get $$ \sum_{a=0}^{n-1}\frac1{\cos 2\pi a/n}=\sum_{a=0}^{n-1}\frac{2\omega^a}{1+\omega^{2a}}= \sum_{a=0}^{n-1}\frac{\omega^a+\omega^{(2n+1)a}}{1+\omega^{2a}}=\\ \sum_{a=0}^{n-1} (\omega^a-\omega^{3a}+\dots+(-1)^{(n-1)/2}\omega^{na}+\dots+\omega^{2na})=(-1)^{(n-1)/2}n, $$ since the geometric progressions $\sum_{a=0}^{n-1} \omega^{ma}$ sums up to $$\sum_{a=0}^{n-1} \omega^{ma}=\begin{cases}0& \text{for}\, m\, \text{not divisible by}\, n\\ n& \text{for}\, m\, \text{divisible by}\, n. \end{cases}$$