Given a polynomial $W(x)$. Find all pairs of integers $a,b$ that satisfy $W(a)=W(b)$ Given a polynomial $W(x) = x^4-3x^3+5x^2-9x$. Find all pairs of distinct integers $a,b$ that satisfy $W(a)=W(b)$. My approach was to factor the polynomial.
$$\begin{align*}
x^4-3x^3+5x^2-9x &= (x^4-3x^3+2x^2)+(3x^2-9x+6)-6\\
 &= x^2(x^2-3x+2)+3(x^2-3x+2)-6\\
&=(x-1)(x-2)(x^2+3)-6
\end{align*}$$
As $-6$ is a constant we can now consider the  following expression $$\\(x-1)(x-2)(x^2+3)$$ form this form we see that $(a,b)=(1,2)$ and $(a,b)=(2,1)$ satisfy the condition. We can also graph this function and see that $(1)$WLOG $a\ge 2$ and $b\le 1$ but as $1$ and $2$ have been used we get $a\ge 3$ and $b\le 0$. Now, if $|b|>|a|$ the following holds  $$\\(b-1)(b-2)(b^2+3)>(a-1)(a-2)(a^2+3)$$
So we get that $|a|>|b|$ and $(1)$.  How do I proceed? Any help appreciated.
 A: Some calculation of $W(a)-W(b) = 0$ give us :
$$(a+b)\Big((a+b)^2-2ab\Big) - 3\Big((a+b)^2-ab\Big) +5(a+b)-9=0$$
Let $x=a+b$ and $y=ab$ and we get $$(2x-3)y = x^3-3x^2+5x-9$$
Let $n=2x-3$ so $n$ is odd, then we have $ x\equiv_n {3\over 2}$ so  $$0 \equiv_n x^3-3x^2+5x-9 \implies 39\equiv_n 0 $$ so $$2x-1\mid 39 \implies x\in \{-1, 0,1, 2,-6,7,-19,20 \}$$
Now it is not difficult to get $y$ and then solve each of $8$ systems.
A: I would proceed from there as follows :
One can say that if $a\geqslant 3,b\leqslant 0$ and $|b|\color{red}{\geqslant}|a|$, then $$\\(b-1)(b-2)(b^2+3)>(a-1)(a-2)(a^2+3)$$
So one gets that $a\geqslant 3,b\leqslant 0$ and $|a|>|b|$.
Note that if $a\geqslant 3$ and $b\leqslant 0$, then $|a|\gt |b|$ is equivalent to $a+b\gt 0$.
One has
$$\begin{align}0&=(a-1)(a-2)(a^2+3)-(b-1)(b-2)(b^2+3)
\\\\&=(a - b) (a^3+ b^3 + a^2 b + a b^2 - 3 a^2 - 3 b^2- 3 a b + 5 a   + 5 b - 9)
\\\\&=(a-b)\bigg((a+b)^2(a+b-3)-ab(2(a+b)-3)+5(a+b)-9\bigg)\end{align}$$
So, if $a\geqslant 3,b\leqslant 0$ and $a+b\geqslant 3$, then
$$0=(\underbrace{a-b}_{\text{positive}})\bigg(\underbrace{(a+b)^2(a+b-3)-ab(2(a+b)-3)}_{\text{non-negative}}+\underbrace{5(a+b)-9}_{\text{positive}}\bigg)$$
where LHS is zero while RHS is positive, which is impossible.
So, if $a\geqslant 3,b\leqslant 0$ and $a+b\gt 0$, then $a+b=1$ or $2$.

*

*If $b=1-a$, then $0 = (2 a - 1) (a^2 - a + 6)$ has no integer solutions.


*If $b=2-a$, then $0 = (a - 3) (a - 1) (a + 1)$ implies $a=3$.
In conclusion, the answer is
$$(a,b)=(2,1),(1,2),(3,-1),(-1,3)$$
