# Using your Head is Permitted

## January 2015 solution

Curiously enough, functions satisfying all of the criteria not only exist,
but are common and far from esoteric.
Consider the function *f*(*x*)=*x*^{3}-5*x*.

The function is clearly continuous, because it is a polynomial.

It is clearly a surjection, because it is a continuous function that ranges
from -∞ to ∞, like any odd-degree polynomial.

It is not an injection, because from -sqrt(5/3) to sqrt(5/3) its derivative is
negative. (Elsewhere it is positive.) This means that all *f*(*x*)
values in the range between ± 10 sqrt(15)/9 have three separate
*x* values leading to them.

Because it is a polynomial, it is also closed in ℚ.

It is not a surjection when restricted to ℚ because, for example, it
can never take the value 1/2. To see this, suppose that some *p*/*q*
exists such that *f*(*p*/*q*)=1/2. This would indicate that
*p*^{3}/*q*^{3}-5*p*/*q*
= (*p*^{3}-5*p**q*^{2})/*q*^{3}
= 1/2. However, for this to be true, *q* must be even. Assuming
*p*/*q* is given in reduced form, this indicates that *p* is
odd. However, this would mean that
*p*^{3}-5*p**q*^{2} is odd, while
*q*^{3} is divisible by 8, so in reduced form this fraction must
have a denominator that is a multiple of 8. In particular, it cannot equal 1/2.

It is most interesting, however, to note that *g* is an injection. To
show this, let us assume to the contrary that two rationals exist that map to
the same value.

We will refer to these two values as *x*=*p*_{1}/*q* and
*y*=*p*_{2}/*q*, having assumed that we have already
brought them to a common denominator. (The forms presented here may therefore
not be fully reduced as individual rational numbers. However, we will assume
that they are reduced jointly, in the sense that we are using the minimum
possible *q* value.)

First off, note that if
*x*^{3}-5*x*=*y*^{3}-5*y*, then

*x*^{3}-*y*^{3}=5*x*-5*y*
(*x*^{2}+*xy*+*y*^{2})(*x*-*y*)=5(*x*-*y*)

*x*^{2}+*xy*+*y*^{2}=5,

where the last step follows from *x*≠*y*.
Multiplying both sides by *q*^{2}, we get that

*p*_{1}^{2}+*p*_{1}*p*_{2}+*p*_{2}^{2} ≡ 0 (mod 5),
which has as its only solution that both *p*_{1} and
*p*_{2} are divisible by 5. Unfortunately, when that is the case,
the value of *p*_{1}^{2}+*p*_{1}*p*_{2}+*p*_{2}^{2} divides by 25, so *q* must also
divide by 5.
This would indicate that the pair (*p*_{1}/*q*, *p*_{2}/*q*), as a pair, is not in reduced form, as all three integers
involved could have been divided by 5. This contradicts our minimality
assumption.

The function is therefore an injection over ℚ.

Q.E.D.

Back to riddle

Back to main page