3
$\begingroup$

$f: \mathbb{R} \to \mathbb{R}$ is continuous with $f(x)=0$ for all $x \in \mathbb{Q}$. Show that $f(x) = 0$ for all $x \in \mathbb{R}$.

Can anyone please point me in the right direction as to how I can go about answering this question?

$\endgroup$
4
  • $\begingroup$ Follows from Intermediate value property for derivative.. $\endgroup$ Commented May 17, 2015 at 15:38
  • 1
    $\begingroup$ @S.Panja-1729 what is the derivative got to do with it? A priori $f$ might not even be differentiable. $\endgroup$ Commented May 17, 2015 at 15:45
  • 1
    $\begingroup$ Sorry...!! It was a mistake...It should be continuity instead of differentiability $\endgroup$ Commented May 17, 2015 at 15:47
  • $\begingroup$ See also: math.stackexchange.com/questions/1570270/… $\endgroup$ Commented Dec 11, 2015 at 11:04

5 Answers 5

6
$\begingroup$

Hint: The rationals are dense in the reals (with the usual notion of distance), so for every real number $x$, there exists a sequence $(x_{k})$ of rationals converging to $x$.

$\endgroup$
3
$\begingroup$

Hint: by contradiction. Assume there is a value $x$ with $f(x)=a\neq 0$. Every open interval containing $x$ contains a rational number. Use continuity to conclude.

$\endgroup$
2
$\begingroup$

Assume $f(x_0)=y$ with $y\neq 0$. Then there is $\delta>0$ so that if $x\in (x_0-\delta,x_0+\delta)$ then $|f(x_0)-f(x)|<|y|\implies |y-f(x)|<|y|\implies f(x)\neq 0$

Of course this interval contains rational numbers. So if we pick $x$ rational in the interval we get $f(x)\neq 0$, a contradiction. The contradiction stems from assuming an $x_0$ with $f(x_0)\neq 0$ existed.

$\endgroup$
1
$\begingroup$

Assume that $$ \exists q \in \mathbb{R} \setminus \mathbb{Q} : f(q) \not = 0$$ Now by trichotomy we have either $f(q) > 0$ or $f(q) < 0$. If we consider the first case, by continuity of $f$ we have $$ \exists \delta > 0 : f(x) > 0 : x \in (q - \delta, q + \delta)$$ (Proving this is a very useful exercise in itself). Can you see what the contradiction is now in the above statement? Remember the hypothesis.

$\endgroup$
0
$\begingroup$

Let $X$ be a metric space, with a dense subset $D$. If $f\colon X\to \mathbb{R}$ and $g\colon X\to \mathbb{R}$ are continuous functions such that $f(x)=g(x)$ for all $x\in D$, then $f=g$.

Proof. Consider the function $h(x)=f(x)-g(x)$. Then $D\subseteq h^{-1}(\{0\})$ and $h^{-1}(\{0\})$ is a closed subset. Therefore $h^{-1}(\{0\})=X$.

In your case $X=\mathbb{R}$, $D=\mathbb{Q}$ and $g$ is the zero constant function.

$\endgroup$

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.