Tuesday, February 18, 2014

Exceptions to Continuity 1

An important class of functions in mathematics is the class of continuous functions. A continuous function is a function without any jumps or undefined points (for a more formal definition, see here). For convenience, we shall limit our scope to functions f on the real numbers.

The class of continuous functions on the real numbers is quite general; all linear, polynomial, and exponential functions fall under this category. However, many other functions fall into the class of discontinuous functions, or those which have at least one point at which they are not continuous. Take as an example the Heaviside step function, which is (conditionally) defined by the equation


This function, often denoted θ(x) as above, is graphed below.

The function assumes a constant value of 0 as the value of x approaches 0, and then at zero, it assumes the value 1/2 (solid blue dot). θ(x) then equals 1 for all positive values of x. This function is discontinuous at exactly one point, namely at x = 0 because the function jumps from 0 to 1/2 to 1 at this point. We can then consider the set of points of discontinuity of the function, which for a function f we shall denote D(f) (where "D" stands for discontinuity). In this way, D itself is a function; to each function f on the real numbers it associates the set of points of discontinuity of f. For instance, if f(x) = x2, then D(f) = Ø (the empty set), and, by the discussion above, D(θ) = {0}.

However, many functions have more than one point of discontinuity. Some in fact have an infinite number of discontinuities! Take for example the greatest integer or floor function, which to every real number assigns the greatest integer less than or equal to it. For example, floor(2.5) = 2, floor(6.93) = 6, and floor(1) = 1. The graph of this function is shown below:

The set of discontinuities of the floor function is just the set of integers; as soon as the input of the function increases from 0.999 to 1.000, for example, the output jumps from 0 to 1. Thus D(floor) = Z = {...-3,-2,-1,0,1,2,3,...} (Z is often used to stand for the set of integers). Even for this function, however, the discontiuities are isolated, and "most" of the function still behaves normally. However, there are functions for which every real number is a discontinuity. One notable example is the Dirichlet function, denoted IQ(x) and defined on all real numbers as being equal to 1 if x is rational, and 0 if it is not (see here for information on and examples of rational and irrational numbers). The function is denoted this way because it is also called the characteristic function of the rational numbers on the reals. A characteristic function of any set is the function that is equal to 1 on the set and 0 elsewhere. The symbol IQ indicates that the set in question is Q, the rational numbers. It is difficult to imagine the graph of this function, but it consists of an (countably) infinite set of points along the line y = 1 and an (uncountably) infinite set of points along the line y = 0.

To see that IQ(x) is discontinuous at every real number x, consider the following argument. If x is irrational, let the decimal expansion of x be 0.a1a2a3..., where a1, a2, a3, etc. are the digits of the infinite expansion. Clearly, every member of the sequence 0.a1000..., 0.a1a200..., 0.a1a2a30... is a rational number (as the decimal expansion of each terminates) and the sequence generates rational numbers arbitrarily close to the irrational number x. Thus the function takes the value 1 at points arbitrarily close to where it takes the value 0 and IQ(x) is discontinuous at x. For the case in which x is rational, it is clear that there is an irrational number between every two rationals (for definiteness, one such an irrational number between x and y would be (2-1/2)x + (1 - 2-1/2)y), so the rationals must be isolated points, and thus discontinuities of the function. In conclusion, the function IQ(x), though defined at every real number, is discontinuous at every point in its domain, so D(IQ) = R, the set of real numbers.

Though one might argue that the odd definition of this function seems artificial, as it uses rational and irrational numbers in its definition, this particular function does have a closed form, albeit in the form of an infinite limit. The function IQ(x) can also be defined by the expression:

In the expression above, the limit is calculated pointwise, i.e. the value of the limit is calculated for each real number x, giving the value of the function at x. To see that this expression indeed produces the characteristic function of the rational numbers on the real numbers, first consider the inner limit, indexed by the variable j, for constant k (assume k = 1, so k! = 1). The function cos(πx) is equal to 1 or -1 at every integer.

For large j, cos(πx)2j = 1 at all integers. The "2" in the exponent insures that all outputs of the function are positive. If the exponent were just j, the value of the function at x = 1 would simply oscillate between -1 and 1 and never converge, and the function would be undefined at odd integers. For any point that is not an integer, the value of cos(πx) will have an absolute value less than 1 and therefore approach zero in the limit. The inner limit therefore gives a function which has the value 1 at every integer and 0 elsewhere.

Now let k→+∞. We have already seen that the function will have value 1 whenever the expression within the cosine is integral. For any rational number r/q, where r and q are integers and the fraction is reduced to lowest form, clearly q! (q factorial) has q as a factor. Thus q!(r/q) is an integer. Finally, since q! is a factor of every subsequent factorial, k!(r/q) is an integer for every kq. Therefore, the value of the limit at every rational number becomes 1 as k increases without bound. If the function were 1 at an irrational number s, however, we would have k!(s) equal to an integer for some k, because integers are the only values for which cos(πx) = 1. Thus s would be expressible as a quotient of two integers, which is a contradiction, since s is irrational. We have then confirmed that the function expression indeed gives IQ(x).

Another important example is a modified version of Dirichlet's function, called Thomae's function or the popcorn function. It is defined in the following way.

This function agrees with Dirichlet's function on the irrational numbers, but for any rational number gives the reciprocal of its denominator in lowest form. At the nonzero integers, since these numbers can be represented as n/1, the function assumes the value 1. For simplicity, we also assume that f(0) = 1. A graph of this function is shown below (click to enlarge):

The above shows a graph (a collection of points, in this case) of Thomae's function on the interval (0,1), and some examples of points: 1/2 yields the largest possible output of any number between 0 and 1, namely 1/2. Also, along the horizontal line y = 1/q for any positive integer n lie all points (p/q,1/q), where p and q share no factors, or are said to be relatively prime. Thus the number of points along each line y = 1/q also gives the number of positive integers less than or equal to q that are relatively prime to q. For example, the point (2/5,1/5) is illustrated, and there are a total of four points along the horizontal line containing it, since 1, 2, 3, and 4 are all relatively prime to 5. Notice however that (2/4,1/4) is not a valid ordered pair satisfying Thomae's function because 2/4 can be simplified to 1/2. The points get denser as one approaches the x-axis, (for example following the sequence of points (1/n,1/n), and the only line along which there are an infinite number of points is y = 0, since Thomae's function assumes the value 0 at every irrational number.

Now we must consider where Thomae's function, if anywhere, is continuous. Clearly, it is discontinuous at any rational number for the same reason as before: any rational number yields a nonzero output, but is surrounded by irrational numbers which are mapped to 0. However, using the formal definition of continuity, we can confirm that Thomae's function is actually continuous on the irrational numbers. The function will be continuous there if the differences in the outputs at an irrational number and at "nearby" points tend to 0 as the "nearby" points come closer and closer to the chosen number. Let s be any irrational, and choose any small positive number ε to be the desired upper bound for the difference between the value of the function at s and at a nearby point. Let q be the smallest positive integer such that ε > 1/q. Since s is irrational, clearly it is not equal to any p/q (p,q relatively prime). Let δ be the distance between s and the closest rational number (in lowest form) with a denominator less than or equal to q. Within a distance δ of s, the function assumes values strictly less than 1/q. Thus the largest possible difference is less than 1/q (since f(s) = 0) which is less than ε, and the function is continuous at s. To make this clearer, the above reasoning is made explicit in the diagram below (click to enlarge):

A demonstration of the above reasoning for an arbitrary irrational s = 0.559246... and ε = 0.22
In the above diagram, the smallest positive integer with ε > 1/q is q = 5, since 1/5 = 0.20 < 0.22. Among those rationals with denominators less than or equal to 5 (which are copied on a duplicated x-axis so that they can more easily be seen), 3/5 is the one closest to s, with a difference δ of about 0.04. If, for any x, x is within a distance 0.04 of s, the function value at x is guaranteed to be less than 0.20 and so within 0.22 of the value of the function at s, 0. Since this can be done for any positive ε, the function is continuous at s. Similarly, the function is continuous at every irrational.

Therefore, there exists a function f (Thomae's function) with D(f) = Q (the set of rational numbers). The question naturally arises whether any set can be the set of discontinuities of a function. This question is explored in the next post (coming February 26).

Sources: Counterexamples in Analysis by Bernard R. Gelbaum and John M. H. Olmsted, The Road to Reality by Roger Penrose, Weierstrass Function, Dirichlet Function on Wikipedia, http://www.maa.org/pubs/Calc_articles/ma001.pdf, http://www.whitman.edu/mathematics/SeniorProjectArchive/2007/huh.pdf

No comments: