Continuity and uniform continuity of $f(x)$ over $\mathbb Q$

195 Views Asked by At

Consider, the function $f:\mathbb Q\to \mathbb R$ defined by

$$f(x)=\begin{cases}1 &\text{ if, } x<\pi\\2 &\text{ if, } x>\pi\end{cases}$$

Show that, $f$ is continuous but NOT uniformly continuous..

Let, $\epsilon >0$ be arbitrary. Then, we can always find a $x>\pi$ and a $y<\pi$ such that $|x-y|<\delta$.

But, $|f(x)-f(y)|=|2-1|=1\not <\epsilon$.

So , $f$ is NOT uniformly continuous..

But I am unable to find that $f$ is continuous....

3

There are 3 best solutions below

2
On BEST ANSWER

Let $\varepsilon > 0,x \in \mathbb{Q}$ and define $\delta=|\pi-x|$. For $x<\pi$, if $|x-y|<\delta$ then $y<\pi$ so $|f(x)-f(y)|=|1-1|=0<\varepsilon$. Essentially the same thing happens when $x>\pi$. Note that the $\delta$ I chose here depends on $x$, and goes to zero when $x$ gets closer to $\pi$.

Also your proof that you don't have uniform continuity is not quite right. You should fix a $\varepsilon$, which should be less than $1$, say $\varepsilon=1/2$. Then let $\delta > 0$ be arbitrary and choose an $x$ so that the interval $(x-\delta,x+\delta)$ contains a point on the other side of $\pi$.

Still, +1 for showing your work.

0
On

Fix $x \in \Bbb Q$. Let $\epsilon > 0$. Take $\delta < |x-\pi|$. So, if $|x-y|<\delta$, we will have $f(y) = f(x)$, hence $|f(y)-f(x)| = 0 < \epsilon$. The idea of picking this $\delta$ is assuring that $y$ ends up in the "same side" of $\pi$ that $x$ is.

0
On

The only point of discontinuity is $\pi$ which is not the member of $\mathbb{Q}$, so you cannot give some $x \in \mathbb{Q}$ at which $f(x)$ has left hand and right limits different. Hence it is continuous.