# poly() gives polymonial, poly(a,b,c,d,x) gives a*x^3+b*x^2+c*x+d, poly(a_ and b_) gives x^2-a*x-b*x+a*b, where a and b are roots of polymonial ; poly(a_,b_,x_):=a*x+b; poly(a_,b_,c_,x_):=a*x^2+b*x+c; poly(a_,b_,c_,d_,x_):=a*x^3+b*x^2+c*x+d; poly(a_,b_,c_,d_,f_,x_):=a*x^4+b*x^3+c*x^2+d*x+f; poly(a_ and b_, x_) := x^2-a*x-b*x+a*b; poly(a_ and b_ and c_, x_) := expand((x-a)*(x-b)*(x-c)); poly(a_ and b_,c_, x_) := expand((x-a)*(x-b)*(x-c)); poly(a_ and b_ and c_,d_, x_) := expand((x-a)*(x-b)*(x-c)*(x-d)); poly(a_ and b_ and c_ and d_, x_) := expand((x-a)*(x-b)*(x-c)*(x-d)); poly(n_,x_):=sum(x^k,k,0,n); poly(0,x_):=1; poly(1,x_):=x; poly(a_):=poly(a,x);