## A family of cyclic cubic polynomials

Trig functions are really cool. When it comes to how much I enjoy one topic in math versus another, there's a tradeoff in my mind between how simple a concept is to understand or motivate, versus how many non-obvious or surprising facts can be deduced about it. The definitions of the sine and cosine functions are super easy to state in terms of the lengths of arcs on a circle, and yet they satisfy a wealth of algebraic relationships that are difficult to see at a glance.

The first trig identities that I remember finding really baffling were the double-angle formulas. Once you understand the sum-angle formulas for the sine and cosine functions, there's a whole bestiary of strange trig identities that you can derive. In my experience, the weirder trig identities first cropped up as exercises in one of my high school precalculus classes, and then made a cameo in AP calculus where they were applied to trigonometric integrals.

And then, I came across a whole new tier of trig identities on the internet just when I thought I'd seen it all. This gem comes to mind: Knowing just the standard sum and product identities for the sine and cosine functions, you can probably sit down and prove this by brute force. Square the expression on the left, apply identities and shuffle terms around ad nauseam, and end up with the value $7/4$. At that point, you can use a bounding argument to argue that it must be the negative square root of $7/4$, rather than the positive one.

But this proof is no fun, and it's not very insightful. Besides, it's actually part of a whole family of tantalizing identies, such as this one: Trying to prove even individual identities in this family directly is an algebraic nightmare. To prove the whole family of identities in its generality, you might need to use some basic number theory and clever summation reindexing. It can be proven really elegantly using a bit of Galois Theory. The sums of sines in this family of identities are called Gauss sums.

These identities were amazing to me, and they still have a bit of a magical aura for me today. The fact that you need a little something special to prove these trig identities in their generality, like a bit of number theory or abstract algebra or Galois, rather than just the standard well-known algebraic identities, elevates them above the identities that you see in a precalculus class.

I won't prove anything about Gauss sums in this post, but instead I'll show how a family of sums of cosine values can be expressed as roots of irreducible cubic polynomials. For example, the number satisfies the identity This is probably the next-most complicated family of trig identities that you can derive, following Gauss sums. The technique I'll outline here can also be used to derive results about Gauss sums, but it's a bit more generalizable than the derivation of Gauss sum identities that I read in high-school, which only required some number-theoretic facts about quadratic residues and creative reindexing of finite summations.

Warning! To understand the rest of this post, you should be familiar with the Galois correspondence from Galois Theory, complex roots of unity, and basic facts about primitive roots modulo a prime number. If you aren't familiar with these things, my line of reasoning will probably lose you. But you can always "skip to dessert" and see some more examples of explicit polynomial identities satisfied by certain sums of cosines at the end of this post.

I was inspired to explore the questions that led to this blog post after I first learned about the Kronecker-Weber Theorem, which states that every Abelian extension of $\mathbb Q$ is contained in $\mathbb Q(\zeta_m)$ for some $m\in\mathbb N$, where $\zeta_m$ is a primitive mth root of unity. The proof of this theorem is still a little out of my league, but I thought that I could at least come up with some simple examples of Abelian extensions of $\mathbb Q$ and the cyclotomic extensions containing them. The simplest Abelian Galois group you could consider is $\mathbb Z_2$, and if you choose to explore how quadratic extensions of $\mathbb Q$ are embedded in cyclotomic extensions, it will lead you to results about Gauss sums. I chose instead to consider polynomials with Galois group $\mathbb Z_3$. These are the irreducible cubics with a square discriminant.

Since Kronecker-Weber tells us that any extension $\mathbb Q(\rho)/\mathbb Q$ with Galois group $\mathbb Z_3$ is contained in a cyclotomic field, we know that we can generate (all of the) examples by picking a modulus $m$ and finding intermediate extensions of $\mathbb Q(\zeta_m)/\mathbb Q$ with degree $3$. This extension has degree $\varphi(m)$, so it's necessary and sufficient that $3\mid \varphi(m)$ for there to exist an intermediate cubic extension. The easiest way to make this happen is to let $m$ be a prime of the form $6n+1$, so this is the case that we'll consider in the rest of the post. As a matter of fact, I think any cyclic cubic extension of $\mathbb Q$ is contained in $\mathbb Q(\zeta_m)$ for some prime $m$ of the form $6n+1$ with a single exception, namely the field which can also be described as the splitting field of the cyclic cubic Off the top of my head, I think that this can be proven to be the unique exception using the Structure Theorem for Abelian groups. But I won't work this out here, since my aim is to generate examples using fun algebraic tricks.

So let's consider the cyclotomic field $\mathbb Q(\zeta_q)$ where $q$ is a prime of the form $6n+1$. The Galois group of $\mathbb Q(\zeta_q)$ is isomorphic to the group of units $\mathbb Z_q^\times$, which has $\varphi(q) = q-1 = 6n$ elements, and the action of this group upon $\mathbb Q(\zeta_q)$ sends the unit $u\in \mathbb Z_q^\times$ to the automorphism of $\mathbb Q(\zeta_q)$ which maps $\zeta_q\mapsto \zeta_q^u$. It's a theorem that all groups of units of the integers modulo a prime number have a generator, that is, an element $g\in \mathbb Z_q^\times$ whose powers generate all elements of $\mathbb Z_q^\times$. Since there are $q-1 = 6n$ elements in $\mathbb Z_q^\times$, it follows that $g^3$ generates precisely one-third of these elements. In other words $\langle g^3\rangle \subset \langle g\rangle$ is a subgroup of index $3$.

Since the group of units $\mathbb Z_q^\times$ has order $q-1$ and is generated by $g$, it is isomorphic to the additive group $\mathbb Z_{q-1}$ or $\mathbb Z_{6n}$. The subgroup $\langle g^3\rangle$ is isomorphic to the additive group $\mathbb Z_{2n}$, included in $\mathbb Z_{6n}$ by the mapping $j\mapsto 3j$. Remember that the isomorphism $\mathbb Z_q^\times \simeq \text{Gal}(\mathbb Q(\zeta_q))$ is the mapping that sends $u\mapsto (\zeta_q\mapsto \zeta_q^u)$, which means that because $g$ generates $\mathbb Z_q^\times$, we can also say that $\sigma : \zeta_q\mapsto \zeta_q^g$ is an automorphism of $\mathbb Q(\zeta_q)$ that generates all of its automorphisms over $\mathbb Q$. By the Galois correspondence, it follows that the fixed field $\mathbb Q(\zeta_q)^{\langle \sigma^3\rangle}$ has Galois group $\mathbb Z_{6n}/\mathbb Z_{2n} \simeq \mathbb Z_3$ over $\mathbb Q$, which means that $\mathbb Q(\zeta_q)^{\langle \sigma^3\rangle}$ should be the splitting field of a cyclic cubic over $\mathbb Q$. So how can we explicitly determine a cyclic cubic polynomial yielding this fixed field as its splitting field?

We can start by deriving the most general possible expression for an element of $\mathbb Q(\zeta_q)^{\langle g^3\rangle}$, and then proceeding to compute the minimal polynomial of such an element not belonging to $\mathbb Q$. The most general element of $\mathbb Q(\zeta_q)$ takes the following form: since the powers of the root of unity $\zeta_q$ generate the cyclotomic field $\mathbb Q(\zeta_q)$. However, it will actually be more convenient in a moment for us to express the powers of $\zeta_q$ not in increasing order, but rather in increasing order of the powers of the generator $g$. That is, we will instead express the above number as Writing the powers in order of powers of the generator simply permutes the terms of the previous expression, but its utility becomes clear when we look at how the generating permutation $\sigma$ acts on the above expression. We have: that is, it cycles the coefficients $\alpha_0,\cdots,\alpha_{q-2}$. If we want to express an arbitrary element of the fixed field $\mathbb Q(\zeta_q)^{\langle \sigma^3\rangle}$, we need to impose the constraint that $\sigma^3\rho = \rho$. Since $\sigma$ cycles the coefficients $\alpha_0,\cdots,\alpha_{q-2}$, we have that $\sigma^3$ cycles them by three places, so that asserting $\sigma^3 \rho = \rho$ imposes precisely the following constraints upon the coefficients: In other words, there can only be three distinct coefficients among the coefficients $\alpha_0,\cdots,\alpha_{q-2}$. In fact, we might as well get rid of all of these parameters except for $\alpha_0,\alpha_1,\alpha_2$, since the rest of them are redundant for elements $\rho$ fixed by $\sigma^3$. If we group terms with the same coefficient, we find that $\rho$ is given by Recalling that $\sigma$ sends $\zeta_q\mapsto \zeta_q^g$, we could also write this as or, if we permit ourselves to abuse notation a little bit: There is actually some redundancy in this representation: it turns out that the parameter $\alpha_{q-1}$ is also superfluous, because rational numbers can still be obtained by setting $\alpha_{q-1}$ to zero and choosing $\alpha_0,\alpha_1,\alpha_2$ to all be equal to the same rational number. So really, it's enough to parametrize $\rho$ as follows: If $\rho$ is not a rational number, then it has two conjugates, namely $\sigma\rho$ and $\sigma^2\rho$. This means that its minimal polynomial is given by where the $\Sigma_i$ are the three elementary symmetric polynomials on three variables evaluated at $\rho$ and its conjugates: These expressions can be evaluated explicitly in terms of the parameters $\alpha_0,\alpha_1,\alpha_2$ for fixed $q$, but the algebra will be an absolute mess. One might try using software like Sage to do this, but I'm not going to bother. Instead, I'll compute a formula for these coefficients (and for the minimal polynomial) for a specific value of $\rho$, for the specific choice of parameters $\alpha_0 = 1$ and $\alpha_1 = \alpha_2 = 0$. This gives the equation

We aren't actually losing much generality by picking this specific $\rho$. Because $\mathbb Z_q^\times$ has a unique subgroup of index $3$, there is only one cyclic cubic subfield of the cyclotomic field $\mathbb Q(\zeta_q)$, and it is given by $\mathbb Q(\rho)$ for the above $\rho$. So if we find a formula for the minimal polynomial of $\rho$ in terms of $q$, we will have parametrized minimal polynomials for all possible cyclic cubic extensions of $\mathbb Q$ (save for the outlier obtained from $\mathbb Q(\zeta_9)$). What we won't have done is parametrized all possible minimal polynomials for all possible cyclic cubic extensions, since a given cyclic cubic extension can be expressed as the splitting field of many different polynomials. In particular, this means that given an arbitrary cyclic cubic polynomial, we won't be able to easily say which cyclotomic field $\mathbb Q(\zeta_q)$ contains it. (In general, this seems like a tricky problem, and I've also struggled with it for a while.)

Let's get down to business calculating the coefficients $\Sigma_i$. Some really beautiful symmetries can be used to simplify what otherwise look like very complicated double and triple sums. The coefficient $\Sigma_0$ is easy:

The conjugates $\rho,\sigma\rho,\sigma^2\rho$ partition the conjugates $\zeta_q^u$ of $\zeta_q$ according to the residue class of $\log_g(u)$ modulo 3. Adding them all together, we get the sum of all of the conjugates of $\zeta_q$, which can be computed as $-1$ using the fact that the minimal polynomial of $\zeta_q$ is $\Phi_q(x) = 1 + x + \cdots + x^{q-1}$. Computing the coefficient $\Sigma_1$ is a bit trickier:

Consider how the operator $\sigma^0 + \sigma^1 + \cdots + \sigma^{q-2}$ acts upon the elements of the basis ${\zeta_q^{g^0},\cdots,\zeta_q^{g^{q-2}}, 1}$ of $\mathbb Q(\zeta_q)$. For an irrational power of $\zeta_q$, the sum of its images under the various $\sigma^j$ will equal $-1$, by virtue of the fact that $\zeta_q$ is a root of the polynomial $1 + x + \cdots + x^{q-1}$, as discussed earlier. For the rational basis element $1\in\mathbb Q$, the image is $q-1$, since each $\sigma^j$ fixes this number and there are $q-1$ of these operators being summed. Thus, to completely simplify the above expression, it's enough to know how many of the terms $\zeta_q^{1+g^{3k+1}}$ are irrational powers of $\zeta_q$ (each of which will be transformed into $-1$) and how many of them are equal to one (each of which will be transformed into $q-1$).

In the group of units $\mathbb Z_q^\times$ with $q=6n+1$, if $g$ is a generator, then $g^{3n} = -1$, and furthermore this is the only power of $g$ congruent to $-1$ modulo $q$. Hence, in the above sum, the exponent $1+g^{3k+1}$ can never be zero, since $3k+1$ cannot be a multiple of $3$. Therefore the term $\zeta_q^{1+g^{3k+1}}$ is always an irrational power of $\zeta_q$, meaning that every term gets mapped to $-1$ by the operator $\sigma^0 + \sigma^1 + \cdots + \sigma^{q-1}$. There are $2n$ terms in total, hence:

The calculation of $\Sigma_2$ is the trickiest, and I don't actually have an explicit closed-form formula for it. Rather, I've been able to express its value in terms of the number of points on a certain algebraic curve over the finite field $\mathbb F_q^2$, which, if need be, can be computed by brute force search for small $q$. Here's my calculation:

Again, we are looking at the same operator $\sigma^0 + \sigma^1 + \cdots + \sigma^{q-2}$ that has a very simple action on the elements of the basis ${\zeta_q^{g^0},\cdots,\zeta_q^{g^{q-2}}, 1}$, applied to a sum of powers of $\zeta_q$. The above summation of powers of $\zeta_q$ has precisely terms. Thus, if exactly $m$ of these terms are equal to $1$ while the remaining $4n^2-m$ terms are irrational powers of $\zeta_q$, then the above expression evaluates to

We just defined $m$ to be the number of terms in the above sum of powers of $\zeta_q$ that equal $1$. That is, $m$ is the number of combinations of indices $0\leq j,k < (q-1)/3$ that make the exponent $1+g^{3j+1}+g^{3k+2}$ vanish modulo $q$. In other words, it is the number of solutions $j,k$ to the below equation, such that $3j+1$ and $3k+2$ are inequivalent modulo $q-1$: It is easy to show that this is also equal to one-ninth of the number of points on the following algebraic curve in $\mathbb F_q^2$: Thus, if we define $N$ as the number of points on this curve in $\mathbb F_q^2$, then we have that: So that our cyclic cubic is the following: Applying the substitution to this cubic transforms it into a depressed cubic with the same splitting field:

At long last, here are just a few examples of $\mathbb Z_3$ extensions of $\mathbb Q$ along with explicit cyclic cubic polynomials whose respective splitting fields they comprise. To compute the value of $N$, the number of points on our particular algebraic curve over $\mathbb F_q^2$, corresponding to each $q$, I just wrote a short list comprehension in Haskell enumerating the solutions by brute force.

 $q$ $n$ splitting field polynomial $7$ $1$ $\mathbb Q\big(\cos\frac{2\pi}{7}\big)$ $x^3 - 21x-7$ $13$ $2$ $\mathbb Q\big(\cos\frac{2\pi}{13}-\cos\frac{3\pi}{13}\big)$ $x^3 - 39x+65$ $19$ $3$ $\mathbb Q\big(\cos\frac{2\pi}{19}+\cos\frac{14\pi}{19} + \cos\frac{16\pi}{19}\big)$ $x^3 - 57x - 133$ $31$ $5$ $\mathbb Q\big(\cos\frac{\pi}{31}-\cos\frac{2\pi}{31}-\cos\frac{16\pi}{31} + \cos\frac{23\pi}{31} + \cos\frac{27\pi}{31}\big)$ $x^3 - 93x - 124$ $37$ $6$ $\mathbb Q\big(\cos\frac{2\pi}{37} -\cos\frac{9\pi}{37} - \cos\frac{15\pi}{37} + \cos\frac{16\pi}{37} -\cos\frac{17\pi}{37} - \cos\frac{25\pi}{37}\big)$ $x^3 - 111x + 407$

That's all for this post! If you would like a little follow-up puzzle, try using everything discussed above to compute explicit solutions to each of the following Eisenstein cubics in terms of the cosine function:

NOTE: thanks to my friend Haran Mouli for pointing out that this cubic analogue for Gauss sums is treated in Davenport's Multiplicative Number Theory (2nd ed) starting on page 21, where a relation to the number of solutions to a certain congruence is also derived. Davenport also discusses Kummer's Problem, which is essentially the problem of determining in what order the three conjugates $\rho,\sigma\rho,\sigma^2\rho$ fall on the real number line. (All of these cubics have three real roots by necessity, since an irreducible cubic over $\mathbb Q$ with complex roots must have Galois group $S_3$, so one may ask about their ordering.)