If you do study (continuous) mathematics, one of the things you build up is a little stable of strange functions to help you test your intuition.
A very common "right of passage" exercise in introductory analysis is to come up with the Weierstrass function or something similar (usually with a little coaching). This is an everywhere continuous and nowhere differentiable function that then goes into your little toolkit.
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.
No, it's doable at the level of
Rudin's Principles:
He shows that a function is
Riemann integrable if and only
if it is continuous everywhere
except on a set of measure 0.
For the definition of measure 0,
he gives that quickly, and don't
really need a course in measure
theory. Besides a course in
measure theory likes just to
f'get about Riemann integration,
and thankfully so.
Agree, it's do-able with baby Rudin. But as I recall it's a typical example used (early) in measure theory, not so much intro analysis. Hence "typical".
A very common "right of passage" exercise in introductory analysis is to come up with the Weierstrass function or something similar (usually with a little coaching). This is an everywhere continuous and nowhere differentiable function that then goes into your little toolkit.