0

Let $g:\mathbb R \to\mathbb R$ and $h:\mathbb R \to \mathbb R$ be continous functions with $g(c) = h(c)$.

Define $f:\mathbb R \to \mathbb R$ by

$$f(x)= g(x), x \in \mathbb Q \\ f(x)= h(x), x \in \mathbb R -\mathbb Q$$

Prove that $f$ is continuous at $x=c$.

Since $g$ is continuous, $\forall \epsilon>0,\exists \delta_1>0$ such that $|x-c|<\delta_1 \implies |g(x)-g(c)|<\epsilon$

Since $h$ is continuous, $\forall \epsilon>0,\exists \delta_2>0$ such that $|x-c|<\delta_2 \implies |h(x)-h(c)|<\epsilon$

I'm not quite sure how to continue from this.

I'm thinking of setting $\delta = \min \{\delta_1,\delta_2\}$.

I don't think left and right limits would work because of the domain of $g$ and $h$.

Pagol
  • 364
Danxe
  • 1,695

1 Answers1

3

If $\delta = \min(\delta_1,\delta_2) > 0 $ your argument shows $|g(x) - g(c)| < \epsilon$ and $|h(x) - h(c)| < \epsilon$ if $|x-c| < \delta$. So if $x$ is such that $|x-c| < \delta$ and $x$ is rational then $|f(x) - f(c)| = |g(x) - g(c)| < \epsilon$ and you can easily complete the rest.

  • just to clarify the first inequality is $|g(x)-g(c)|<\epsilon$ right? and thanks for helping. just couldn't see this. – Danxe Aug 29 '16 at 05:20
  • You are correct. I will fix it. – Arin Chaudhuri Aug 29 '16 at 05:24
  • Interestingly enough, this function can be discontinuous at every other point -- if g and h are quite different. Not exactly related, but fun to observe. – Pagol Jan 23 '17 at 20:14