Prove that $\sum\limits_{k=0}^{n-1}\dfrac{1}{\cos^2\frac{\pi k}{n}}=n^2$ for odd $n$

In old popular science magazine for school students I've seen problem

Prove that $\quad $ $\dfrac{1}{\cos^2 20^\circ} + \dfrac{1}{\cos^2 40^\circ} + \dfrac{1}{\cos^2 60^\circ} + \dfrac{1}{\cos^2 80^\circ} = 40. $

How to prove more general identity:

$$ \begin{array}{|c|} \hline \\ \sum\limits_{k=0}^{n-1}\dfrac{1}{\cos^2\frac{\pi k}{n}}=n^2 \\ \hline \end{array} , \qquad \mbox{ where } \ n \ \mbox{ is odd.}$$


Solution 1:

Whenever I see a problem like this, I think Chebyshev polynomials.

The Chebyshev polynomials of the first kind, $T_m(x)$, are defined so that:

$$T_m(\cos \theta) = \cos m\theta$$

$T_m$ is an $m$th degree polynomial, and the roots of $T_m(x)-1$ are exactly $\cos 2\pi k/m$ for $k=0,1,\dots,m-1$.

When $m=2n$ is even, we can write $$T_{2n}(x)=1+C\prod_{k=0}^{n-1}\left(x^2-\cos^2\frac{k\pi}{n}\right)$$ for some constant $C$. The occurrence of those $\cos^2\frac{k\pi}{n}$ suggested this might be a good approach.

Now, given a polynomial $p(x)=a_mx^m + a_{m-1}x^{m-1}\dots +a_0$, with non-zero roots $r_0,\dots, r_{m-1}$, we have formulas: $$\sum \frac{1}{r_k} = -\frac{a_1}{a_0}$$ And: $$\sum_{i< j} \frac{1}{r_ir_j} = \frac{a_2}{a_0}$$

So $$\sum \frac{1}{r_k^2} = \left(-\frac{a_1}{a_0}\right)^2 - 2\frac{a_2}{a_0}$$

Now let $p(x)=T_{2n}(x)-1$. The roots of $p$ are $r_k=\cos \frac{k\pi}{n}$ for $k=0,\dots,2n-1$, and the roots are non-zero since $n$ is odd. We know that $p(x)$ is even, so $a_1=0$. Finally, we know that $\sum_{k=0}^{2n-1} \frac{1}{r_k}^2$ is twice the sum that you are looking for.

So your sum is now reduced to finding $-\frac{a_2}{a_0}$ where the $a_0,a_2$ are coefficients of $p(x)$. Since $p(0)=T_{2n}(\cos \pi/2)-1 = \cos n\pi - 1 = -2$, so we know that $a_0=-2$. So $\sum r_k^{-2} = a_2$. (Again, we use $n$ odd here.)

So we need to prove that $a_2=2n^2$.

Now, $a_2=\frac{1}{2}T_{2n}^{''}(0)$. Let $f(x)=\cos 2nx = T_{2n}(\cos x)$. Differentiating we get:

$$-2n\sin 2nx = -T_{2n}^{'}(\cos x)\sin x$$

Differentiating both sides again:

$$-4n^2\cos 2nx = T_{2n}^{''}(\cos x)(\sin^2 x) - T_{2n}^{'}(\cos x)\cos x$$

Putting in $x=\pi/2$, then $\cos x=0$, $\sin x=1$, and $\cos 2nx=-1$. Therefore, we get $$4n^2 = T_n^{''}(0)\\a_n=\frac{1}{2}T_{2n}^{''}(0)=2n^2$$

and therefore your sum is $n^2$.


Note: Any symmetric rational function with rational coefficients of $\{\cos 2\pi k/n\mid k=0,\dots,n-1\}$ will be rational by this argument.

Solution 2:

I believe I first came across this trick in this paper by Szenes, so check out section 3 in that for more details.

Consider the form $$\mu_n(z) = n\frac{dz}{z} \frac{z^n + z^{-n}}{z^n-z^{-n}}$$ and the function $$f(z) = \frac{4}{(z+z^{-1})^2}.$$ Your sum is the sum of the $f(z_k)$, where $z_k = \exp(\pi i k/n)$, $k = 0, \dots, n-1$. Note first of all that for these particular values of $z$, $$f(z_k) = \mathop{\mathrm{Res}}_{z=z_k} f \mu_n.$$ Note also that the same formula holds with $z_k$ replaced by $z_k^{-1}$, and that $\mathop{\mathrm{Res}}_{z=\infty} f\mu_n = \mathop{\mathrm{Res}}_{z=0} f\mu_n = 0.$ Moreover, $\mathop{\mathrm{Res}}_{z= \pm i} f\mu_n = -n^2$. It follows from the residue theorem that $$\sum_{k=0}^{n-1} f(z_k) = -\frac{1}{2}\left(\mathop{\mathrm{Res}}_{z=i} f\mu_n + \mathop{\mathrm{Res}}_{z=-i} f\mu_n\right) = n^2.$$

Solution 3:

Since $n$ is odd, the numbers $u_k=\cos k\pi/n$ are the same as the numbers $\cos 2k\pi/n$, i.e. the distinct angles $\theta$ satisfying $n\theta=0$ (mod $2\pi$). We think of them as the roots of the equation $\cos n\theta=1$. Writing $$\cos n\theta = \cos^n\theta - \binom{n}{2}\cos^{n-2}\theta\sin^2\theta \cdots \pm n\cos\theta \sin^{n-1}\theta$$ and using $\sin^2\theta=1-\cos^2\theta$, we see that the $u_k$'s are the roots of the polynomial $$p(u)=u^n - \binom{n}{2}u^{n-2}(1-u^2) \pm n u(1-u^2)^{(n-1)/2} + 1.$$ Note that all powers of $u$ which occur are odd (except for the constant term). The reciprocals $1/u_k$ are the roots of the "reverse polynomial" $$r(u)=u^n p(1/u) = u^n + a_{n-1} u^{n-1} + \cdots,$$ where $a_{n-1}=\pm n$ and $a_{n-2}=0$.

The sum in question is the sum of the squares of the roots of $r(u)$, i.e. $a_{n-1}^2 - 2a_{n-2} = n^2$.