I'd like to perform some elementary operations on algebraic numbers.
p1 = x^5 + 6*x^4 - 42*x^3 - 142*x^2 + 467*x + 422;
p2 = Expand[p1 /. {x -> ((x - 1)^2)}];
r1 = Root[{p2 /. x -> # &, 1 + 2.14850301089246970680618135585609253400250*I}];
r2 = Root[{p2 /. x -> # &, 1 + 2.87513448574410025133873802142153923543448*I}];
Timing[MinimalPolynomial[r1-r2]]
I'm trying to compare Mathematica's behavior to what I'm currently working on with Sage. In particular I'd like to see whether division r1/r2
takes much longer than r1+r2
, r1-r2
, r1*r2
.
But it turns out that Mathematica apparently isn't able to perform elementary arithmetic operations on these algebraic numbers at all. The above example fails with
MinimalPolynomial::nalg: "-Root[…]+Root[…] is not an explicit algebraic number."
Is there some formulation I can use to perform such computations? Or is Mathematica simply not up to this task?