Let $f(x) = \begin{cases} 0 & \text{if $x$ is rational} \\ 1 & \text{if $x$ is irrational.} \end{cases}$
I want to show that $\lim_{x \to 0} f(x)$ does not exist. Suppose that $\lim_{x \to 0} f(x) = L$ for some real number $L$. This means that for all $\varepsilon > 0$, there exists a $\delta > 0$ such that $|f(x) - L| < \varepsilon$ for all $|x|<\delta$ with $x \in \mathbb R$. Since I wanted to prove the negation, I have to show that for all real numbers $L$, there exists an $\varepsilon > 0$ such that for all $\delta > 0$, there is a number $x \in \mathbb R$ such that $0 < |x|<\delta$ and $|f(x) - L|\ge \epsilon$.
I pick the case that $L=1$ for example, and I let $\varepsilon = 1/2$ and $\delta > 0$. Suppose that $\delta$ is irrational. In the case that $0 < \delta < 1$, if $x_0$ is irrational, then $f(x_0) = 1$ and so $|f(x_0) - L| = 0 < \epsilon$. This implies that $x_0$ cannot be an irrational number that satisfies $|f(x_0) - L| \ge \varepsilon$. So $x_0$ must be rational. The question is, how can I find a rational number $x_0$ such that $0 < x_0 < \delta$ for any arbitrary positive irrational number $\delta$ strictly less than one?
This has confused me a lot. Is there an easier way to prove that a limit does not exist? I've even tried doing a proof by contradiction, but that brings me to the same result.