# MMA has an error in calculating the minimum polynomial of a rational number

The minimum polynomial of Power[2, (3)^-1] (-(1/2) + (I Sqrt[3])/2) Python minimal_polynomial function can get the result as x^2 + 2^(1/3)*x + 2^(2/3) .(In Python ** means^)

import os
import sympy as sy
from sympy import minimal_polynomial, sqrt, solve, QQ, Rational
#Rational

from sympy.abc import x, y, z
s = minimal_polynomial (2 ** Rational (1,
3)*(Rational (-1, 2) +
Rational (1, 2)*3 ** Rational (1, 2)*sqrt (-1)), x,
domain = QQ.algebraic_field (2 ** Rational (1, 3)))
print (s)
print (sy.latex (s))


But MMA can't get the result.

MinimalPolynomial[Power[2, (3)^-1] (-(1/2) + (I Sqrt[3])/2), x,
Extension -> Power[2, (3)^-1]]

• This problem may be a bug of MMA.
– user69323
Jan 20, 2020 at 7:58
• I guess this is a fix: s0 = Power[2, (3)^-1] (-(1/2) + (I Sqrt[3])/2); a0 = Power[2, (3)^-1]; mpq = MinimalPolynomial[s0, x, Extension -> ToNumberField[{s0, a0}][[1, 1]]]; mpcandidates = FactorList[mpq, Extension -> a0]; Select[mpcandidates[[All, 1]], Simplify[# == 0 /. x -> s0] &] Jan 20, 2020 at 17:59
• This method is too complex. MMA should redefine and encapsulate this function. Jan 21, 2020 at 1:30

This is because MinimalPolynomial[s, x, Extension -> a] gives the characteristic polynomial of the algebraic number $$s$$ over the field $$Q[a]$$.
MinimalPolynomial[s, x, Extension ->a ] is equal to MinimalPolynomial[s, x]^d, where $$d$$ is the extension degree of $$Q[a]$$ over $$Q[s]$$. This requires that $$s$$ belong to $$Q[a]$$.
Unfortunately, the documentation page of MinimalPolynomial says differently. The following tutorial gives a correct specification: