0

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!

NKellira
  • 2,061
  • For a polynomial of degree $n$, how about $f(a,b,c)=(a+b+c+7)^n$? – David Jun 02 '23 at 07:36
  • Sir, I wish the 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. – NKellira Jun 02 '23 at 07:38
  • 3
    In that case I think you need to specify your question more clearly, so that people know what you really want. Otherwise you are basically asking people to guess what your question is, and that is not going to work out well. – David Jun 02 '23 at 07:40
  • Thanks for suggestion, I will edit it immediately. – NKellira Jun 02 '23 at 07:41
  • Then, would something like $a^{n - 1}(a + b + c + 7)$ work ? What are exactly the conditions you need on your polynomial ? – Cactus Jun 07 '23 at 08:28
  • Say you are given 5 as a degree as well as 5 values representing the roots of this polynomial below, what format do you want it written in? $x^5+x^4-x-1$ OR $(x-1)(x+1)^2(x^2+1)$? On a second point, I am not sure you can control whether the resulting polynomial is symmetric or not. – NoChance Jun 07 '23 at 13:16
  • I find it is hard to describe this more clearly, I can just say like my example, that is $f(a,b,c)=-ab+2ac+b^2-bc-c^2$, when $a,b,c$ are three root of $x^3-7x^2+14x-7=0$ by some order and then $f(a,b,c)\equiv 0.$, sorry for that. – NKellira Jun 10 '23 at 03:32
  • More, for example, if $a,b,c$ are three root of $x^3-7x+14x-1$ by some order then $f(a,b,c)=-2ab+ca+b^2+bc-c^2=0$ – NKellira Jun 10 '23 at 03:42
  • How about the followings? $f(a,b,c)=a^{n-1}(a+b+c-7)$ is not symmetric. (Cactus has a typo in $a^{n-1}(a+b+c+7)$) Another one is $f(a,b,c)=(a+b+c-7)^n+(ab+bc+ca-14)^{\lfloor n/2\rfloor}+a^3-7a^2+14a-7$. If $n=4$, then we have $f(a,b,c)=a^4 + 4 a^3 b + 4 a^3 c - 27 a^3 + 7 a^2 b^2 $$+ 14 a^2 b c - 84 a^2 b + 7 a^2 c^2 - 84 a^2 c$$ + 287 a^2 + 4 a b^3 + 14 a b^2 c - 84 a b^2 $$+ 14 a b c^2 - 168 a b c + 560 a b + 4 a c^3 - 84 a c^2$$ + 560 a c - 1358 a + b^4 + 4 b^3 c - 28 b^3 + 7 b^2 c^2 $$- 84 b^2 c + 294 b^2 + 4 b c^3 - 84 b c^2 + 560 b c$$ - 1372 b + c^4 - 28 c^3 + 294 c^2 - 1372 c + 2590$. – mathlove Jun 10 '23 at 12:38
  • Well I don't mean that, I think it's hard to describe what I mean, I think I should close this topic@ – NKellira Jun 10 '23 at 13:19
  • 1
    @NKellira Are there additional requirements missing from the question, for example homogeneity of $f$, or any degree in particular? Otherwise you could use for example the relation shown here, which is not symmetric in any pair of variables. – dxiv Jun 12 '23 at 02:21
  • I think we should close this topic, because it doesn't clear enough about my requirements and I don't know how to describe it exactly. Thank you for all of your comments! – NKellira Jun 17 '23 at 00:32

2 Answers2

1

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.
1

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

appliedSciences
  • 115
  • 1
  • 6