Solution (source code)

= Solution

Modulo two the <polynomial> becomes $h=X^5+X^2+1$. It has neither zero nor one as a root. The only irreducible quadratic over $\mathbb F_2$ is $X^2+X+1$; modulo it, $X^3=1$ and $h\equiv1$. A reducible quintic has a factor of degree at most two, so $h$ is irreducible. It is also separable: $h'=X^4$, which is coprime to $h$. Thus the rational <polynomial> is irreducible, and its group $G\leq S_5$ is transitive.

Modulo three there is the exact factorization
$$
f=(X^2+1)(X^3+2X+1).
$$
The quadratic has no root. The cubic takes value one at each of $0,1,2$, so it too has no root and is irreducible. The two factors are distinct and coprime. The <Frobenius cycle type> therefore supplies an element with disjoint cycles of lengths two and three. Its cube is a single <transposition>.

A transitive action of prime degree is primitive: a block size divides five, so the only sizes are one and five. To finish without classifying all degree-five groups, apply the <primitive group with a transposition> argument. Form the graph of all conjugate <transpositions> in $G$. Its connected components are blocks, so it is connected. <Transpositions> along the edges of a connected graph generate every <transposition>: along a path, conjugating adjacent swaps yields the swap of its endpoints. Hence they generate $S_5$, and
$$
\boxed{\operatorname{Gal}(f,\mathbb Q)=S_5.}
$$