0

I am trying to prove that if $f$ and $g$ are continuous on $(a,b)$ and $f(x)=g(x)$, $\forall$ rational $x\in(a,b)$ then $f(x)=g(x)$, $\forall\;x\in(a,b)$.

The truth is, I don't even know how to go about this. Can anyone help me?

  • Go sequential. ${}$ – Arnaud Mortier May 04 '18 at 01:40
  • Possible duplicate of https://math.stackexchange.com/questions/38069/if-f-and-g-are-continuous-and-for-every-q-in-mathbbq-we-have-fq-g?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa – Theo C. May 04 '18 at 01:40
  • You only need to prove the equality for irrationals; let $x_n\to x$ be a sequence of rationals; so $f(x_n)=g(x_n)$. Taking limits and by continuity, we conclude $f(x)=g(x)$ – Prasun Biswas May 04 '18 at 02:00

2 Answers2

1

Suppose that $X$ is separated. The set $S=\{x:f(x)=g(x)\}$ is closed, if $f,g:(a,b)\rightarrow X$. To see this, consider $H(x)=(f(x),g(x))$, $H:(a,b)\rightarrow X\times X$, $S=H^{-1}(D)$ where $D=\{(x,x)\}$. The fact that $X$ is separated implies that $D$ is closed, $S$ is closed and contains a dense subset of $(a,b)$, we deduce that $S=(a,b)$.

1

Hint: Just think that $\bar{\mathbb{Q}}=\mathbb{R}$ and use the continuity of $f$ and $g$.

Hamit
  • 355