Ah, a favorite is a function that
is differentiable but its derivative
is not Riemann integrable!
Recall, a function is Riemann
integrable if and only if it
is continuous everywhere except
on a set of measure 0. So, the
derivative has to be discontinuous
on a set of positive measure.
Now, to construct one of those!
Here's another favorite: For positive
integer n and the set R of real numbers,
suppose C is a closed subset of R^n with
the usual topology. Then there exists
a function f: R^n --> R that is
0 on C, strictly positive otherwise,
and infinitely differentiable.
So, for C, take, say,
a sample path of Brownian motion,
the Mandelbrot set,
a Cantor set of positive measure,
etc. Can use that function to
settle an old question in
constraint qualifications for the
Kuhn-Tucker conditions in
optimization.
Or, any closed set can be the level
set of an infinitely differentiable
function.
Sure, really fun reading for such
things is:
Bernard R. Gelbaum and
John M. H. Olmsted,
Counterexamples in Analysis,
Holden-Day,
San Francisco,
1964.