Investigating Continuity of Dirichlet and related functions: An $\epsilon-\delta$ approach 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, 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!

For Dirichlet function, do you understand that $\mathbb{Q}$ is dense in $\mathbb{R}$? If so, you will find the function is discontinuous for every point just by $\epsilon-\delta$ approach. For the second function, you can just pick any $\epsilon$, then pick $\delta=\epsilon$, for $x\in(-\delta,\delta)$, if $x$ is rational, $f(x)=0<\epsilon$, if $x$ is irrational, $|f(x)-0| = |x|<\epsilon$. Hence, by the approach, the function is continuous at $0$.
