The polynomial is called symmetric, if
The basic example of alternating polynomials is the Vandermonde polynomial which is defined as follows :
ν
ν=
Any alternating polynomial is a product of the Vandermonde polynomial and a symmetric polynomial.
Fundamental Theorem of Symmetric Polynomials
Any symmetric polynomial is a polynomial in elementary symmetric polynomials.
[1] K.H.Alzubaidy, Symmetric Polynomials by Maple, Maple Application Center, Abstract Algebra, June 8, 2105.
To generate power sum polynomials
arguments : list of variables L and power r.
psp:=proc(L,r);
add((L[i])^r,i=1..nops(L));
end proc;
Example
To generate elementary symmetric polynomials
Elementary symmetric polynomials in
arguments : list of variables L and index r.
esp:=proc(L,r)local f,i;
f:=product((x_-L[i]),i=1..nops(L));
simplify(coeff(f,x_,nops(L)-r))*(-1)^r;
Examples
It is the sum of all productsor r variables selected from n variables ( r≤ n) allowing repitition. It is a homogenous polynomial of degree r.
It contans
arguments : list of vaiables L and degree r
hp:=proc(V,n)local p,L,M,C,K,N;
p:=expand((add(h,h=V))^n);
L := [seq(op(i, p), i = 1 .. numbcomb(n+nops(V)-1,nops(V)-1))];
M := 2*Vector[row](L);
C := [seq(op(1, g), g = M)];
K := map(proc (x) options operator, arrow; 1/x end proc, C);
N := Vector[row](K);
sort(DotProduct(M, N),order=tdeg(V[]));
To generate Vandermonde's polynomials
argument : list of variables L
van:=proc(L);
sort((-1)^(nops(L)*(nops(L)-1)/2)* Determinant(VandermondeMatrix(L)),order=tdeg(L[]));
To generate alternating polynomials
A product of Vandermonde polynomial and symmetric polynomial
To check symmetric polynomials
This procedure is based on the following
Theorem
Let f 2C[
by G. Then f is symmetric if g depends only on
arguments : polynomial f and list of variables V.
symchk:=proc(f,V)local A,L,GL,B;
A:=[seq(a[i],i=1..nops(V))];
L:=[seq(esp(V, i), i = 1 .. nops(V))]-A;
GL:=Basis(L,tdeg(V[]));
B:=NormalForm(f,GL,tdeg(V[]));
if is (indets(B)subset convert(A,set)) then true;else false;fi;
To check alternating polynomials
is alternating if ν
arguments : polynomial f and list of variables V
altchk:=proc(f,V) local A,g,r;
g:=van(V);
r := NormalForm(f, [g], tdeg(V[]), 'Q');
Q;
if is(r,0)and is(symchk(Q[], V))then true;else false;fi;
To express a symmetric polynomial in terms of elementary symmetric polynomials
arguments : symmetric polynomial f, list of variables V and list of constants A representing elementary symmetric polynomials.
rep:=proc(f,V,A)local L,G,GL;
NormalForm(f,GL,tdeg(V[]));
To find the discriminant of a univariate polynomial(equation)
The discriminant of
argument : list of the coefficients C = [
disc:=proc(C) local n,E,V,L,f,GL;
n:=nops(C);
E:=[seq((-1)^(i-1)*C[i]/C[1],i=2..n)];
V:=[seq(x[i],i=1..n-1)];
L:=[seq(esp(V,i),i=1..n-1)]-E;
f:=(C[1])^(2*n-4)*(van(V))^2;
Linear equation ax+b=0
Quadratic equation a
Cubic equation a
Cubic equation
Quartic equation
Vandermonde polynomial =