Galois group of irreducible cubic equation

You don't actually need to find the last root. Consider the field $\mathbb{Q}(\alpha)$, where $\alpha$ is any root of $f$. This field not only contains $\alpha$, but also $2- \alpha^2$ per the field axiom guaranteeing closure under addition / multiplication. Therefore, $f$ factors as $f(x) = (x-\alpha)(x-2+\alpha^2)g(x)$ over $\mathbb{Q}(\alpha)$. But we must have $\deg(g) = 1$, a linear factor, due to the fact that degrees add when taking a product of polynomials whose coefficients are in a field. Thus, the third root of $f$ is also in $\mathbb{Q}(\alpha)$, and it follows that this field is in fact the splitting field of $f$.

We have $[\mathbb{Q}(\alpha):\mathbb{Q}] = 3$. Finish up by applying the fact that the degree of the splitting field is equal to the size of $\operatorname{Gal}(f)$.


Some food for thought (which will trivialize a problem like this):

Let $f(x) \in \mathbb{Q}[x]$ be an irreducible cubic. The Galois group of $f$ is determined entirely by its discriminant $\displaystyle D = \prod_{i \neq j} (c_i - c_j)^2$, where the $c_i$'s are the roots of $f$. This value is itself determined by the coefficients of $f$ (see $\color{red}{\text{footnote}}$): we have $D = b^2c^2-4ac^3-4b^3d-27a^2d^2+18abcd$.

Claim: If $\sqrt{D} \in \mathbb{Q}$, then $\operatorname{Gal}(f) \cong A_3 \cong \mathbb{Z}_3$. Otherwise, if $\sqrt{D} \notin \mathbb{Q}$, then $\operatorname{Gal}(f) \cong S_3$.

Proof: Suppose that $\sqrt{D} \in \mathbb{Q}$. Because $\operatorname{Gal}(f)$ is the set of all automorphisms of the splitting field of $f$ that also fix $\mathbb{Q}$, it must be the case that $\displaystyle \sqrt{D} = \prod_{i \neq j} (c_i - c_j)$ is fixed by every such automorphism. Each element of $\operatorname{Gal}(f)$ is determined by its action on the roots of $f$, and notice that any permutation of these roots which decomposes into an odd number of transpositions will change the sign of $\sqrt{D}$. Thus, $\operatorname{Gal}(f)$ contains only even permutations, meaning it is a subgroup of $A_3$ (having at most $3$ elements). Adjoining any root of $f$ to $\mathbb{Q}$ yields an extension of degree $3$ because $f$ is irreducible, so it is forced that such an adjunction gives the splitting field, and in fact $\operatorname{Gal}(f) \cong A_3$.

Now suppose $\sqrt{D} \notin \mathbb{Q}$. Since $D \in \mathbb{Q}$, it follows that $\mathbb{Q}(\sqrt{D})/\mathbb{Q}$ is an extension of degree $2$. Consider the tower $\mathbb{Q} \subset \mathbb{Q}(\sqrt{D}) \subset \mathbb{Q}(\sqrt{D}, c_1)$, where $c_1$ is a root of $f$. We cannot have $c_1 \in \mathbb{Q}(\sqrt{D})$ because $c_1$ is an algebraic element of degree $3$. Therefore, $\mathbb{Q}(\sqrt{D}, c_1)$ is an extension of $\mathbb{Q}$ of degree $6$. Since the Galois group of an irreducible polynomial is a subgroup of the permutation group on its roots, we must have $\operatorname{Gal}(f) \subseteq S_3$. This constricts the degree of the splitting field to a maximum of $6$, and from this we can see that $\mathbb{Q}(\sqrt{D}, c_1)$ is the splitting field of $f$ with Galois group necessarily isomorphic to $S_3$.


Let's use this shortcut to verify our original work. With $f(x) = x^3 - 3x + 1$, we have $D = -4(1)(-3)^3 - 27(1)(1) = 81$, so $\sqrt{D} \in \mathbb{Q}$. Applying the theorem: $\operatorname{Gal}(f) \cong \mathbb{Z}_3$ as predicted.


$\color{red}{\text{Footnote}}$: This surprising fact—true regardless of the degree of the polynomial—is a consequence of the fundamental theorem of symmetric polynomials. The curious reader can refer to my post here for further discussion.


I'm fairly sure that Kaj Hansen's answer (+1) is the intended solution. If you want to say more, you can observe that if $\zeta=e^{2\pi i/9}$, and $u=\zeta+\zeta^{-1}=2\cos(2\pi/9)$, then $$ u^3-3u=(\zeta+\frac1\zeta)^3-3(\zeta+\frac1\zeta)=\zeta^3+\zeta^{-3}=-1. $$ By the doubling formula for cosines $$ u^2-2=2(2\cos^2(2\pi/9)-1)=2\cos(4\pi/9). $$ You can probably guess at this point that the third zero of your cubic is $2\cos(8\pi/9)$, doubling the angle again. Anyway, the splitting field is the field $\Bbb{Q}(u)=\Bbb{Q}(\zeta)\cap\Bbb{R}$.


This fits into a grander scheme. You saw that the splitting field $K$ is an abelian extension of $\Bbb{Q}$, and also a subfield of the ninth cyclotomic field $\Bbb{Q}(\zeta)$. Clearly all subfields of cyclotomic fields are abelian extensions of the rationals. The highly non-trivial converse, known as the Kronecker-Weber theorem, is that any abelian extension $K$ of $\Bbb{Q}$ is a subfield of some cyclotomic field. The smallest $f$ such that $K\subseteq \Bbb{Q}(e^{2\pi i/f})$ is called the conductor.

Therefore, given a polynomial with rational coefficients and an abelian Galois group, we are guaranteed the ability to write the roots in terms of roots of unity alone. Which roots of unity? The discriminant $d=81$ is a huge tip off. This is because the discriminant of a cyclotomic field $\Bbb{Q}(e^{2\pi i/p})$ has $p$ as its only prime factor. The formulas tying the discriminant of a subfield to that of its extensions then tell us that $p=3$ would be the only prime factor of the conductor.