restart;

with(combinat):

symMonomial := proc(test)

h := 0;

for i from 1 to nops(test) do

h[i] := choose(test,i);

od;

c := copy(test);

k := 0;

for k from 1 to nops(test) do

c[k] := 0;

for i from 1 to nops(h[k]) do

ki := 1;

for j from 1 to nops(h[k][i]) do

ki := ki*h[k][i,j];

od;

c[k] := c[k] + ki;

od;

od;

return c;

end proc;

sympoly := proc(test, number_of_roots)

with(combinat):

h := 0;

for i from 1 to nops(test) do

h[i] := choose(z,i);

od;

c := 0;

for k from 1 to nops(test) do

c[k] := 0;

for i from 1 to nops(h[k]) do

ki := 1;

for j from 1 to nops(h[k][i]) do

ki := ki*h[k][i,j];

od;

c[k] := c[k] + ki;

od;

od;

poly := x^number_of_roots;

for k from 1 to number_of_roots do

poly := poly + c[k]*x^(number_of_roots-k);

od;

end proc;

z := [x1, x2, x3, x4, x5, x6, x7, x8, x9, x10];

sigma := symMonomial(z);

f := expand(sigma[1]*sigma[2]);

f := expand(sigma[1]*sigma[1]); # two lambda value are the same

f := expand(sigma[1]*sigma[1]*sigma[1]); # three lambda value are the same

f := expand(sigma[1]^2+2*sigma[1]*sigma[2]+sigma[2]);

f := subs(x1=3, f);

f := subs(x2=2, f);

f := subs(x3=3, f);

f := subs(x4=4, f);

f := subs(x5=5, f);

f := subs(x6=6, f);

f := subs(x7=7, f);

f := subs(x8=8, f);

f := subs(x9=9, f);

f := subs(x10=lambda, f);

evalf(solve(f, lambda));

if degree(f) = 2 then

f := f + lambda^3;

evalf(solve(f, lambda));

end if:

how to convert above f back to matrix form such as

m := Matrix([[a1,a2,a3],[a4,a5,a6],[a7,a8,a9]]);

m-Matrix([[lambda,0,0],[0,lambda,0],[0,0,lambda]]);

m2 := Determinant(m-Matrix([[lambda,0,0],[0,lambda,0],[0,0,lambda]]));

after tested m2 can not be expressed in terms of shell like polynomial,

it seems that it is from symmetric polynomial and it is from a non-homogenous polynomial which homogenize with a lambda

if solve f for new eigenvalue,

can traditional eignvector method calculate new eigenvector for these new kind of eigenvalues method?

A*x = lambda*x