# Prove that f is a constant function

1. Apr 9, 2013

### drawar

1. The problem statement, all variables and given/known data
Suppose that the function f:ℝ→ℝ is continuous on ℝ and $f\left( {r + \frac{1}{n}} \right) = f(r)$ for any rational number r and natural number n.
(i) Prove that for any rational r and natural numbers n and m, $f\left( {r + \frac{m}{n}} \right) = f(r)$.
(ii) Prove that f is a constant function

2. Relevant equations

3. The attempt at a solution

For part (i), I think we can just use induction on m:
Let P(m) be the statement that $f\left( {r + \frac{m}{n}} \right) = f(r)$, for any rational r and natural numbers n and m
The case when m=1 is given as a hypothesis, so no need to prove it.
Assume P(k) holds, i.e. $f\left( {r + \frac{k}{n}} \right) = f(r)$, then
$f\left( {r + \frac{k+1}{n}} \right) = f\left( {r + \frac{k}{n} + \frac{1}{n}} \right) = f\left( {r + \frac{k}{n}} \right) = f(r)$ => P(k+1) also holds. By principle of mathematical induction, P(m) holds.

Any hint on part (ii) is much appreciated, as I don't even know how to get started, thanks!

2. Apr 9, 2013

### haruspex

You'll need to use continuity, so how about supposing the negative (f(r) not equal to f(0) for some real r) and introducing a sequence of rationals converging to r?

3. Apr 9, 2013

### drawar

Thank you.
Oh continuity, that's exactly what our professor gave us as a hint :) But how do you know the proof of constant function involves continuity? Also, what theorem(s) are we gonna use here?

4. Apr 9, 2013

### haruspex

It's also a given fact about the function, which is a hint in itself.
Without a condition such as continuity, there doesn't need to be any relationship between the values a function takes at different points. Since the rationals are dense in the set of reals, continuity implies strong constraints on the relationship between the values at rational and irrational points.
Use the definition of continuity, obviously. Start by assuming the result is not true, i.e. there exists some real r for which f(r) ≠ c, where c is the value of f at all rational points. You then need to find a sequence of rationals converging to r - that's the interesting part. There may be some theorem you've been taught that helps with that, but it's not hard from first principles. Then apply the definition of continuity to this sequence and the result should drop out.

5. Apr 10, 2013

### drawar

Well finally something pops up in my mind.
By part (i), f(x)=c for some constant c and all rationals x. Suppose f is not a constant function, then there exists a real number r s.t f(r)≠c. By the Density Theorem, there exists a sequence (r_n) of rationals converging to r. Now since f is continuous on R,
$f(r) = f(\mathop {\lim }\limits_{n \to \infty } {r_n}) = \mathop {\lim }\limits_{n \to \infty } f({r_n}) = \mathop {\lim }\limits_{n \to \infty } c = c$
, which is a contradiction!. Hence f is a constant function.

6. Apr 11, 2013

Bingo.