0

could someone please explain to me the following question:

Let $f,g$ be continuous functions from $\mathbb{R}$ to $\mathbb{R}$ and suppose that $f(r) = g(r)$ for all $r \in \mathbb{Q}$. Is it true that $f(x) = g(x)$ for all $x \in \mathbb{R}$?

My claim is that it should be true since $f$ and $g$ are continuous from $\mathbb{R}$ to $\mathbb{R}$, so if $f(x) \neq g(x)$ for all $x \in \mathbb{R}$ then it cant be continuous on $\mathbb{R}$?

So, is my claim correct and if it is how am I supposed to prove it (please give me some hints) Also, if my claim is wrong, could you please explain to me as to why its wrong`

Thomas Russell
  • 10,425
  • 5
  • 38
  • 66

4 Answers4

1

Hint:

You might want to use the following facts:

  1. $f$ is continuous at $x$ if and only if for every sequence $x_n \to x$ we have $f(x_n)\to f(x)$.

  2. for every $x\in \mathbb R$ there exists a sequence $\{x_n\}\subseteq \mathbb Q$ such that $x_n \to x$.

Ludolila
  • 3,034
  • Thanks Ludolila, now I understand how to do this question – Bilal Junaidy Dec 14 '14 at 16:22
  • You're welcome, good luck! :) – Ludolila Dec 14 '14 at 16:23
  • I am having a little bit of trouble proving this. The sequential criterion says that for a sequences of (x_n) that converges to c, the sequence of f(x_n) converges to f(c). and by doing the same with g(x), and then concluding that g(c) = f(c) for all c in R c is any arbitary number in R – Bilal Junaidy Dec 14 '14 at 16:28
  • is that how I am supposed to do it or is there any other way – Bilal Junaidy Dec 14 '14 at 16:28
  • Yes, that's the idea! You start with an arbitrary number $c\in \mathbb R$, then pick a rational sequence $x_n\to c$, then apply the functions + the fact that $f(x_n)=g(x_n)$ for every element of the sequence. Also use the fact that the limit of a sequence is unique, and thus $f(c)=g(c)$... – Ludolila Dec 14 '14 at 16:31
0

Yes, the functions coincide :). If you wish, you can use the following fact from topology: if $f,g:X\to Y$, where $Y$ is Hausdorff ($X$ and $Y$ are topological spaces of course), are continuous, then the set $\{x\in X| \ f(x) = g(x)\}$ is closed in $X$. How to apply it here? Note that if $f(q) = g(q)$ for all rational $q$, then the set $\{x\in \mathbb{R}| \ f(x) = g(x)\}$ contains $\mathbb{Q}$ and at the same time must be closed... Hence it coincides with $\mathbb{R}$ (clearly $\mathbb{R}$ is Hausdorff)! ;)

If you don't want to use this fact from topology, you can proceed as follows. Take any $x\in\mathbb{R}\backslash\mathbb{Q}$. Take any sequence of rational numbers $\{q_n\}_{n\in\mathbb{N}}$ with $\lim_{n\to\infty} q_n = x$ (such sequence can clearly be chosen). Then according to your condition, $f(q_n) = g(q_n)$ for all $n$. Hence, $f(x) = f(\lim_{n\to\infty} q_n) = \lim_{n\to\infty} f(q_n) = \lim_{n\to\infty} g(q_n) = g(\lim_{n\to\infty} q_n) = g(x)$ (the first and the last equalities are due to continuity of $f$ and $g$...). And you're done.

C_M
  • 711
  • Hey C_M, I havent actually studied topology so I don't think I will be able to use your approach. Thanks for the help though. – Bilal Junaidy Dec 14 '14 at 16:17
  • I am trying to prove it a little differently – Bilal Junaidy Dec 14 '14 at 16:17
  • What I am trying to do is to show that | f(x) - g(x) | < Epsilon for all x in R and for all epsilion > o. Would that proof work? – Bilal Junaidy Dec 14 '14 at 16:18
  • but you've got to be careful, I mean, at first fix $x\in \mathbb{R}$. You want to show that $f(x) = g(x)$. It'll be true if you show as you've stated that $|f(x)-g(x)|<\varepsilon$ for any $\varepsilon >0$. To show this you use continuity of $f$ and $g$ and the fact that they coincide at rational points which can be found in arbitrarily small neighbourhoods of irrational points... – C_M Dec 14 '14 at 16:24
0

Assume there is some $x$ where $f(x)\neq g(x)$ Let $\epsilon=|f(x)-g(x)|/3$ Apply the definition of continuity-all the values at rational points within $\delta$ nearby can't be that close to $f(x)$ and $g(x)$

Ross Millikan
  • 374,822
0

Yes, they are equal on $\mathbb{R}$.

An easy way to see this is to note that for a continuous function $f$, and a sequence $x_n \rightarrow x$, it is the case that $f(x_n) \rightarrow f(x)$.

For every $x \in \mathbb{R}$, you can find a sequence of rationals $q_n \rightarrow x$. Since $f$ and $g$ are continuous, and $f(q_n) = g(q_n)$ for each $q_n$, it follows that $f(x) = g(x)$.


To prove that if $x_n \rightarrow x$ then $f(x_n) \rightarrow f(x)$;

Let $\epsilon > 0$.

Since $f$ is continuous, $\exists \delta > 0 $ s.t. $\lvert f(x) - f(y) \rvert < \epsilon$ whenever $\lvert x - y \rvert < \delta$.

Then as $x_n \rightarrow x$, $\exists N$ such that $\lvert x_n - x \rvert < \delta$ whenever $n > N$.

Hence whenever $n > N$ we have $\lvert f(x) - f(x_n) \rvert < \epsilon$, and therefore $f(x_n) \rightarrow f(x)$.

meta
  • 1,025