### 5.12.2 Minimum polynomial of an algebraic number:pmin

The pmin command takes as argument an algebraic number, and an optional second argument of a variable name.
pmin returns the the monic polynomial of smallest degree with integer coefficents which has the algebraic number as a root. If there is a second argument, the polynomial will use that as a variable.
Input:

pmin(sqrt(2) + sqrt(3))

Output:

poly1[1,0,-10,0,1]

Input:

pmin(sqrt(2) + sqrt(3),x)

Output:

x^4-10*x^2+1

Note that (√2 + √3)2 = 5 + 2√6 and so ((√2 + √3)2 − 5)2 = 24, which can be rewritten as (√2 + √3)4 − 10 (√2 + √3)2 + 1 = 0.

Input:

pmin(sqrt(2) + i*sqrt(3))

Output:

poly1[1,0,2,0,25]

Input:

pmin(sqrt(2) + i*sqrt(3),z)

Output:

z^4+2*z^2+25

Input:

pmin(sqrt(2) + 2*i)

Output:

poly1[1,0,4,0,36]

Input:

pmin(sqrt(2) + 2*i,z)

Output:

z^4+4*z^2+36