Factoring a polynomial over a number field

Consider a polynomial x^3-x-1 and let $$\alpha$$, $$\beta$$, $$\gamma$$ be three zeros of the polynomial where $$\alpha \in \mathbb{R}$$. Since $$\beta \not \in \mathbb{Q}[\alpha]$$ and the degree of the splitting field of the polynomial over $$\mathbb{Q}$$ is $$6$$, the minimal polynomial of $$\beta$$ over $$\mathbb{Q}[\alpha]$$ should be of degree $$2$$. To find the polynomial (by the way, I know it should be $$x^2+\alpha x+ \frac{1}{\alpha}$$.) I have coded the following

sol = x /. Solve[x^3 == x + 1, x];
al = sol[[1]];
be = sol[[2]];
ga = sol[[3]];
MinimalPolynomial[be, x, Extension -> al]


However, Mathematica returns an unexpected message;

What is wrong with the code? What would be a right way to get correct answer?

• Look at the roots of: x2+αx+1α. β is not among them. Oct 7, 2021 at 9:55
• @DanielHuber If you try "FullSimplify[be^2 + al be + 1/al]", you would get zero. Oct 7, 2021 at 10:29
• You are right. I only tried Simplify, but it needs FullSimplify. Oct 7, 2021 at 12:14
• In the vein of user64494's comment, FactorList[MinimalPolynomial[be][x], Extension -> al] seems to contain your polynomial (with $1/\alpha$ represented as $\alpha^2-1$). I wonder if there's a good way to identify it as what you want. Oct 8, 2021 at 3:13
• @thorimur Thanks for your careful comment. By the help of the paragraphs I got a better understanding. Oct 8, 2021 at 12:09

MinimalPolynomial[s, x, Extension->a] finds the characteristic polynomial of the element $$s \in \mathbb{Q}[a]$$ over the field $$\mathbb{Q}[a]$$.

https://planetmath.org/characteristicpolynomialofalgebraicnumber

As has been already suggested, you can get the minimal polynomial over a field extension using Factor(List).

In[7]:= minpoly[a_, e_, x_] :=
Select[First/@FactorList[MinimalPolynomial[a, x], Extension->e],
PossibleZeroQ[#/.x->a, Method->"ExactAlgebraics"]&][[1]]

In[8]:= minpoly[be, al, x]

2                      3                           3       2
Out[8]= -1 + x  + x Root[-1 - #1 + #1  & , 1] + Root[-1 - #1 + #1  & , 1]

• Many thanks for your valuable solution! Oct 12, 2021 at 13:47