0

Say one can add and multiply two algebraic numbers. Let there be an (real) algebraic number $A$, defined by a integer polynomial $\mathbb Z[x]$ a two rational endpoints which bracket the given root. Then, let there be another polynomial $p$, also in $\mathbb Z[x]$.

How does one compute the value of $p(A)$? I mean the procedure, does one employ Horner's scheme (multiplication and addition)? I'm asking because in general the degree of an algebraic number (i.e. of the defining polynomial) resulting from addition or multiplication grows quickly (I think it is degree(first number) $\times$ degree(second number) so perhaps using Horner's scheme grows the underlying polynomial too quickly? Or is it possible to factor the intermediate polynomial after each addition and multiplication?

In any case, are there other means than Horner's scheme find the polynomial value at a given algebraic point?

PS: Is it any simpler if one only needs to check whether the value is zero? What algorithm one uses in such case?

Thank you!

Edit: By "evaluating" $p(A)$ I mean to substitute $x$ in $p(x)$ by $A$.

PPS: when $p$ is integer polynomial of degree $m$ and the minimal polynomial of $A$ has degree $n$, what is the degree of the minimal polynomial of $p(A)$? Is it possible to bound its degree solely by $m$ and $n$?

minmax
  • 356
  • To check if the value is zero you would check whether the $\gcd$ of the two polynomials has $A$ as a root. To actually calculate $p(A)$ you can always reduce it to a polynomial expression in $A$ of degree strictly less than the degree of its minimal polynomial, then you calculate that as you would do for any other values. – dxiv Jun 20 '22 at 20:39
  • I understood the first part about checking for zero, thank you! The second part less so, unfortunately. Could you please explain it in bit more detail? By "reduce it to a polynomial expression in " you mean a multivariate polynomial? Something like $\mathbb Z[x][x]$, if such thing even exists? What I try to understand how is such an evaluation implemented or even more precisely, how long will it take for larger and larger degree of $p$ and $A$. – minmax Jun 20 '22 at 20:56
  • 2
    Let $a(x)$ be the minimal polynomial of $A$, then by Euclidean division $p(x) = q(x) a(x) + r(x)$ with $\deg r \lt \deg a$, and $p(A) = r(A)$. That said, it is not entirely clear what you mean by "evaluate" - actually calculate a numeric approximation of $p(A)$ vs. algebraic properties such as its minimal polynomial. – dxiv Jun 20 '22 at 21:05
  • By "evaluate" I mean to substitute $x$ in $p(x)$ by $A$. Almost like to "calculate a numeric approximation of $p(A)$", except I would like to calculate it precisely, rather than approximately. If one wants to "evaluate" an integer polynomial $p_0 + p_1x + p_2x^2 + ... + p_nx^n$ of degree $n$ at some integer point $x$ what one can do is to compute $p_0 + x(p_1 + x(p_2 + ... + x(p_{n-1} + xp_n) ... ))$. So I thought one does the same if $x$ was real algebraic number. But then I was afraid that the final degree of minimal polynomial would be too high. – minmax Jun 21 '22 at 06:09
  • 1
    For exact arithmetic I would use the method in dxiv's second comment. It is immune to the choice of the zero of the minimal polynomial $p(x)$, which is normally desirable. Of course, if you want to do arithmetic with zeros of different irreducible polynomials then it becomes necessary to identify the zero. For example, the choice of zero matters when you calculate the sum $\alpha+\beta$ and only know that $\alpha$ is a root of $x^2-2$ and $\beta$ is a root of $(x+1)^2-2$. Is that what you are really asking? – Jyrki Lahtonen Jun 21 '22 at 06:39
  • "calculate it precisely, rather than approximately" Define "precisely". Every numeric evaluation of an irrational has finite precision - arbitrarily high, yet finite. And it's not obvious why you think that $,A,$ being algebraic makes a difference. It's not necessarily easier to calculate $,\sqrt[5]{49} + 2 \sqrt[5]{7},$ with $100$ decimals than it is to calculate $\pi^2+2\pi$ with $100$ decimals. – dxiv Jun 21 '22 at 06:41
  • "the minimal polynomial of $A$ has degree $n$, what is the degree of the minimal polynomial of $p(A)$" $;$ At most $,n,$, lookup polynomial resultants. You can find a fully worked out example for $,n=3,$ in my answer to another question here. – dxiv Jun 21 '22 at 06:41
  • @JyrkiLahtonen I apologize for late reply. I'm sorry I don't quite follow: I do identify the zero of the other polynomial by the two rational endpoints and if the resulting polynomial contains more than one zero in the region I would have to refine the interval until it contains just one root. – minmax Sep 03 '22 at 06:17
  • @dxiv I apologize for late reply. There is a huge difference, I think. If the number was irrational not much can be done, as you say. But if it was algebraic, one could compute $p(A)$ exactly and by that I mean to obtain another polynomial with two rational endpoints enclosing just one root. I don't want to calculate 100 decimal places of that root, all I want is that polynomial and the end points. But I don't know how to compute that polynomial (other than by Horner's method) and what its degree is it going to have. – minmax Sep 03 '22 at 06:18
  • Hmm. I'm still not sure what you want to do. Or more precisely, what is the output you want? Reusing @dxiv's notation of $a(x)$ and $r(x)$. Do you want, as the output, the minimal polynomial of $r(A)$ together with a narrow defining interval? The point of polynomial division was that $r(A)=p(A)$. – Jyrki Lahtonen Sep 03 '22 at 07:40
  • @JyrkiLahtonen Yes, I would like to know how to compute the minimal polynomial of $p(A)$ and what degree it has to be (at most). I'm not sure what the idea behind the polynomial division is, is it to prove that $r(A) = p(A)$? In other words, I have $a(x)$ and $p(x)$ (both in $\mathbb Z[x]$) and would like to know the minimal polynomial of $p(A)$. – minmax Sep 03 '22 at 08:23
  • The point in dxiv's comment is that you can assume $\deg p(x)<\deg a(x)$. That's all. I'm still confused by you bringing up Horner when the problem really is to find the minimal polynomial of $r(A)$? That you can do by linear algebra (plus a bit extra to cater for the possibility that $r(A)$ generates a proper subfield of $\Bbb{Q}(A)$. Trivially. the minimal polynomial of $r(A)=p(A)$ has degree $<n$. – Jyrki Lahtonen Sep 03 '22 at 09:49
  • To determine the minimal polynomial of $p(A)$ you first calculate the remainders $r_k(x)$ of $p(x)^k, k=0,1,\ldots,n$ modulo $a(x)$. Then determine the solution space of the underdetermined homogeneous system of linear equations $$c_0r_0(x)+\cdots c_nr_n(x)=0.$$ If the solution space is 1-dimensional, then you normalize it by $c_n=1$. Otherwise find the solution with the longest string of zeros in the high degree end. You get a polynomial of degree $d$, $d\mid n$, by similarly setting $c_d=1, c_k=0, k>d$. This leaves you the problem of finding a suitable narrow interval. – Jyrki Lahtonen Sep 03 '22 at 12:14
  • @JyrkiLahtonen Thank you very much! As for bringing up Horner, I know one can add and multiply algebraic numbers so I thought I would do $p_0 + A(p_1 + A(p_2 + ... + A (p_{n−1} + A p_n) ... ))$ and factor and bracket after each operation. I hoped that would work as well, except for the method being a bit slow. – minmax Sep 03 '22 at 20:44

0 Answers0