Symmetric polynomials in Maple?

In summary, the command "symmpoly" was introduced in version 4.0, but was removed in version 4.3. It is not available in version 4.0 or earlier. The symmetric polynomial for degree n, k = 0 .. n-1 can be obtained using the procedure P.
  • #1
mrbohn1
97
0
Does anyone know if it possible to generate elementary symmetric polynomials in Maple (I am using version 12), and if so, how?

I have scoured all the help files, and indeed the whole internet, but the only thing I have found is a reference to a command "symmpoly", which was apparently included in earlier versions, but does not seem to be available now.

Why would they delete this capability? Surely there must be a way to do this...any help much appreciated!
 
Physics news on Phys.org
  • #2
symmpoly is not what you want. It was introduced in 4.0, and removed in 4.3. Currently that feature is PolynomialTools[IsSelfReciprocal] ... since "self-reciprocal" is a better term than "symmetric" to describe polynomials like 2*x^3-4*x^2-4*x+2 . But it is not about elementary symmetric functions.

Why didn't they include it? I don't know. Maybe because it is easy to do yourself...

(-1)^k*coeff(expand((X-a)*(X-b)*(X-c)*(X-d)),X,4-k):

for example

(-1)^3*coeff(expand((X-a)*(X-b)*(X-c)*(X-d)),X,4-3);
b c d + a c d + a b d + a b c
 
  • #3
Thanks for the reply. I disagree it is easier to do it yourself than use a pre-programmed routine! However you're right that it is easy...I was just being lazy. In the end I gave up looking and did it like this (for elementary symmetric polynomials in the variables yi)

symmpoly:=proc(m,n);
S:={};
for i from 1 to m do
S:=S union {y};
od;
for k from 1 to n do
Tk:=choose(S,k);
s[k]:=sum(product(Tk[j],j=1..k),i=1..nops(Tk));
od;
end proc;

A bit more complicated than your version! I hadn't thought of utilizing the neat factorization.

Anyway, this was a good lesson for me: often it is much quicker to do something for yourself than to search for a quick a fix on google...
 
  • #4
Here's mine :smile:

P := proc (n, k)

(-1)^(n+k)*coeff(collect(expand(product(x-a, i = 1 .. n)), x), x, k)

end proc;

This gives the symmetric polynomials for degree n, k = 0 .. n-1
 
  • #5


I understand your frustration in trying to find a solution for generating elementary symmetric polynomials in Maple. Unfortunately, it seems that the "symmpoly" command was removed in version 12 and there is no direct replacement for it. However, there are still some workarounds that you can try.

One option is to use the "symmetricpolynomial" function in Maple, which allows you to specify the variables and the degree of the polynomial. Another option is to use the "symmetrize" command, which can be used to generate symmetric polynomials from a given set of variables.

Additionally, there are also packages and libraries available in Maple that can help with generating symmetric polynomials. You may want to explore the "symmetric" package or the "symmetricpolynomials" library, which can provide more advanced tools for working with symmetric polynomials.

It is unclear why the "symmpoly" command was removed in later versions of Maple, but it could be due to updates and improvements in the software. Regardless, I hope these alternatives can help you achieve your goals in generating symmetric polynomials.
 

1. What are symmetric polynomials and why are they important in Maple?

Symmetric polynomials are expressions that remain unchanged when their variables are permuted or swapped. They are important in Maple because they can simplify calculations and help identify patterns in data.

2. How do I create a symmetric polynomial in Maple?

To create a symmetric polynomial in Maple, you can use the symmetric function and list the variables you want to include in the polynomial. For example, symmetric(x, y, z) will create a symmetric polynomial in the variables x, y, and z.

3. Can I manipulate symmetric polynomials in Maple?

Yes, you can manipulate symmetric polynomials in Maple using various functions such as simplify, expand, and factor. These functions can help simplify or expand the polynomial expression.

4. How can I check if a polynomial is symmetric in Maple?

You can use the issymmetric function in Maple to check if a polynomial is symmetric. This function returns true if the polynomial is symmetric and false if it is not.

5. Are there any special properties of symmetric polynomials in Maple?

Yes, there are several special properties of symmetric polynomials in Maple. For example, they can be expressed as a sum of monomials, they can be factored into linear factors, and they satisfy certain recurrence relations. These properties can make it easier to work with symmetric polynomials in Maple.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
2K
  • Set Theory, Logic, Probability, Statistics
Replies
1
Views
774
  • Programming and Computer Science
Replies
2
Views
313
  • MATLAB, Maple, Mathematica, LaTeX
Replies
12
Views
1K
  • Special and General Relativity
Replies
20
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
Replies
6
Views
6K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
5K
Back
Top