5

Let $f$ be a continuous function $f:\Bbb Q\to \Bbb Q$. Does there exist a continuous function $g:\Bbb R\to \Bbb R$, such that restriction of $g$ to $\Bbb Q$ is $f$?

InsideOut
  • 6,883

1 Answers1

14

In general no. Consider the function $f:\mathbb{Q}\rightarrow \mathbb{Q}$ defined by $f(x)=\lfloor\pi (x^2+1)\rfloor$. $f$ cannot be extended to a continuous function from $\mathbb{R}\rightarrow \mathbb{R}$.

The function $\lfloor x \rfloor:\mathbb{R}\rightarrow \mathbb{R}$ is only discontinuous at integers. For any rational number $x$, as $\pi$ is an irrational number, $\pi(x^2+1)$ is not an integer. Hence $f$ is continuous at all rationals.

The function $f$ cannot be extended to $\mathbb{R}$, as we can find two sequences of rationals $s_n$ and $t_n$ converging to $\sqrt{\frac{4}{\pi}-1}$ such that $\lim_{n\rightarrow \infty}f(s_n)=3$ and $\lim_{n\rightarrow \infty}f(t_n)=4$. Hence any extension of $f$ will be discontinuous at $\sqrt{\frac{4}{\pi}-1}$.

Sai Teja
  • 819