# Prove that $x$ is an integer if $x^4-x$ and $x^3-x$ are integers.

Given that $$x^4-x$$ and $$x^3-x$$ are integers. Prove that $$x$$ is an integer. Expanding, adding and subtracting the given expressions I can conclude that the followings are integers:$$x(x-1)(x+1)$$, $$x^3(x-1)$$, $$x(x-1)(x^2+x+1)$$ are integers. Could you help me solve the problem?

I will assume that $$x$$ is a priori living in some integral commutative ring, e.g. let's say $$x$$ is a complex number. It wouldn't be as easy (or as true) if $$x$$ were in some non-commutative or non-integral ring.

Write $$a = x^4 - x$$ and $$b = x^3 - x$$, which are integers by assumption.

We have

(1) $$x^4 - x - a = 0$$,

(2) $$x^3 - x - b = 0$$.

Subtracting $$x$$ times (2) from (1), we get

(3) $$x^2 + (b - 1)x - a = 0$$.

Subtracting $$(x - (b - 1))$$ times (3) from (2), we get

(4) $$(b^2 - 2b + a)x = a(b - 1) + b$$.

Now there are two possibilities.

Firstly, if $$b^2 - 2b + a = 0$$, then we must also have $$a(b - 1) + b = 0$$.

Substituting $$a = 2b - b^2$$, we get $$b^3 - 3b^2 + b = 0$$. But $$b$$ is an integer, so it must follow that $$b = 0$$.

Hence $$x^3 - x = 0$$, or $$x = 0, \pm 1$$, which are all integers.

Secondly, if $$b^2 - 2b + a \neq 0$$, then we may divide out and get $$x = \frac{a(b - 1) + b}{b^2 - 2b + a}$$. This means that $$x$$ is a rational number.

But $$x$$ is also a root of the polynomial $$P(X) = X^3 - X - b\in\mathbb{Z}[X]$$, so $$x$$ must be an integer, since $$\mathbb{Z}$$ is integrally closed.

Alternatively, a down-to-earth proof may work like this: write $$x = \frac{p}{q}$$ with $$p, q$$ integers and $$\gcd(p, q) = 1$$.

We then have $$x^3 - x = \frac{p^3 - pq^2}{q^3}$$, which is assumed to be an integer. This means $$q\mid p^3 - pq^2$$, or $$q\mid p^3$$.

But $$q$$ is prime to $$p$$, so the only possibility is $$q = 1$$.

Hence $$x = p$$ is an integer.