If $f(x)$ and $g(x)$ are continuous, and $f(x)<g(x)$ when $x$ is a rational number, is it true that $f(x)<g(x)$ $\forall x \in \mathbb{R}$?

100 Views Asked by At

I know that the result is true for non-strict inequality:

If $f(x)$ and $g(x)$ are continuous, and $f(x)\leq g(x)$ when $x$ is a rational number, then $f(x)\leq g(x)$ $\forall x \in \mathbb{R}.$

However, I am not sure if it still holds when $$\leq$$ is replaced by $$<$$ throughout.

3

There are 3 best solutions below

1
On BEST ANSWER

No, it is not true. Pick your favourite irrational number $\alpha$, and then let $$f(x)=-(x-\alpha)^2$$ $$g(x)=(x-\alpha)^2$$

(or just $f(x)=0$).

2
On

Consider $f(x)=0$ and $g(x)=x^2-2\sqrt2 x +2$.

0
On

With angles measured in radians take $h(x)=1 + \cos x$ so that $h\ge 0$ and all zeros are at irrational values of $x$.

Then for any continuous $f$ choose $g=f+h$, and you have equality at an infinite number of points.

Once you have an infinite number of points you can try playing with $\cos q(x)$ for various $q$ to bring the zeros closer together - I'll leave you to explore the possibilities.