3

$f,g: \mathbb{R} \to \mathbb{R}$

I'd like to see a sketch for this proof.

[sorry for posting errors, I am on a cell phone]

JohanLiebert
  • 1,207

4 Answers4

3

Suppose $h(x) = f(x) - g(x)$. Then $h(x)$ is continuous and $h(x) = 0$ if $x \in \mathbb{Q}$. Let $\alpha$ be irrational. If $h(\alpha) > 0$ then since it is continuous there is a neighborhood $I$ of $\alpha$ in which $h(x)$ is positive. Clearly this neighborhood also includes rational numbers at which $h(x) = 0$. This contradiction shows that we can't have $h(\alpha) > 0$. Similarly we can't have $h(\alpha) < 0$. Thus $h(\alpha) = 0$. So $h(x) = 0$ for all $x$.

1

Hint. For every real number $r$ there is a rational sequence $(q_n)$ such that $q_n\to r$ as $n\to\infty$. You can check that $f(q_n)=g(q_n)$ for all $n$. Take $n\to\infty$.

Hanul Jeon
  • 28,245
1

Different hint: Suppose there's an irrational $a$ such that $f(a) \neq g(a)$. Can they still be continuous at that point?

Arthur
  • 204,511
0

Do you know that a function $h(x)$ is continuous at $x_0=a$ if and only if for every sequence $x_n\to a$ it holds that $f(x_n)\to f(a)$?
If so, use the fact that for all $x\in \mathbb{R}$ there exists a sequence $\{q_n\}\subset\mathbb{Q}$ such that $q_n\to x$.
Now combine those two things.

Dennis Gulko
  • 15,920