Page 1 of 1

Same functions over the set of rational numbers

Posted: Mon Dec 27, 2010 11:20 am
by Avik Roy
If two functions, both defined from R to R, take same values for each rational argument, they are equal. Need a proof of it.

Re: Same functions over the set of rational numbers

Posted: Mon Dec 27, 2010 12:24 pm
by nayel
It's false. Take
\[f(x)=\begin{cases}1\quad\text{if }x\in\mathbb Q\\
0\quad\text{otherwise}\end{cases}\]
and
\[g(x)=\begin{cases}1\quad\text{if }x\in\mathbb Q\\
2\quad\text{otherwise}\end{cases}\]

Re: Same functions over the set of rational numbers

Posted: Mon Dec 27, 2010 12:40 pm
by Avik Roy
Ooops, I forgot to mention. Its for continuous functions

Re: Same functions over the set of rational numbers

Posted: Mon Dec 27, 2010 4:31 pm
by tanvirab
It's a definition. The statement is the sum of the definition of continuous functions and the definition of real numbers.

Re: Same functions over the set of rational numbers

Posted: Mon Dec 09, 2013 12:51 pm
by abhisheksinha
On the contrary, assume that the functions $f$ and $g$ are different at some point $\alpha \in \mathbb{R}$. Take $\epsilon = |f(\alpha)-g(\alpha)| >0$.
Since $f$ and $g$ are continuous, there exists $\delta > 0$, such that $|f(x)-f(\alpha)|<\frac{\epsilon}{3}$ and $|g(x)-g(\alpha)|< \frac{\epsilon}{3}$, for all $|x-\alpha|<\delta$
Since the set of rational numbers $\mathbb{Q}$ is dense in $\mathbb{R}$, $\exists q \in \mathbb{Q}$ s.t. $|q-\alpha|<\delta$. Thus we note that
\begin{eqnarray}
&&\epsilon = |f(\alpha)-g(\alpha)| = |f(\alpha)-f(q)+g(q)-g(\alpha)| \leq |f(\alpha)-f(q)|+ |g(\alpha)-g(q)| \\
&<& 2\frac{\epsilon}{3}
\end{eqnarray}
Which is a contradiction !

Re: Same functions over the set of rational numbers

Posted: Tue Dec 10, 2013 4:57 pm
by Fm Jakaria
Suppose f and g are two such functions. Write L(A(n)), for some function A, whose domain is not bounded upside by some constant; to be the limit of A when n tends to infinity, where n belongs to the domain of A.
Define a function h from R to R, so that h(x) = f(x) - g(x). Then for all rational x, h(x) = 0.
Choose an arbitrary irrational E.
Again, define a function D as we want that satisfy the following conditions:
1) It's domain is the set of natural numbers, and range is the set of rationals.
2) D(n) < D(n+1) for all natural n.
3) L(D(n)) = E.
As both f and g are continuous, so is h. Now
h(E) = h(L(D(n))) = L(h(D(n))) = L(0) = 0.
Then f(E) = g(E). This concludes that f(x) = g(x) for all x, as desired.

Re: Same functions over the set of rational numbers

Posted: Thu May 10, 2018 1:14 pm
by CamilaBrant
After all, I can safely say that now I know all the basics functions it’s just down to the random details