Symmetric polynomials in Maple?

Click For Summary

Discussion Overview

The discussion revolves around generating elementary symmetric polynomials in Maple, specifically focusing on the capabilities of version 12 and the absence of a previously available command "symmpoly." Participants explore alternative methods and share their own implementations for calculating these polynomials.

Discussion Character

  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • One participant inquires about generating elementary symmetric polynomials in Maple and expresses frustration over the lack of documentation for the command "symmpoly."
  • Another participant clarifies that "symmpoly" was removed in version 4.3 and suggests using the command PolynomialTools[IsSelfReciprocal] instead, although they note it does not directly relate to elementary symmetric functions.
  • A different participant argues against the notion that creating a routine is easier than using a pre-programmed command, sharing their own implementation for generating elementary symmetric polynomials.
  • Another participant presents their own procedure for calculating symmetric polynomials, highlighting a different approach to the problem.

Areas of Agreement / Disagreement

Participants express differing opinions on the ease of generating symmetric polynomials manually versus using a built-in function. There is no consensus on the best method to achieve this, and multiple approaches are presented without resolution.

Contextual Notes

Participants' implementations vary in complexity and approach, indicating a range of methods available for generating symmetric polynomials. The discussion does not resolve the question of why certain features were removed from Maple.

Who May Find This Useful

Users of Maple interested in generating symmetric polynomials, particularly those using version 12 or earlier versions, may find the shared methods and insights beneficial.

mrbohn1
Messages
95
Reaction score
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
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
 
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...
 
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
 

Similar threads

Replies
2
Views
2K
Replies
3
Views
4K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 0 ·
Replies
0
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 12 ·
Replies
12
Views
3K
  • · Replies 6 ·
Replies
6
Views
6K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 2 ·
Replies
2
Views
405