3.1 ContinuityIntuitively, a continuous function is one whose graph has no sudden jumps in it; the graph is all a single connected piece. Such a function can be drawn without picking the pen up off of the paper. Formally, a function f(x) is defined to be continuous if for any real x and any infinitesimal dx, f(x+dx)f(x) is infinitesimal. Example 32Let the function f be defined by f(x)=0 for x≤ 0, and f(x)=1 for x>0. Then f(x) is discontinuous, since for dx>0, f(0+dx)f(0)=1, which isn't infinitesimal. If a function is discontinuous at a given point, then it is not differentiable at that point. On the other hand, the example y=x shows that a function can be continuous without being differentiable. In most cases, there is no need to invoke the definition explicitly in order to check whether a function is continuous. Most of the functions we work with are defined by putting together simpler functions as building blocks. For example, let's say we're already convinced that the functions defined by g(x)=3x and h(x)=sin x are both continuous. Then if we encounter the function f(x)=sin(3x), we can tell that it's continuous because its definition corresponds to f(x)=h(g(x)). The functions g and h have been set up like a bucket brigade, so that g takes the input, calculates the output, and then hands it off to h for the final step of the calculation. This method of combining functions is called composition. The composition of two continuous functions is also continuous. Just watch out for division. The function f(x)=1/x is continuous everywhere except at x=0, so for example 1/sin(x) is continuous everywhere except at multiples of π, where the sine has zeroes. The Intermediate Value TheoremAnother way of thinking about continuous functions is given by the intermediate value theorem. Intuitively, it says that if you are moving continuously along a road, and you get from point A to point B, then you must also visit every other point along the road; only by teleporting (by moving discontinuously) could you avoid doing so. More formally, the theorem states that if y is a continuous realvalued function on the real interval from a to b, and if y takes on values y_{1} and y_{2} at certain points within this interval, then for any y_{3} between y_{1} and y_{2}, there is some real x in the interval for which y(x)=y_{3}. The intermediate value theorem seems so intuitively appealing that if we want to set out to prove it, we may feel as though we're being asked to prove a proposition such as, “a number greater than 10 exists.” If a friend wanted to bet you a sixpack that you couldn't prove this with complete mathematical rigor, you would have to get your friend to spell out very explicitly what she thought were the facts about integers that you were allowed to start with as initial assumptions. Are you allowed to assume that 1 exists? Will she grant you that if a number n exists, so does n+1? The intermediate value theorem is similar. It's stated as a theorem about certain types of functions, but its truth isn't so much a matter of the properties of functions as the properties of the underlying number system. For the reader with a interest in pure mathematics, I've discussed this in more detail on page 156 and given an abbreviated proof. (Most introductory calculus texts do not prove it at all.) Example 33◊ Show that there is a solution to the equation 10^{x}+x=1000. ◊ We expect there to be a solution near x=3, where the function f(x)=10^{x}+x=1003 is just a little too big. On the other hand, f(2)=102 is much too small. Since f has values above and below 1000 on the interval from 2 to 3, and f is continuous, the intermediate value theorem proves that a solution exists between 2 and 3. If we wanted to find a better numerical approximation to the solution, we could do it using Newton's method, which is introduced in section 5.1. Example 34◊ Show that there is at least one solution to the equation cos x=x, and give bounds on its location. ◊ This is a transcendental equation, and no amount of fiddling with algebra and trig identities will ever give a closedform solution, i.e., one that can be written down with a finite number of arithmetic operations to give an exact result. However, we can easily prove that at least one solution exists, by applying the intermediate value theorem to the function xcos x. The cosine function is bounded between 1 and 1, so this function must be negative for x<1 and positive for x>1. By the intermediate value theorem, there must be a solution in the interval 1 ≤ x ≤ 1. The graph, c, verifies this, and shows that there is only one solution. Figure C. The function xcos x constructed in Example 34. Example 35◊ Prove that every oddorder polynomial P with real coefficients has at least one real root x, i.e., a point at which P(x)=0. ◊ Example 34 might have given the impression that there was nothing to be learned from the intermediate value theorem that couldn't be determined by graphing, but this example clearly can't be solved by graphing, because we're trying to prove a general result for all polynomials. To see that the restriction to odd orders is necessary, consider the polynomial x^{2}+1, which has no real roots because x^{2}>0 for any real number x. To fix our minds on a concrete example for the odd case, consider the polynomial P(x)=x^{3}x+17. For large values of x, the linear and constant terms will be negligible compared to the x^{3} term, and since x^{3} is positive for large values of x and negative for large negative ones, it follows that P is sometimes positive and sometimes negative. Making this argument more general and rigorous, suppose we had a polynomial of odd order n that always had the same sign for real x. Then by the transfer principle the same would hold for any hyperreal value of x. Now if x is infinite then the lowerorder terms are infinitesimal compared to the x^{n} term, and the sign of the result is determined entirely by the x^{n} term, but x^{n} and (x)^{n} have opposite signs, and therefore P(x) and P(x) have opposite signs. This is a contradiction, so we have disproved the assumption that P always had the same sign for real x. Since P is sometimes negative and sometimes positive, we conclude by the intermediate value theorem that it is zero somewhere. Example 36◊ Show that the equation x=sin 1/x has infinitely many solutions. ◊ This is another example that can't be solved by graphing; there is clearly no way to prove, just by looking at a graph like d, that it crosses the x axis infinitely many times. The graph does, however, help us to gain intuition for what's going on. As x gets smaller and smaller, 1/x blows up, and sin 1/x oscillates more and more rapidly. The function f is undefined at 0, but it's continuous everywhere else, so we can apply the intermediate value theorem to any interval that doesn't include 0. We want to prove that for any positive u, there exists an x with 0<x<u for which f(x) has either desired sign. Suppose that this fails for some real u. Then by the transfer principle the nonexistence of any real x with the desired property also implies the nonexistence of any such hyperreal x. But for an infinitesimal x the sign of f is determined entirely by the sine term, since the sine term is finite and the linear term infinitesimal. Clearly sin 1/x can't have a single sign for all values of x less than u, so this is a contradiction, and the proposition succeeds for any u. It follows from the intermediate value theorem that there are infinitely many solutions to the equation. Figure D. The function xsin 1/x. The Extreme Value TheoremIn chapter 1, we saw that locating maxima and minima of functions may in general be fairly difficult, because there are so many different ways in which a function can attain an extremum: e.g., at an endpoint, at a place where its derivative is zero, or at a nondifferentiable kink. The following theorem allows us to make a very general statement about all these possible cases, assuming only continuity. The extreme value theorem states that if f is a continuous realvalued function on the realnumber interval defined by a ≤ x ≤ b, then f has maximum and minimum values on that interval, which are attained at specific points in the interval. Let's first see why the assumptions are necessary. If we weren't confined to a finite interval, then y=x would be a counterexample, because it's continuous and doesn't have any maximum or minimum value. If we didn't assume continuity, then we could have a function defined as y=x for x < 1, and y=0 for \(x \ge 1\); this function never gets bigger than 1, but it never attains a value of 1 for any specific value of x. The extreme value theorem is proved, in a somewhat more general form, on page 159. Example 37◊ Find the maximum value of the polynomial P(x) = x^{3}+x^{2}+x+1 for 5 ≤ x ≤ 5. ◊ Polynomials are continuous, so the extreme value theorem guarantees that such a maximum exists. Suppose we try to find it by looking for a place where the derivative is zero. The derivative is 3x^{2}+2x+1, and setting it equal to zero gives a quadratic equation, but application of the quadratic formula shows that it has no real solutions. It appears that the function doesn't have a maximum anywhere (even outside the interval of interest) that looks like a smooth peak. Since it doesn't have kinks or discontinuities, there is only one other type of maximum it could have, which is a maximum at one of its endpoints. Plugging in the limits, we find P(5) = 104 and P(5)=156, so we conclude that the maximum value on this interval is 156.
