# A contest math problem

Let $P(x)$ be a polynomial with integer coefficients of degree $d>0$.

1. If $\alpha$ and $\beta$ are two integers such that $P(\alpha)=1$ and $P(\beta)=-1$, then prove that $|\beta -\alpha |$ divides $2$.
2. Prove that the number of distinct integer roots of $(P(x))^2-1$ is at most $d+2$.

First one is very easy. But I cannot understand how to prove the second one. I would appreciate any help.

• Just a clarification, does $P^2(x)$ mean $P(P(x))$ or $(P(x)) ^2$? May 5, 2016 at 7:23
• I remember this is an ISI entrance problem. Can you tell me which year? Then, I might be able to link you to the solution. May 5, 2016 at 7:30
• @Perth This might help. ISI B.Math 2007 Question number 5 May 5, 2016 at 7:35
• @Perth The second part does not look difficult. Suppose $P(x)=1$ has 6 or more distinct integer roots. Then we cannot have an integer root of $P(x)=-1$ because it would be more than a distance 2 from at least one of the roots of $P(x)=1$. That basic idea can easily be elaborated to a complete solution. May 5, 2016 at 7:43
• Since the solutions over at AoPS involve case checking, I would like to see an elegant solution for this, especially because the result is nice. May 5, 2016 at 8:05

The first part is obvious. Since $\alpha,\beta, P(\alpha)$ and $P(\beta)$ are all integers, $\mid \beta - \alpha \mid$ divides $\mid P(\beta) - P(\alpha) \mid = 2$.
For the second part, notice that $(P(x))^2-1=(P(x)+1)(P(x)-1)$. So, all the roots of those two polynomials would be a root of this polynomial. There are $2d$ such (not necessarily distinct) roots. Now, it's true for $d=1,2$ as $d+2 \geq 2d$. For $d \geq 3$, suppose there are more than $d+2$ such roots. So, there has to be at least $3$ roots of each of those two polynomials. It's not possible to have $6$ distinct integers such that any two of them are apart by $1$ or $2$. Hence, we cannot have more than $d+2$ distinct integer solutions.(thanks to @almagest) Imagine a numberline. WLOG, Let $P(a)=1$. Now, the $3$ integer roots of $P(x)=-1$ would have to be of the form $a \pm r, r=1 \text{or}\, 2$. It's easy to see that whatever integer we choose next, it'd differ by more than $2$ with at least one of these roots. Hence, we cannot have more than $d+2$ solutions.