A nice case study
Here are three attempts at the problem in the commuting polynomials worksheet which have interesting features. Read over the 'solutions' and discuss the errors. Which attempt is 'better'?
First attempt.
Is there a cubic polynomial that commutes with ?
> restart;
> f:= a*x^3 + b*x^2 + c*x + d;
> g:= x^2 + x + 1;
> fg:=subs(x=g,f);
> gf:=subs(x=f,g);
> dif:=collect(gf-fg,x);
> c1:=coeff(dif,x^6);
> solve(c1);
a = 1 because f is cubic.
> a:= 1;
> c2:=coeff(dif,x^5);
> solve(c2);
> b:= 3/2;
> c3:=coeff(dif,x^4);
> solve(c3);
> c:= 21/8;
> c4:=coeff(dif,x^3);
> solve(c4);
> d:= 9/16;
the cubic polynomial will commute with .
THTS
Check this out.
> f := x^3+3/2*x^2+21/8*x+9/16; g :=x^2+x+1;
> simplify(subs(x=f,g)-subs(x=g,f));
Hmmm! They don't commute. f(g) - g(f) is not 0. What is wrong?
Second attempt.
Problem : Is there a cubic polynomial that commutes with .
> restart;
> p:=x->x^2 + x + 1;
> q:=x->a*x^3 + b*x^2 + c*x + d;
> p(q(x));
> q(p(x));
> eq:=%%=%;
> expand(eq);
> sols:={a,b,c,d};
> solve(sols);
>
I conclude that there are no cubics that commute with because the only solution to
p(q) = q(p), where p = and q = , is a,b,c,d = 0, thus making q not a cubic.
Your conclusion is correct but your reasoning is not.
Third attempt.
Problem: Is there a cubic polynomial that commutes with .
> restart:
> f:=a*x^3+b*x^2+c*x+d;
> g:=x^2+x+1;
> fg:=subs(x=g,f);
> gf:=subs(x=f,g);
> dif:=collect(gf-fg,x);
> c6:=coeff(diff,x^6);
is not equal to zero since it is the coefficient.Therefore try .
Oops. Look carefully at what you have done.
> a:=1;
> c5:=coeff(diff,x^5);
here b is not equal to zero since it to is a coefficient.Therfore try b=1.
> b:=1;
> c4:=coeff(diff,x^4);
>
It is easy to see this pattern will continue, where all the coefficients must be equal to zero for the cubic polynomial to commute with , so therefore there does not exist a cubic polynomial that commutes with .
Here again. right conclusion for wrong reason.