Let $f$ be:
\begin{cases} 0 \space\space if\space\space x \in \mathbb Q \\ 1\space\space if \space\space x \notin \mathbb Q \\ \end{cases}
The question wants me to find any values $a$ such that $f$ is continuous at $x = a$. This was my proof:
Suppose $f$ is continuous, so $\lim\limits_{x\to a}f(x) = f(a)$. By $\varepsilon - \delta$ definition:
$\forall \varepsilon \gt 0 \space\space \exists\delta \gt 0$ such that $0\lt|x-a|<\delta$ $\implies$ $|f(x) - f(a)| \lt \varepsilon$. Considering $x \in (a-\delta, a + \delta)$ and that irrational numbers are dense in $\mathbb R$, let $x = x_0 \notin \mathbb Q$ and $a \in \mathbb Q$ so $|f(x_0) - f(a)| = |1 - 0| = |1| = 1\lt \varepsilon$.
I could set $\varepsilon = \frac 12$, so there would be $1 \lt \frac 12$ which is a contradiction. So there are infinitely many numbers $x$ inside the interval such that the distance between $f(x)$ and $f(a)$ is not less than $\varepsilon$.
There's the second case where $a \notin \mathbb Q$ and $x \in \mathbb Q$. So $|f(x) - f(a)| = |0 - 1| = |-1| = 1 \lt \varepsilon$ which is also a contradiction if I set $\varepsilon$ to be less than $1$.
But what if I let $\varepsilon = 2$, for example? Looking at the inequality, it would hold as $1\lt2$, or is it enough to prove that there's no number where $f$ is continuous due to the definition not being satisfied for any $\varepsilon$? And what if I choose $a$ and $x$ to be both rational or irrational numbers? $|f(x) - f(a)| = 0 \lt \varepsilon$. How can I be sure the proof is done?
Edit: my biggest doubt was about setting $a$ and $x$ being both rationals or irrationals at the same time, but it'd make a constant function, therefore, continuous, but it'd be continuous in it's own domain, right? After writing that proof, what I did, basically, was proving that there's no way it can't be continuous on $\mathbb R$ due to showing that there's always $0$ and $1$ "between" each other. Is that correct?
The definition of limit is that for any $\epsilon > 0$, there exists $\delta > 0$ such that whenever $0 < |x-a| < \delta$, then $|f(x) - L| < \epsilon$. The idea is that if there exists some choice of $\epsilon$ such that this condition cannot be satisfied, then the limit does not exist at $a$, because there is no neighborhood of $x$-values around $a$ for which the function's distance from $L$ is bounded by $\epsilon$. So by choosing $\epsilon = 1/2$, assuming the rest of your work is correct, and arriving at a contradiction, you have demonstrated that no limit $L$ can exist at $x = a$.