# Minimal polynomial of 2cos(2pi/n)

In number theory, the real parts of the roots of unity are related to one-another by means of the minimal polynomial of $2\cos(2\pi /n).$ The roots of the minimal polynomial are twice the real part of the roots of unity, where the real part of a root of unity is just $\cos \left(2k\pi /n\right)$ with $k$ coprime with $n.$

## Formal definition

For an integer $n\geq 1$, the minimal polynomial $\Psi _{n}(x)$ of $2\cos(2\pi /n)$ is the non-zero monic polynomial of smallest degree for which $\Psi _{n}\!\left(2\cos(2\pi /n)\right)=0$.
For every n, the polynomial $\Psi _{n}(x)$ is monic, has integer coefficients, and is irreducible over the integers and the rational numbers. All its roots are real; they are the real numbers $2\cos \left(2k\pi /n\right)$ with $k$ coprime with $n$ and either $1\leq k<n$ or $k=n=1.$ These roots are twice the real parts of the primitive nth roots of unity. The number of integers $k$ relatively prime to $n$ is given by Euler's totient function $\varphi (n);$ it follows that the degree of $\Psi _{n}(x)$ is $1$ for $n=1,2$ and $\varphi (n)/2$ for $n\geq 3.$
The first two polynomials are $\Psi _{1}(x)=x-2$ and $\Psi _{2}(x)=x+2.$
The polynomials $\Psi _{n}(x)$ are typical examples of irreducible polynomials whose roots are all real and which have a cyclic Galois group.

## Examples

The first few polynomials $\Psi _{n}(x)$ are
    ${\begin{aligned}\Psi _{1}(x)&=x-2\\\Psi _{2}(x)&=x+2\\\Psi _{3}(x)&=x+1\\\Psi _{4}(x)&=x\\\Psi _{5}(x)&=x^{2}+x-1\\\Psi _{6}(x)&=x-1\\\Psi _{7}(x)&=x^{3}+x^{2}-2x-1\\\Psi _{8}(x)&=x^{2}-2\\\Psi _{9}(x)&=x^{3}-3x+1\\\Psi _{10}(x)&=x^{2}-x-1\\\Psi _{11}(x)&=x^{5}+x^{4}-4x^{3}-3x^{2}+3x+1\\\Psi _{12}(x)&=x^{2}-3\\\Psi _{13}(x)&=x^{6}+x^{5}-5x^{4}-4x^{3}+6x^{2}+3x-1\\\Psi _{14}(x)&=x^{3}-x^{2}-2x+1\\\Psi _{15}(x)&=x^{4}-x^{3}-4x^{2}+4x+1\\\Psi _{16}(x)&=x^{4}-4x^{2}+2\\\Psi _{17}(x)&=x^{8}+x^{7}-7x^{6}-6x^{5}+15x^{4}+10x^{3}-10x^{2}-4x+1\\\Psi _{18}(x)&=x^{3}-3x-1\\\Psi _{19}(x)&=x^{9}+x^{8}-8x^{7}-7x^{6}+21x^{5}+15x^{4}-20x^{3}-10x^{2}+5x+1\\\Psi _{20}(x)&=x^{4}-5x^{2}+5\end{aligned}}$

## Explicit form if n is odd

If $n$ is an odd prime, the polynomial $\Psi _{n}(x)$ can be written in terms of binomial coefficients following a "zigzag path" through Pascal's triangle:
Putting $n=2m+1$ and
    ${\begin{aligned}\chi _{n}(x):&={\binom {m}{0}}x^{m}+{\binom {m-1}{0}}x^{m-1}-{\binom {m-1}{1}}x^{m-2}-{\binom {m-2}{1}}x^{m-3}+{\binom {m-2}{2}}x^{m-4}+{\binom {m-3}{2}}x^{m-5}--++\cdots \\&=\sum _{k=0}^{m}(-1)^{\lfloor k/2\rfloor }{\binom {m-\lfloor (k+1)/2\rfloor }{\lfloor k/2\rfloor }}x^{m-k}\\&={\binom {m}{m}}x^{m}+{\binom {m-1}{m-1}}x^{m-1}-{\binom {m-1}{m-2}}x^{m-2}-{\binom {m-2}{m-3}}x^{m-3}+{\binom {m-2}{m-4}}x^{m-4}+{\binom {m-3}{m-5}}x^{m-5}--++\cdots \\&=\sum _{k=0}^{m}(-1)^{\lfloor (m-k)/2\rfloor }{\binom {\lfloor (m+k)/2\rfloor }{k}}x^{k},\end{aligned}}$
then we have $\Psi _{p}(x)=\chi _{p}(x)$ for primes $p$.
If $n$ is odd but not a prime, the same polynomial $\chi _{n}(x)$, as can be expected, is reducible and, corresponding to the structure of the cyclotomic polynomials $\Phi _{d}(x)$ reflected by the formula $\prod _{d\mid n}\Phi _{d}(x)=x^{n}-1$, turns out to be just the product of all $\Psi _{d}(x)$ for the divisors $d>1$ of $n$, including $n$ itself:
    $\prod _{d\mid n \atop d>1}\Psi _{d}(x)=\chi _{n}(x).$
This means that the $\Psi _{d}(x)$ are exactly the irreducible factors of $\chi _{n}(x)$, which allows to easily obtain $\Psi _{d}(x)$ for any odd $d$, knowing its degree ${\frac {1}{2}}\varphi (d)$. For example,
    ${\begin{aligned}\chi _{15}(x)&=x^{7}+x^{6}-6x^{5}-5x^{4}+10x^{3}+6x^{2}-4x-1\\&=(x+1)(x^{2}+x-1)(x^{4}-x^{3}-4x^{2}+4x+1)\\&=\Psi _{3}(x)\cdot \Psi _{5}(x)\cdot \Psi _{15}(x).\end{aligned}}$

## Explicit form if n is even

From the below formula in terms of Chebyshev polynomials and the product formula for odd $n$ above, we can derive for even $n$
    $\prod _{d\mid n \atop d>1}\Psi _{d}(x)={\Big\chi _{n+1}(x)+\chi _{n-1}(x){\Big )}.$
Independently of this, if $n=2^{k}$ is an even prime power, we have for $k\geq 2$ the recursion (see OEIS: A158982)
    $\Psi _{2^{k+1}}(x)=(\Psi _{2^{k}}(x))^{2}-2$,
starting with $\Psi _{4}(x)=x$.

## Roots

The roots of $\Psi _{n}(x)$ are given by $2\cos \left({\frac {2\pi k}{n}}\right)$, where $1\leq k<{\frac {n}{2}}$ and $\gcd(k,n)=1$. Since $\Psi _{n}(x)$ is monic, we have
    $\Psi _{n}(x)=\displaystyle \prod _{\begin{array}{c}1\leq k<{\frac {n}{2}}\\\gcd(k,n)=1\end{array}}\left(x-2\cos \left({\frac {2\pi k}{n}}\right)\right).$
Combining this result with the fact that the function $\cos(x)$ is even, we find that $2\cos \left({\frac {2\pi k}{n}}\right)$ is an algebraic integer for any positive integer $n$ and any integer $k$.

## Relation to the cyclotomic polynomials

For a positive integer $n$, let $\zeta _{n}=\exp \left({\frac {2\pi i}{n}}\right)=\cos \left({\frac {2\pi }{n}}\right)+\sin \left({\frac {2\pi }{n}}\right)i$, a primitive $n$-th root of unity. Then the minimal polynomial of $\zeta _{n}$ is given by the $n$-th cyclotomic polynomial $\Phi _{n}(x)$. Since $\zeta _{n}^{-1}=\cos \left({\frac {2\pi }{n}}\right)-\sin \left({\frac {2\pi }{n}}\right)i$, the relation between $2\cos \left({\frac {2\pi }{n}}\right)$ and $\zeta _{n}$ is given by $2\cos \left({\frac {2\pi }{n}}\right)=\zeta _{n}+\zeta _{n}^{-1}$. This relation can be exhibited in the following identity proved by Lehmer, which holds for any non-zero complex number $z$:
    $\Psi _{n}\left(z+z^{-1}\right)=z^{-{\frac {\varphi (n)}{2}}}\Phi _{n}(z)$

## Relation to Chebyshev polynomials

In 1993, Watkins and Zeitlin established the following relation between $\Psi _{n}(x)$ and Chebyshev polynomials of the first kind.
If $n=2s+1$ is odd, then
    $\prod _{d\mid n}\Psi _{d}(2x)=2(T_{s+1}(x)-T_{s}(x)),$
and if $n=2s$ is even, then
    $\prod _{d\mid n}\Psi _{d}(2x)=2(T_{s+1}(x)-T_{s-1}(x)).$
If $n$ is a power of $2$, we have moreover directly
    $\Psi _{2^{k+1}}(2x)=2T_{2^{k-1}}(x).$

## Absolute value of the constant coefficient

The absolute value of the constant coefficient of $\Psi _{n}(x)$ can be determined as follows:
    $|\Psi _{n}(0)|={\begin{cases}0&{\text{if}}\ n=4,\\2&{\text{if}}\ n=2^{k},k\geq 0,k\neq 2,\\p&{\text{if}}\ n=4p^{k},k\geq 1,p>2\ {\text{prime,}}\\1&{\text{otherwise.}}\end{cases}}$

## Generated algebraic number field

The algebraic number field $K_{n}=\mathbb {Q} \left(\zeta _{n}+\zeta _{n}^{-1}\right)$ is the maximal real subfield of a cyclotomic field $\mathbb {Q} (\zeta _{n})$. If ${\mathcal {O}}_{K_{n}}$ denotes the ring of integers of $K_{n}$, then ${\mathcal {O}}_{K_{n}}=\mathbb {Z} \left[\zeta _{n}+\zeta _{n}^{-1}\right]$. In other words, the set $\left\{1,\zeta _{n}+\zeta _{n}^{-1},\ldots ,\left(\zeta _{n}+\zeta _{n}^{-1}\right)^{{\frac {\varphi (n)}{2}}-1}\right\}$ is an integral basis of ${\mathcal {O}}_{K_{n}}$. In view of this, the discriminant of the algebraic number field $K_{n}$ is equal to the discriminant of the polynomial $\Psi _{n}(x)$, that is
    $D_{K_{n}}={\begin{cases}2^{(m-1)2^{m-2}-1}&{\text{if}}\ n=2^{m},m>2,\\p^{(mp^{m}-(m+1)p^{m-1}-1)/2}&{\text{if}}\ n=p^{m}\ {\text{or}}\ 2p^{m},p>2\ {\text{prime}},\\\left(\prod _{i=1}^{\omega (n)}p_{i}^{e_{i}-1/(p_{i}-1)}\right)^{\frac {\varphi (n)}{2}}&{\text{if}}\ \omega (n)>1,k\neq 2p^{m}.\end{cases}}$