$f,g:\mathbb{R}\longrightarrow\mathbb{R}$
f,g are continuous functions. $\forall q\in\mathbb{Q}$ $f\left(q\right)\leq g\left(q\right)$
I need to prove that $\forall x\in\mathbb{R}$ $f\left(x\right)\leq g\left(x\right)$
$f,g:\mathbb{R}\longrightarrow\mathbb{R}$
f,g are continuous functions. $\forall q\in\mathbb{Q}$ $f\left(q\right)\leq g\left(q\right)$
I need to prove that $\forall x\in\mathbb{R}$ $f\left(x\right)\leq g\left(x\right)$
Pick $x\in\mathbb{R}\setminus\mathbb{Q}$.
Suppose $f(x)>g(x)$. Let $\varepsilon>0$ be less than the difference between $f(x)$ and $g(x)$. Then there exists $\delta>0$ such that if $w$ differs from $x$ by less than $\delta$, then $f(w)-g(w)$ differs from $f(x)-g(x)$ by less than $\varepsilon$. But some rational numbers are in the interval $(x-\delta,x+\delta)$, so we have a contradiction.
Hint: Note that if $(x_n)_{n\in\mathbb{N}}$ is a convergent sequence of real numbers and $f,g$ are continuous functions, $\lim\limits_{n\to\infty} f(x_n)=f(\lim\limits_{n\to\infty}x_n)$ and $\lim\limits_{n\to\infty} g(x_n)=g(\lim\limits_{n\to\infty}x_n)$, and that for any real number $x$ we have some sequence $(x_n)_{n\in\mathbb{N}}$ of rational numbers that converges to it. How can we manipulate limits to show that $f(x)=f(\lim\limits_{n\to\infty}x_n)\leq g(\lim\limits_{n\to\infty}x_n)=g(x)$?