Calculus – Limits and Continuity: Irrational and Rational Piecewise Function

calculusepsilon-deltalimits

I have noticed similar topics, but people seem to solving them with sequences which I have not learned yet.

I need to prove that the function:

$$f(x)=\begin{cases} x, & \text{ if $x$ is an irrational number }\\0 & \text{ if $x$ is a rational number }\end{cases}$$

is discontinuous at every irrational number using both the precise definition of a limit and the fact that every nonempty open interval of real numbers contains both irrational and rational numbers.

While I generally understand the $\epsilon-\delta$ definition, I'm having trouble applying it to this question and finding the appropriate epsilon to use.

Best Answer

Let $a$ be irrational, so $f(a)=a\ne0$. Let $\epsilon=|a|$ and assume there is $\delta>0$ such that $|f(x)-f(a)|<\epsilon$ for all $x$ with $|x-a|<\delta$. By the existence of rationals $x$ with $|x-a|<\delta$ (for example $x=\frac1n\lfloor n a\rfloor$ for $n\in\mathbb N$ with $n>\frac1\delta$) we arrive at a contradiction because for this $x$ we have $f(x)=0$ and hence $|f(x)-f(a)|\not<\epsilon$.