Nonpiecewise Function Defined at a Point but Not Continuous There

Solution 1:

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.

Solution 2:

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.

Solution 3:

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}$$

Solution 4:

You can define $f_n(x)=x^n$ on $[0,1]$, and $f(x)=\lim_{n\to\infty} f_n(x)$. Then the discontinuity of $f$ at $1$ is a little tricky, as all the $f_n$ are continuous.

Solution 5:

As I stare at a cube-shaped building whose side has length 100 meters, while walking westward parallel to its north wall at a location 100 meters north of the building, the distance to farthest point from me that I can see on the face of the building varies as my position changes. As I cross the line of the western wall, I can suddenly see the southwest corner of the buidling, so that distance as a function of my position has a jump discontinuity that arises naturally from geometry.