Will this result for continuous functions hold with "$\ge 0$" replaced by "$>0$"?

84 Views Asked by At

Let $f: \mathbb{R} \rightarrow \mathbb{R}$ be continuous. If $f(x) \ge 0$ for every rational x, show that $f(x) \ge 0$ for all real $x$. Will this result hold with "$\ge 0$" replaced by "$>0$"? Explain.

My approach for the first part of the question:

Let us assume that $\exists \ x_{0} \in \mathbb{R}$ such that $f(x_{0}) < 0$. Since, f is continuous then for $\epsilon > 0 \ \exists \ \delta > 0$ such that $f(B_{\delta}(x_{0})) \subset B_{\epsilon}(f(x_{0})$. Now, there exists $y \in B_{\delta}(x_{0}) \cap \mathbb{Q} $ such that $f(y) \in B_{\epsilon}(f(x_{0})$ and particularly, $f(y) < 0$. Contradiction !

I am not sure about the second part. Kindly help me with the problems.

Thanks !

3

There are 3 best solutions below

0
On BEST ANSWER

Let's start with the example from the comment by Hagen:

Let $f: \Bbb R \to \Bbb R$ be given by $f(x)=(x^2-2)^2$.

Then $q \in \Bbb Q$ implies $q^2 - 2 \neq 0$ (as $\sqrt{2}$ is irrational!) and so $f(q) >0$ as the square of a non-zero real.

But $f(\sqrt{2}) = 0$ is not $ > 0$ .....

For the $\ge 0$ proof: $f^{-1}[[0,\infty)]$ is closed by continuity and contains $\Bbb Q$ so also $\overline{\Bbb Q}=\Bbb R$. QED.

2
On

Choose your $\epsilon =\vert f(x_0)/2 \vert$. In general the conclusion $f(y) <0$ is not justified in your case.

For the strict greater than 0, the take $r\in \mathbf{R}-\mathbf{Q}$ and f(X) = (x-r)^2. The function is greater than 0 at rational and 0 at r.

0
On

You can also prove the first part with sequences.

Let $x \in \Bbb{R}$

Then by density, $\exists x_n \in \Bbb{Q}$ such that $x_n \to x$

By continuity $0 \leq f(x_n) \to f(x) \Longrightarrow f(x) \geq 0$