When does degree 1 polynomial commute? Let $f(x)$ be a polynomial of degree $>1$. When does linear polynomial $ax+b$, $a>0$  commute with f(x)?
Which means $f(ax+b)=af(x)+b$ commute? ($a=1, b=0$  obviously commute). Other than  this?
Note: "to commute" refers here to the composition of functions.
 A: Let $f$ be a polynomial of degree $n\geqslant 2$ with coefficient $c_k$:
$$f(x) = \sum_{k=0}^n c_kx^k$$
If $f(ax+b) = af(x) + b$, then for the highest coefficient $c_n$  this implies
$$c_na^nx^n = ac_nx^n ~\implies~ a^{n-1} = 1 ~\implies~ a=\pm1 \tag1$$
because $c_n\neq0$ and $a\neq0$, and assuming we are in $\Bbb R$.  If $n$ is even, then $a=1$. If $n$ is odd, then $a=\pm1$.
Similarly, for $c_{n-1}$ we get:
$$ c_{n-1}a^{n-1}x^{n-1} + c_nna^{n-1}bx^{n-1}= ac_{n-1}x^{n-1}$$
$$\stackrel{(1)}\implies  c_{n-1} + c_n n b = ac_{n-1}\tag2$$
Thus if $a=1$, then $c_nnb=0$ and therefore $b=0$.
If $a=-1$, then $n$ must be odd, and the condition for $f$ simplifies to $$f(-x+b) = -f(x) + b \tag 3$$
which means that the derivative of $f$ is mirror-symmetric to $x=b/2$:
$$f'(b-x) = f'(x)\tag 4$$
Consequently, any $f$ that satisfies (3) must be point-symmetric w.r.t. some point with $x$-coordinate $b/2$.  So let $p\neq0$ be an odd polynomial, i.e. $p(x)+p(-x) = 0$, and let
$$f(x) := p(x-b/2)+b/2 \tag5$$
Then it's easy to check that $f$ satisfies (3), and that $f$ is point-symmetric to $(x_0,y_0) = (b/2, b/2)$, i.e. $f$ satisfies
$$f(x_0-x) + f(x_0+x) = 2y_0$$
with $x_0=y_0=b/2$.
So all solutions to $f(ax+b) = af(x) + b $ are:

*

*$\quad a=1, b=0$ will commute with any polynomial.


*$\quad -x+b$ will commute with a polynomial $f$ iff $f$ is point-symmetric w.r.t $(b/2,b/2)$.
Other than that, there are no real solutions.
Notice that in case 2., when we have a point-symmetric polynomial w.r.t. some point $P=(x_0,x_0)$, then $b$ is uniquely determined as $b=2x_0$ because a polynomial of degree greater than 1 can have at most one symmetry.
A: As the accepted answer shows, we require either $a=1$, in which case $b=0$; or $a=-1$.
So suppose $a=-1$, and we are looking for functions $f$ that satisfy $f(b-x)=b-f(x)$. From here on, we can forget the requirement that $f$ is a polynomial. Define the function
$$g(x)=f\left(\frac{b}{2}-x\right)-\frac{b}{2}$$
Then $f(x)=\frac{b}{2}+g\left(\frac{b}{2}-x\right)$, and substituting this into the equation $f(b-x)=b-f(x)$ gives
$$g\left(-\frac{b}{2}+x\right)=-g\left(\frac{b}{2}-x\right)$$
In other words, $g$ is an odd function.
Therefore:

*

*given any odd function $g$, the function $f(x)=\frac{b}{2}+g\left(\frac{b}{2}-x\right)$ commutes with the linear polynomial $-x+b$;

*conversely, if a function $f$ commutes with the linear polynomial $-x+b$, then $f$ is of the form $f(x)=\frac{b}{2}+g\left(\frac{b}{2}-x\right)$ for some odd function $g$.

