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 [Maple Math] ?

> restart;

> f:= a*x^3 + b*x^2 + c*x + d;

[Maple Math]

> g:= x^2 + x + 1;

[Maple Math]

> fg:=subs(x=g,f);

[Maple Math]

> gf:=subs(x=f,g);

[Maple Math]

> dif:=collect(gf-fg,x);

[Maple Math]
[Maple Math]

> c1:=coeff(dif,x^6);

[Maple Math]

> solve(c1);

[Maple Math]

a = 1 because f is cubic.

> a:= 1;

[Maple Math]

> c2:=coeff(dif,x^5);

[Maple Math]

> solve(c2);

[Maple Math]

> b:= 3/2;

[Maple Math]

> c3:=coeff(dif,x^4);

[Maple Math]

> solve(c3);

[Maple Math]

> c:= 21/8;

[Maple Math]

> c4:=coeff(dif,x^3);

[Maple Math]

> solve(c4);

[Maple Math]

> d:= 9/16;

[Maple Math]

the cubic polynomial [Maple Math] will commute with [Maple Math] .

THTS

Check this out.

> f := x^3+3/2*x^2+21/8*x+9/16; g :=x^2+x+1;

[Maple Math]

[Maple Math]

> simplify(subs(x=f,g)-subs(x=g,f));

[Maple Math]

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 [Maple Math] .

> restart;

> p:=x->x^2 + x + 1;

[Maple Math]

> q:=x->a*x^3 + b*x^2 + c*x + d;

[Maple Math]

> p(q(x));

[Maple Math]

> q(p(x));

[Maple Math]

> eq:=%%=%;

[Maple Math]
[Maple Math]

> expand(eq);

[Maple Math]
[Maple Math]
[Maple Math]

> sols:={a,b,c,d};

[Maple Math]

> solve(sols);

[Maple Math]

>

I conclude that there are no cubics that commute with [Maple Math] because the only solution to

p(q) = q(p), where p = [Maple Math] and q = [Maple Math] , 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 [Maple Math] .

> restart:

> f:=a*x^3+b*x^2+c*x+d;

[Maple Math]

> g:=x^2+x+1;

[Maple Math]

> fg:=subs(x=g,f);

[Maple Math]

> gf:=subs(x=f,g);

[Maple Math]

> dif:=collect(gf-fg,x);

[Maple Math]
[Maple Math]

> c6:=coeff(diff,x^6);

[Maple Math]

[Maple Math] is not equal to zero since it is the coefficient.Therefore try [Maple Math] .

Oops. Look carefully at what you have done.

> a:=1;

[Maple Math]

> c5:=coeff(diff,x^5);

[Maple Math]

here b is not equal to zero since it to is a coefficient.Therfore try b=1.

> b:=1;

[Maple Math]

> c4:=coeff(diff,x^4);

[Maple Math]

>

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 [Maple Math] , so therefore there does not exist a cubic polynomial that commutes with [Maple Math] .

Here again. right conclusion for wrong reason.