Consider a real valued function $g$ on an open interval $(a,b)$ which is the derivative of a function continuous on $[a,b]$ at each point of $(a,b)$. The function $g$ has the intermediate value property, so a monotone $g$ will have to be continuous, a general $g$ cannot have simple discontinuities, etc. With such constraints how badly can a derivative behave in terms of continuity, can it get much worse than the derivative of say, $x^2 \sin(1/x)
$?



Examples of badly behaved derivatives
Talking about how bad may be the derivative of an everywhere derivable function on the interval $[a,b]$, the natural example that occurs to my mind is: a Pompeiu derivative, that is, a derivative that vanishes in a dense set (these weird functions, however, constitue a closed linear space of $C^0[a,b]$, while it's not even obvious that they are closed wrto addition!). For an account on the subject you may refer e.g. to the above quoted book by Andrew M. Bruckner [*Differentiation of real functions*](https://doi.org/10.1007/BFb0069821): it's also in the CRM series now (here is a preview:
[Google Books](http://books.google.it/books?id=fXfEG-F2zJUC)).


For a quick reference, you may also have a look to the [wiki article](http://en.wikipedia.org/wiki/Pompeiu_derivative) (it's me who wrote it ;-) ).


