I have trouble proving discontinuity of the Dirichlet function, using the $\epsilon-\delta$ approach. 

The function is defined as follows:
$$ f(x) = \left\{\begin{array}{l l} 1 &\text{if }x \in \mathbb{Q} \\ 0 & \text{if } x \notin \mathbb{Q} 
\end{array} \right. $$

Would it do any good showing the discontinuity at some $x\_0$, by bifurcating the problem into two cases, one where $x\_0$ is rational and one where it isn't?

The above function isn't continuous anywhere, but let's look at one that is continuous at only one point in its entire domain:

$$ f(x) = \left\{\begin{array}{l l} 0 &\text{if }x \in \mathbb{Q} \\ x & \text{if } x \notin \mathbb{Q} 
\end{array} \right. $$

I can see that this function is continuous at 0 alone, but once again, not able to show it rigorously by picking an appropriate $\epsilon$.

**How should I go about investigating the continuity of such "weird" functions, using $\epsilon-\delta$ arguments?** I'm sure there are many more to add to my troubles, such as [Thomae's function](https://en.wikipedia.org/wiki/Thomae%27s_function), for instance. *I'm really more concerned with the approach than with the solution*, though it'd be great if someone could help me figure out proper proofs for the above functions, so I can at least get started from where I ended up getting stuck (all the functions look pretty similar in that sense, and knowing how to work with $\epsilon-\delta$ with even one should help me figure out the rest)

Please help me out, I'm pretty new to real analysis! Thanks a lot in advance!