# Math Help - continues prove question..

1. ## continues prove question..

there is a function f(x) which is continues
and every rational number "r" is its period of f(x)

prove that f(x)=const

??

2. Originally Posted by transgalactic
there is a function f(x) which is continues
and every rational number "r" is its period of f(x)

prove that f(x)=const

??
First let us establish a lemma. If $f$ is continuous at $c$ then there exists a neighborhood $(c-\delta,c+\delta)~~\delta>0$ such that for any $x_1,x_2\in (c-\delta,c+\delta)$ the following must be true, $|c-x_1|<|c-x_2|\implies|f(c)-f(x)|\leqslant|f(c)-f(x_1)|$.

Proof: Suppose the above is false, so that for any neighborhood of $c$ there exists points $x_1,x_2$ in that neighborhood such that $|x_1-c|<|x-c_2|$ and $|f(c)-f(x_1)|>|f(c)-f(x_2)|{\color{red}(*)}$. It is clear then from $\color{red}(*)$ that $|f(c)-f(x_1)|$ may be written as $|f(c)-f(x_2)|+e~~e>0$. So now in the definition of continuity choose $\varepsilon=|f(c)-f(x_1)|+d~~0 so there must exist a $\delta>0$ such that $|x-c|<\delta\implies |f(c)-f(x)|<\varepsilon$ but this is a conradiction since $|c-x_1|<|c-x_2|<\delta$ but $|f(c)-f(x_1)|=|f(c)-f(x_2)|+e>\varepsilon$

So now back to the problem. Let us talk about our function on an interval $[a,b]$. Let $c\in[a,b]$ and $f(c)=\xi$. So by the above lemma we must have that there is an interval such that $|c-x_1|<|c-x_2|\implies |\xi-f(x_1)|\leqslant|\xi-f(x_2)|$ with $x_1,x_2$ elements of that interval. Now let $x_2=c\pm r~~r\in\mathbb{Q}\implies f(x_2)=\xi$. So we must then have that $|c-x_1|<|c-x_2|\implies |f(c)-f(x_1)|\leqslant |\xi-\xi|=0$ or that $f(x_1)=\xi$. So for any point of $[a,b]$ there is a neighborhood such that $f=\xi$, thus we must have that $f=\xi~~\forall x\in[a,b]$

Note: I forgot to mention one important fact...this construction is possible that since no matter how small the neighborhood in question is it must contain at least one rational

3. Originally Posted by Mathstud28
First let us establish a lemma. If $f$ is continuous at $c$ then there exists a neighborhood $(c-\delta,c+\delta)~~\delta>0$ such that for any $x_1,x_2\in (c-\delta,c+\delta)$ the following must be true, $|c-x_1|<|c-x_2|\implies|f(c)-f(x)|\leqslant|f(c)-f(x_1)|$.
This lemma somehow tells that a continuous function is locally monotonous. This fails to be true... Think of $x\mapsto x\sin\frac{1}{x}$ for instance, at 0. It is continuous and it oscillates so the conclusion of the lemma can't be satisfied. The problem in the proof comes from the fact that there is no reason why $x_1,x_2$ would be in $[c-\delta,c+\delta]$. ( $\delta$ is defined given $x_1,x_2$)

There's much simpler (and correct): notice that for any rational $q$, since $f$ is $q$-periodic, $f(q)=f(0)$. In other words, $f$ is constant on $\mathbb{Q}$. Let's say $f(0)=c$. Now, let $x$ be any real number, rational or not. It is well known that there exists a sequence $(q_n)_n$ of rational numbers that converges toward $x$. Since $f$ is continuous, we conclude $f(x)=\lim_n f(q_n)=c$ (the sequence $(f(q_n))_n$ is constant, equal to $c$). qed.

4. Originally Posted by transgalactic
there is a function f(x) which is continues
and every rational number "r" is its period of f(x)

prove that f(x)=const

??
Originally Posted by Laurent
This lemma somehow tells that a continuous function is locally monotonous. This fails to be true... Think of $x\mapsto x\sin\frac{1}{x}$ for instance, at 0. It is continuous and it oscillates so the conclusion of the lemma can't be satisfied. The problem in the proof comes from the fact that there is no reason why $x_1,x_2$ would be in $[c-\delta,c+\delta]$. ( $\delta$ is defined given $x_1,x_2$)

There's much simpler (and correct): notice that for any rational $q$, since $f$ is $q$-periodic, $f(q)=f(0)$. In other words, $f$ is constant on $\mathbb{Q}$. Let's say $f(0)=c$. Now, let $x$ be any real number, rational or not. It is well known that there exists a sequence $(q_n)_n$ of rational numbers that converges toward $x$. Since $f$ is continuous, we conclude $f(x)=\lim_n f(q_n)=c$ (the sequence $(f(q_n))_n$ is constant, equal to $c$). qed.
Once I was asked a question by my professor in real analysis lesson, now I feel that it is very similar to this problem.
Let $f$ be a continuous function, if $f$ is of fixed value at irrational numbers, then $f$ takes that fixed value on rational numbers too, and hence it is a constant function.

5. Originally Posted by Laurent
This lemma somehow tells that a continuous function is locally monotonous. This fails to be true... Think of $x\mapsto x\sin\frac{1}{x}$ for instance, at 0. It is continuous and it oscillates so the conclusion of the lemma can't be satisfied. The problem in the proof comes from the fact that there is no reason why $x_1,x_2$ would be in $[c-\delta,c+\delta]$. ( $\delta$ is defined given $x_1,x_2$)

There's much simpler (and correct): notice that for any rational $q$, since $f$ is $q$-periodic, $f(q)=f(0)$. In other words, $f$ is constant on $\mathbb{Q}$. Let's say $f(0)=c$. Now, let $x$ be any real number, rational or not. It is well known that there exists a sequence $(q_n)_n$ of rational numbers that converges toward $x$. Since $f$ is continuous, we conclude $f(x)=\lim_n f(q_n)=c$ (the sequence $(f(q_n))_n$ is constant, equal to $c$). qed.
Uh, but $f:x\mapsto x\sin\left(\frac{1}{x}\right)$ is not continuous at zero. And I think I stated my Lemma wrong. It was meant to be that there exists a neighborhood of c such that there is a subset of that neighborhood that such that the above is true. Supposing that this suffices it still shows the result of the question and I believe it works for your example.

6. Originally Posted by Mathstud28
Uh, but $f:x\mapsto x\sin\left(\tfrac{1}{x}\right)$ is not continuous at zero.
It is continuous at 0 (provided that you define f(0)=0).

Originally Posted by Mathstud28
And I think I stated my Lemma wrong. It was meant to be that there exists a neighborhood of c such that there is a subset of that neighborhood that such that the above is true. Supposing that this suffices it still shows the result of the question and I believe it works for your example.
The "subset" would have to be highly disconnected for such a result to be true. In any case, such an elaborate result is not needed here, as Laurent's simple proof shows.

7. Sorry Opalg and transgalactic for the fallacious proof. I always make things harder than they are. How about this alternate proof (this is more for my curiosity then for the OP)

Suppose the claim is true and $f$ is constant. We must merely show that $f$ is differentiable everywhere and $f'=0$, in other words for all $x$ we must show that $\lim_{t\to x}\frac{f(t)-f(x)}{t-x}=0$. But now consider letting $t=x+ r~~r\in\mathbb{Q}$. So the above is equivalent to showing $\lim_{r\to{0}}\frac{f(x+r)-f(x)}{r}=0$ but $f(x+r)=f(x)$ so $\frac{f(x+r)-f(x)}{r}=0$ which finally in turn implies $\lim_{r\to0}\frac{f(x+r)-f(x)}{r}=0$

8. Originally Posted by Mathstud28
Sorry Opalg and transgalactic for the fallacious proof. I always make things harder than they are. How about this alternate proof (this is more for my curiosity then for the OP)

We must merely show that $f$ is differentiable everywhere and $f'=0$, in other words for all $x$ we must show that $\lim_{t\to x}\frac{f(t)-f(x)}{t-x}=0$. But now consider letting $t=x+ r~~r\in\mathbb{Q}$. So the above is equivalent to showing $\lim_{r\to{0}}\frac{f(x+r)-f(x)}{r}=0$ but $f(x+r)=f(x)$ so $\frac{f(x+r)-f(x)}{r}=0$ which finally in turn implies $\lim_{r\to0}\frac{f(x+r)-f(x)}{r}=0$
Just for your curiosity . There is one step that would require a justification: if $\lim_{r\to{0},\ r\in\mathbb{Q}}\frac{f(x+r)-f(x)}{r}$ exists, why would $\lim_{r\to{0}}\frac{f(x+r)-f(x)}{r}$ exist as well? This is quickly proved from the definition of the limit (cf. right below), but I think it should be underlined since this is where the continuity is needed, and thus this is the core of the proof.

Suppose that a continuous function $\psi$ on $\mathbb{R}\setminus\{0\}$ is such that $\lim_{r\to 0,\ r\in\mathbb{Q}} \psi(x)=\ell$. Let $\varepsilon>0$. There is $\delta>0$ such that if $|r|<\delta$ and $r\in\mathbb{Q}\setminus\{0\}$ then $|\psi(r)-\ell|\leq \varepsilon$. Now, if $|x|< \delta$ and $x\neq 0$, $x$ is a limit of non-zero rational numbers $r_n$ with $|r_n|<\delta$, so that $|\psi(x)-\ell|=\lim_n |\psi(r_n)-\ell|\leq \varepsilon$ (since this inequality holds for every $n$). This proves that $\lim_{x\to 0}\psi(x)=\ell$.

9. Originally Posted by Laurent
Just for your curiosity . There is one step that would require a justification: if $\lim_{r\to{0},\ r\in\mathbb{Q}}\frac{f(x+r)-f(x)}{r}$ exists, why would $\lim_{r\to{0}}\frac{f(x+r)-f(x)}{r}$ exist as well? This is quickly proved from the definition of the limit (cf. right below), but I think it should be underlined since this is where the continuity is needed, and thus this is the core of the proof.

Suppose that a continuous function $\psi$ on $\mathbb{R}\setminus\{0\}$ is such that $\lim_{r\to 0,\ r\in\mathbb{Q}} \psi(x)=\ell$. Let $\varepsilon>0$. There is $\delta>0$ such that if $|r|<\delta$ and $r\in\mathbb{Q}\setminus\{0\}$ then $|\psi(r)-\ell|\leq \varepsilon$. Now, if $|x|< \delta$ and $x\neq 0$, $x$ is a limit of non-zero rational numbers $r_n$ with $|r_n|<\delta$, so that $|\psi(x)-\ell|=\lim_n |\psi(r_n)-\ell|\leq \varepsilon$ (since this inequality holds for every $n$). This proves that $\lim_{x\to 0}\psi(x)=\ell$.
Thank you Laurent. Two of my books had proven this result and I did not know whether or not to include it. I should have been more prudent...thank you

10. Originally Posted by Laurent
This lemma somehow tells that a continuous function is locally monotonous. This fails to be true... Think of $x\mapsto x\sin\frac{1}{x}$ for instance, at 0. It is continuous and it oscillates so the conclusion of the lemma can't be satisfied. The problem in the proof comes from the fact that there is no reason why $x_1,x_2$ would be in $[c-\delta,c+\delta]$. ( $\delta$ is defined given $x_1,x_2$)

There's much simpler (and correct): notice that for any rational $q$, since $f$ is $q$-periodic, $f(q)=f(0)$. In other words, $f$ is constant on $\mathbb{Q}$. Let's say $f(0)=c$. Now, let $x$ be any real number, rational or not. It is well known that there exists a sequence $(q_n)_n$ of rational numbers that converges toward $x$. Since $f$ is continuous, we conclude $f(x)=\lim_n f(q_n)=c$ (the sequence $(f(q_n))_n$ is constant, equal to $c$). qed.
you say f(0)=c

why $(q_n)_n$ converges to x
x is a variable it is not a contstant to which the sequence could converge to
??

11. Of course I could be wrong so wait for Laurent or another senior member's confirmation, but what I think Laurent's solution points to is that if $f:X\longmapsto\mathbb{R}$ with $X\subset\mathbb{R}$ then $\lim_{x\to p}f(x)=q\Longleftrightarrow \lim_{n\to\infty} f(p_n)=q$ for all $p_n\subset X$ and $p_n\to p\qquad p_n\ne p$. Now using this result every number rational or irational is the limit of a sequence of rationals.

12. Originally Posted by transgalactic
you say f(0)=c

why $(q_n)_n$ converges to x
x is a variable it is not a contstant to which the sequence could converge to
??
I'm not sure I get what you mean.
In the proof, I wrote "Let $x$ be (...)" so that, from this point on, $x$ is fixed, you can think of it as a constant, and I am allowed to introduce a sequence converging to $x$. More specifically, I use the fact that any real number (hence for instance, $x$) is the limit of a sequence of rational numbers. Finally, since I chose $x$ to be any number, what I prove for $x$ holds for any number.