MinimalPolynomial

WMA link


MinimalPolynomial[s, x]

gives the minimal polynomial in x for which the algebraic number s is a root.

FullSimplify
Numerator