Application Center - Maplesoft

# Alternating Polynomials by Maple

You can switch back to the summary page by clicking here.

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);
 > end proc;
 (1)

Example

 >
 (2)
 >

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;
 > end proc;
 (3)

Examples

 >
 (4)
 >
 (5)
 >
 (6)
 >
 (7)
 >
 (8)
 >
 >
 (9)
 >
 (10)
 >
 (11)
 >
 (12)
 >
 >
 (13)

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;
 > 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[]));
 > end proc;
 >
 (14)

Examples

 >
 (15)
 >
 (16)
 >
 (17)
 >

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[]));
 > end proc;
 (18)
 >

Examples

 >
 (19)
 >
 (20)
 >
 (21)
 >
 >
 (22)

To generate alternating polynomials

A product of Vandermonde polynomial and symmetric polynomial

Examples

 >
 (23)
 >
 (24)

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;
 >
 > end proc;
 (25)

Examples

 >
 (26)
 >
 (27)
 >
 (28)
 >
 (29)
 >
 (30)
 >
 (31)
 >
 (32)

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;
 > end proc;
 (33)

Examples

 >
 (34)
 >
 (35)
 >
 >
 (36)
 >
 (37)
 >
 >
 (38)
 >
 >
 (39)
 >
 (40)
 >
 (41)
 >
 (42)
 >
 >
 (43)
 >
 >
 (44)
 >
 (45)
 >
 (46)
 >
 (47)

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;
 > L:=[seq(esp(V, i), i = 1 .. nops(V))]-A;
 >
 > GL:=Basis(L,tdeg(V[]));
 > NormalForm(f,GL,tdeg(V[]));
 >
 > end proc;
 (48)
 >

Examples

 >
 (49)
 >
 (50)
 >
 (51)
 >
 (52)

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;
 > GL:=Basis(L,tdeg(V[]));
 > NormalForm(f,GL,tdeg(V[]));
 >
 > end proc;
 (53)

Examples

Linear equation  ax+b=0

 >
 (54)
 >

 >
 (55)

Cubic equation a

 >
 (56)
 >

Cubic equation

 >
 (57)

Quartic equation

 >
 (58)

Vandermonde polynomial =

 >