Proving discontinuity of a function - I've nearly got it! The function is $f:\mathbb{R}\rightarrow\mathbb{R}$ where $f(x)=0$ if $x\in\mathbb{Q}$ else $f(x)=x$. (Classic real analysis function, these kind of things had me suffering withdraw symptoms from the "Eulerian" functions of A-level) 
I can show it is continuous at $x=0$ quite easily. Well very easily! I can almost show it is discontinuous at $x\ne 0$, that is (for discontinuity at $c$)
$\exists \epsilon>0\forall\delta>0\exists x\text{ with }|x-c|<\delta\implies |f(x)-f(c)|\ge\epsilon$
So, let $c\ne0$ be given, if $c\in\mathbb{Q}$ then notice we can choose an $x$ really close to $c$ where $x\notin\mathbb{Q}$ so that $|f(x)-f(c)|=|f(x)|$ with an $x$ really close to $c$
OR if $c\notin\mathbb{Q}$ then notice we can choose $x\in\mathbb{Q}$ for any $\delta$ and get $|f(x)-f(c)|=|f(c)|$
I now need to choose an $\epsilon$, anything $<|c|$ ought to do
But I'm struggling on writing it.
Might have just got it:
$|x-a|<\delta\implies -\delta<x-a<\delta\implies-\delta+a<x<\delta+a$
Wait... well this gives me an $x$ and as it must work for all $\delta$ ... I'm close!
 A: for any $a\neq0$ choose $\epsilon=\dfrac{|a|}{2} $ then for all $\delta>0$ we need to find $x$ such that $0<|x-a|<\delta$ but $\epsilon\leq|f(x)-f(a)|$.
case$1$: If $a\in Q$;
then clearly $f(a)=0$ then let $x$ be an irrational number in $(a,a+\delta)$ , then $|x|>\dfrac{|a|}{2}$ so $$|f(x)-f(a)|=|x|>\epsilon $$
correction: if $a<0$ choose $x$ from $(a-\delta,a)$for above argument.
case$2$: if $a\notin Q;$
then $f(a)=a$ then let $x$ be an rational number in $(a,a+\delta)$, then
$$|f(x)-f(a)|=|a|>\epsilon$$
Notes: Notice that all open interval inludes infinitly many rationals and irrational numbers so we can always find such a $x$ for all $\delta$.
A: It will suffice to show that $\lim_{x\to a} f(x)$ doesn't exists for $a\not =0$. Suppose to the contrary that $\lim_{x\to a}f(x)=L$. 
Let $\varepsilon=|a|/4$ so there is a $\delta>0$ such that $|f(x)-L|<\varepsilon$ whenever $0<|x-a|<\delta$. Let $0<|x-a|<\min\left(\delta, |a|/2\right)$. From the last inequality it follows that $|x|>|a|/2$. If $x$ is irrational $|x-L|<\varepsilon$ and if $y$ is rational $|L|<\varepsilon$. Suppose that $x$ is irrational. Then 
$$\frac{|a|}{2}<|x|=|x-L+L|\le |x-L|+|L|<2\varepsilon=\frac{|a|}{2}$$
a contradiction.
