Generating polynomial base on the root of an equation

216 Views Asked by At

I want to write a program in Maple that can helps us to generate the polynomial with variables (for example a, b, c) if we know a, b, c are three roots of an equation.

Let me show an example of this program: Give $a,b,c$ are three root of $x^3-7x^2+14x-7=0$ then output the polynomial with $a,b,c$ (the degree of this polynomial maybe input by the user). For example I give the degree equal to 2, it may returns: $$f(a,b,c)=-ab+2ac+b^2-bc-c^2$$
where in $f(a,b,c)$ if we substitute $a,b,c$ by the root of $x^3-7x^2+14x-7=0$ by some order, it will equal to 0.

Moreover, I wish the generated-polynomial should not be symmetric. To be honest, in a large program I want to write is a sum of squares polynomial program. And this is one of the small steps of that program.

Thanks a lot!

2

There are 2 best solutions below

0
On

This is not an answer to the intended question, only an attempt to ascertain what the actual question was meant to be.

My current interpretation of the question looks as follows (using $\bar{x}$ as shorthand for $x_1,\ldots,x_m$) : We are given a polynomial $P(x)$ with roots $r_1,\ldots,r_m$. For a given $n$, we are seeking a polynomial $f(\bar{x})$ of degree $n$ such that $f(r_{\sigma(1)},\ldots,r_{\sigma(m)})=0$ where $\sigma$ is some permutation ("order") of indices $\{1,\ldots,m\}$.

If we ignore the requirement the degree of $f(x)$ being $n$ for a moment, there are two classes of simple solutions shown in the comments by another user:

  • $f(\bar{x}):=P(x_k)$ is equal to zero whenever $x_k=r_j$ for any index $j$, so it forms a valid solution.
  • If $Q(\bar{x})$ is any symmetric polynomial, one can find the explicit numeric value of $Q(\bar{r})$ via the fundamental theorem of symmetric polynomials. Thus, defining $f(\bar{x}):=Q(\bar{x})-Q(\bar{r})$ is another example of valid solution.

It is also clear that if $f(\bar{x})$ is a valid solution, then $f(\bar{x})g(\bar{x})$ is also a valid solution, for any polynomial $g$. Furthermore, both types of solutions presented above are not just equal to zero for some permutation $\sigma$ of the roots, but rather for any permutation of them and thus if $f_1(\bar{x})$ and $f_2(\bar{x})$ are two solutions, so is $f_1(\bar{x})+f_2(\bar{x})$.

However, these solutions might have some properties that the original poster intuitively wanted to exclude but didn't express this explicitly yet:

  1. Is the problem restricted to $m=3$, as suggested by the phrase "...if we know a, b, c are three roots of an equation..." at the very beginning of the question? If this indeed the case, the problem might be simpler than I made it.
  2. Is the output polynomial expected to be homogeneous (i.e. all terms having the same sum of exponents of the variables)? The example given indeed was. This requirement would pretty much rule out the polynomials of the forms described above; $Q(\bar{x})-Q(\bar{r})$ could only be homogeneous if it was constant, while $P(x_k)$ would have to be a monomial; which is not really an interesting case to look into.
  3. Is the condition "...polynomial should not be symmetric..." strong enough? A symmetric polynomial will be equal to zero for any permutation of the roots $\bar{r}$, but perhaps the phrase "...by some order..." was intended to also imply "...but not in every possible order..."? In other words, there would need to be at least one order (= permutation) of the roots when the polynomial is equal to zero but also at least one where it is non-zero? Again, the example given indeed satisfies this; three of the permutations result in zeroes, three in non-zeroes.
0
On

You can use the inverse process of Routh's algorithm to find such a polynomial.