$∀x∈\mathbb Q$, $f(x)≧0$ implies $∀x∈\mathbb R$, $f(x)≧0$

50 Views Asked by At

Let $f(x)∈\mathbb R[x]$ be polynomial over real number.

I think the following claim holds.

Claim

$∀x∈\mathbb Q$, $f(x)≧0$ implies $∀x∈\mathbb R$, $f(x)≧0$

I think this holds because of density of $\mathbb Q$ in $\mathbb R$.

My question

  1. Does this claim correct?
  2. Can we extend this statement to some general results?

Thank you in advance.

2

There are 2 best solutions below

0
On BEST ANSWER

The claim is true and the reason is simply because polynomials are continuous functions and because $\mathbb{Q}$ is dense in $\mathbb{R}$.

Assume that $f$ is continuous and $f(x)\geq0$ for all $x\in\mathbb{Q}$. Take $x\in\mathbb{R}$ and find a sequence $(q_n)\subset\mathbb{Q}$ s.t. $q_n\to x$ (because of density). Then $f(x)=\lim_n f(q_n)$ because of continuity. But $f(q_n)\in[0,\infty)$ for all $n$ and $[0,\infty)$ is closed so $f(x)\in[0,\infty)$, i.e. $f(x)\geq0$.

2
On

The claim is correct, and here is a generalisation : Let $f:I \to \mathbb{R}$ be a continuous function, where $I$ is an interval (can be open or closed). Let $\mathbb{R}=X \cup \mathbb{R} \setminus X$, where $X$ is dense in $\mathbb{R}$.

If $f(x) \geq 0$ for all $x \in (X \cap I)$, then $f(x) \geq 0$ for all $x \in I$.

The proof of this goes exactly as the proof in the answer JustDroppedIn just posted.