I suppose there are differentiable almost everywhere functions whose sets of discontinuities are dense. How to prove or disprove it?
Additionally, is Thomae's function $T(x)$ raised to some power greater than 2 an example? (With 2 it isn't differentiable anywhere by Hurwitz's theorem.) Or maybe $\begin{cases} e^{-\frac 1 {T(x)}} & \textrm{if $x\in\mathbb Q$} \\ 0 & \textrm{otherwise} \end{cases}$?
By Khinchin's theorem, for almost every real $x$ there are at most finitely many rationals $p/q$ (where $p,q$ are integers with $q > 0$) with $|x - p/q| < 1/q^3$. Consider the function $f(x)$ such that $f(p/q) = 1/q^4$ for rational $p/q$ in lowest terms, $f(x) = 0$ otherwise. Note that if $x$ is irrational and $|x - p/q| \ge 1/q^3$, $$ \left|\frac{f(x) - f(p/q)}{x - p/q}\right| \le \frac{1/q^4}{1/q^3} = \frac{1}{q} $$ and as a result $f'(x)$ exists and is $0$ for any $x$ in Khinchin's set. But $f$ is discontinuous at every rational.