Nonpiecewise Function Defined at a Point but Not Continuous There

A very easy way to construct a function that is piecewise without being "obviously piecewise" is functions defined in terms of limits:

$$f(x) = \lim_{a \to +\infty} \exp\left(-ax^2\right) = \begin{cases}1, & x = 0 \\ 0, & \text{otherwise}\end{cases}$$

This example has the advantage of being easily-comprehensible to beginning calculus students.


This problem relates to issues discussed by Weyl and embodied in the work of Brouwer on Intuistionist Mathematics. Here is a discussion:

http://www.alternatievewiskunde.nl/QED/brouwer.htm

Weyl stated "Above all, however, there can be no other functions at all on a continuum than continuous functions." After pointing out the absence of discontinuous functions on R, Weyl went on to say that: "When the old analysis allowed the formation of discontinuous functions, it thereby showed most clearly how far it is from grasping the essence of the continuum. What one calls nowadays a discontinuous function, consists in fact (and this also is basically a return to older intuitions) of a number of functions on separated continua."

Brouwer proved, in Intuitionist Mathematics, that a totally defined function on an interval is continuous.


How about $$ f(x) = \sup \bigl( \mathbb Z\cap (-\infty,x)\bigr) = \lceil x\rceil -1$$

or

$$ g(x) = \lim_{n\to\infty} \tan^{-1}(nx) = \begin{cases}\pi/2 & x>0 \\ 0 & x=0 \\ -\pi/2 & x< 0 \end{cases} $$

or

$$ h(x) = \limsup_{n\to\infty} \sin(nx\pi) = \begin{cases}0 & x \in \mathbb Z \\ 1 & x \notin \mathbb Q \\ \in(0,1] & \text{elsewhere} \end{cases}$$

or

$$ k(x) = \lim_{y\to+\infty} \frac1y \int_0^y \cos(xt) \, dt = \begin{cases} 1 & x=0 \\ 0 & x\ne 0 \end{cases}$$

or

$$ g(x) = \int_0^\infty \frac{x}{1+(xt)^2} \,dt = \begin{cases} \pi/2 & x > 0 \\ 0 & x=0 \\ -\pi/2 & x<0 \end{cases}$$