Proofs that Dirichlet's function is not differentiable Define $f: (0,1) \to (0,1)$ by 
$f(x)=
\begin{cases} 
\frac{1}{q}, & \text{if $x=\frac{p}{q}$ in lowest terms with $p,q \in \mathbb{N}$} \\
0, & \text{if $x$ is irrational}
\end{cases}
$
The version of this proof I found from Spivak's Calculus is, for irrational $a$, say $a=m.a_1a_2a_3\dots$ is the decimal expansion of $a$, consider $[f(a+h)-f(a)]/h$ for $h$ rational, and also for $$h=-0.00\dots0a_{n+1}a_{n+2}\dots$$
Now I tried to prove this using the sequential criterion for limits. 
Let $x_n=\frac{p_n}{q_n}$ be in reduced form, a sequence in $(0,1)$ converging to $a$. Then we can write $y_n=(\frac{1}{q_n}-0)/(\frac{p_n}{q_n}-a)=1/[q_n(\frac{p_n}{q_n}-a)]$. I first thought that since $(\frac{p_n}{q_n}-a)$ converges to $0$, $y_n$ would diverge to infinity, but then I realized that $q_n$ may also diverge to infinity, so I cannot guarantee this. 
I'm wondering if there's another way using sequential criterion to prove this. Also what other solutions are there? I would greatly appreciate any solution.

Fix an irrational $x\in(0,1)$.  Suppose $f'(x)$ exists; then $f'(x)=0$.  For each prime $q$, pick $r_q$ to be a multiple of $1/q$ satisfying $|x-r_q|\leq 1/q$. Then $|f(x)-f(r_q)|/|x-r_q|\geq 1$.  So $|f'(x)|\geq 1$,a contradiction.
