Analog Computers

Reference / Paper · 2000

Some Consequences Of Continuity

Read the PDF (9 pp) ↗

Section 2.5 of the open textbook 'Difference Equations to Differential Equations' by Dan Sloughter, covering two fundamental consequences of continuity: the Intermediate Value Theorem and the Extreme Value Theorem. The section presents the bisection algorithm as a practical method for approximating roots of continuous functions on closed intervals, with worked numerical examples including root-finding for x^5 + x = 1 and optimization of a rectangular fencing problem. Practice problems reinforce both theorems and their computational applications.

Manufacturer
Open Calculus
Author
Dan Sloughter
Year
2000
Type
Reference / Paper
Language
English
Learning track
general theory
Pages
9
Credit
Copyright 2000 by Dan Sloughter
  • Open Calculus
  • Intermediate Value Theorem
  • Extreme Value Theorem
  • bisection algorithm
  • optimization

← Back to the Reference Library

Some Consequences Of Continuity

Section 2.5 Difference Equations to Differential Equations Some Consequences Of Continuity In this section we consider two properties of functions which are very closely connected to the notion of continuity. The first of these, the Intermediate Value Theorem, says that the graph of a continuous function is a connected continuum in the sense of our normal intuition. That is, the theorem states that as a continuous function changes from one value to another, it must take on every intermediate value. The second theorem, the Extreme Value Theorem, says that a continuous function on a closed interval attains a maximum and a minimum value on that interval. This is related to our intuitive notion that if we draw a continuous curve with definite beginning and ending points, then the curve has a point where it is higher than at any other point and a point where it is lower than at any other point. We shall not attempt formal justifications of these theorems; such justifications require inquiries into the subtleties of real numbers which are best left to more advanced courses. We will begin with a statement of the Intermediate Value Theorem, followed by a consideration of its application to solving equations. Intermediate Value Theorem If f is a continuous function on a closed interval [a, b] and m is any number between f (a) and f (b), then there is a number c in the interval [a, b] such that f (c) = m. Example Since f (t) = sin(t) is continuous on [0, π2 ] with f (0) = 0 and f ( π2 ) = 1, the 5 fact that 0 < 2π < 1 guarantees that there is a number c in [0, π2 ] such that f (c) = 5 . 2π Graphically, the situation is as in Figure 2.5.1. Of course, the theorem tells us neither the value of c nor how we might find it. The Intermediate Value Theorem is an existence theorem; it guarantees the existence of a certain value, but does not directly provide any method for calculating the value. Example Suppose f (t) is the height, in inches, of a certain plant t days after it first emerges from the soil. From our knowledge of how plants grow, it would be reasonable to assume that f is a continuous function. Also, we have f (0) = 0. Now if f (10) = 12, then we know, for example, that there is some time c, 0 < c < 10, such that f (c) = 5. Of course, this is not surprising, and, in fact, we did not have to bring the subject of continuous functions into the problem in order to realize that between the time when the plant was 0 inches tall and the time when it was 12 inches there was a time when it was 5 inches tall. However, the point of an example like this is to emphasize that the Intermediate Value Theorem simply states a property that we should expect continuous 1 Copyright c by Dan Sloughter 2000 2 Some Consequences Of Continuity Section 2.5 1 5 2π 0.8 0.6 0.4 0.2 0.25 0.5 0.75 c 1 1.25 1.5 5 Figure 2.5.1 Intermediate Value Theorem: sin(c) = 2π functions to have if they are to be used as mathematical models of real world processes that undergo continuous change. As a special case, the Intermediate Value Theorem tells us that if f is a continuous function on a closed interval [a, b] with f (a) and f (b) having opposite signs (that is, one is negative and the other positive), then there is a point c in the open interval (a, b) where f (c) = 0. In other words, under these conditions, the Intermediate Value Theorem guarantees that the equation f (x) = 0. has at least one solution in [a, b]. Although the theorem does not provide a method for solving the equation, it does provides a basis for constructing an algorithm for approximating a solution to any desired accuracy. Bisection Algorithm Suppose f is continuous on [a1 , b1 ] and f (a1 )f (b1 ) < 0 (an easy way to check that f (a1 ) and f (b1 ) have opposite signs). Then, as above, the equation f (x) = 0 (2.5.1) has at least one solution in [a1 , b1 ]. Let m1 = a1 + b1 . 2 If f (m1 ) = 0, then we have found a solution to (2.5.1). If f (m1 ) 6= 0, then either f (a1 )f (m1 ) < 0, in which case (2.5.1) has a solution in [a1 , m1 ], or f (m1 )f (b1 ) < 0, in which case (2.5.1) has a solution in [m1 , b1 ]. In the first case, let a2 = a1 and b2 = m1 ; in the second case, let a2 = m1 and b2 = b1 . Then m2 = a2 + b2 2 (2.5.2) Section 2.5 Some Consequences Of Continuity 3 will approximate a solution to (2.5.1) with an error less than b2 − a2 . 2 (2.5.3) Proceed in a the same manner to define an , bn , and mn for n = 3, 4, 5, . . .. That is, if we have found an−1 , bn−1 , and mn−1 , and f (mn−1 ) 6= 0, let an = an−1 and bn = mn−1 if f (an−1 )f (mn−1 ) < 0 (2.5.4) an = mn−1 and bn = bn−1 if f (mn−1 )f (bn−1 ) < 0. (2.5.5) and Then an + bn 2 will approximate a solution of (2.5.1) with an error less than mn = bn − an . 2 (2.5.6) (2.5.7) Repeat the procedure as many times as necessary to obtain the desired level of accuracy. Example Suppose we wish to find a root to the equation x5 + x = 1. (2.5.8) First note that solving (2.5.8) is equivalent to solving x5 + x − 1 = 0. (2.5.9) Letting f (x) = x5 + x − 1, we may write (2.5.9) as f (x) = 0. To find an initial interval [a1 , b1 ], we graph f as in Figure 2.5.2. Noting that f (0) = −1 and f (1) = 1, we may start with a1 = 0 and b1 = 1. That is, (2.5.8) has a solution in the [0, 1]. Then m1 = 0+1 = 0.5. 2 Now f (0.5) = −0.468750, so f (0.5)f (1) < 0. Hence a2 = 0.5, b2 = 1, and m2 = 0.5 + 1.0 = 0.75. 2 Now f (0.75) = −0.012695, so f (0.75)f (1) < 0. Hence a3 = 0.75, b3 = 1, and m3 = 0.75 + 1.00 = 0.875. 2 4 Some Consequences Of Continuity Section 2.5 6 4 2 -3 -2 1 -1 2 3 -2 -4 -6 Figure 2.5.2 Graph of f (x) = x5 + x − 1 At this stage we know that 0.875 is an approximation for a solution to (2.5.8) with an error of no more than 1.00 − 0.75 = 0.125. 2 We may continue in this manner until we attain any desired level of accuracy. The following table gives the values of an and bn for n = 1, 2, 3, . . . , 10. an 0.000000000 0.500000000 0.750000000 0.750000000 0.750000000 0.750000000 0.750000000 0.750000000 0.753906250 0.753906250 bn 1.000000000 1.000000000 1.000000000 0.875000000 0.812500000 0.781250000 0.765625000 0.757812500 0.757812500 0.755859380 mn 0.500000000 0.750000000 0.875000000 0.812500000 0.781250000 0.765625000 0.757812500 0.753906250 0.755859380 0.754882815 f (an ) −1.000000000 −0.468750000 −0.012695300 −0.012695300 −0.012695300 −0.012695300 −0.012695300 −0.012695300 −0.002544540 −0.002544540 f (bn ) f (mn ) 1.000000000 −0.468750000 1.000000000 −0.012695300 1.000000000 0.387909000 0.387909000 0.166593000 0.166593000 0.072288300 0.072288300 0.028700600 0.028700600 0.007736990 0.007736990 −0.002544540 0.007736990 0.002579770 0.002579770 Rounding to three decimal places, we see that x = 0.755 approximates a solution of (2.5.8) with an error of no more than, to three decimal places, 0.756 − 0.754 = 0.001. 2 In Section 3.6 we will discuss another method, called Newton’s method, for approximating a solution to an equation of the form f (x) = 0. At that time we will see that Newton’s method is faster than the bisection algorithm. However, we will also see that there are conditions under which Newton’s method will fail, whereas the bisection algorithm will always work. Section 2.5 Some Consequences Of Continuity 5 10 8 6 4 2 -2 -1 1 2 3 4 Figure 2.5.3 Graph of f (x) = x2 on [−1, 3] We know turn to the Extreme Value Theorem and some of its consequences. Extreme Value Theorem If f is a continuous function on a closed interval [a, b], then there exists a point c in [a, b] such that f (c) ≥ f (x) for all values of x in [a, b]. Similarly, there exists a point d in [a, b] such that f (d) ≤ f (x) for all values of x in [a, b]. In other words, using the notation of the statement of the theorem, f (c) is the maximum value attained by f on [a, b] and f (d) is the minimum value attained by f on [a, b]. As with the Intermediate Value Theorem, this is an existence theorem which does not indicate any method for finding the points c and d. The importance of the theorem lies in the fact that it gives conditions under which maximum and minimum values of a function are guaranteed to exist. Optimization problems, that is, problems concerned with finding the maximum and minimum values of functions, occur frequently in mathematics and in the applications of mathematics. As we shall see in Section 3.8, conditions which guarantee the existence of a solution to an optimization problem, such as those given in the Extreme Value Theorem, are often an important first step in solving such problems. Example Consider f (x) = x2 on the interval [−1, 3]. Since f is a continuous function on this closed interval, the Extreme Value Theorem guarantees the existence of a maximum value and a minimum value for f . In fact, from our knowledge of the behavior of this function, in particular that f (0) = 0, f (x) > 0 if x 6= 0, and f (x) > f (y) if |x| > |y|, it is easy to see that f (x) attains its maximum value when x = 3 and its minimum value when x = 0 (see Figure 2.5.3). Hence the maximum value of f on [−1, 3] is 9 when x = 3 and the minimum value is 0 when x = 0. Example Let A, B, and C be constants with A > 0. Suppose we wish to find the minimum value of the quadratic polynomial f (x) = Ax2 + Bx + C on an interval [a, b]. Completing the square, we may rewrite f as (2.5.10) 6 Some Consequences Of Continuity Section 2.5 f (x) = Ax2 + Bx + C   C B 2 =A x + x+ A A !  2 B B2 C =A x+ − + 2A 4A2 A  2 B B2 =A x+ +C − . 2A 4A  2 B 2 is minimized. This latter Since C − B 4A is a constant, f (x) is minimized when A x + 2A term is never negative and is minimized when it is 0, that is, when x+ B = 0. 2A Hence the minimum value of f (x) on [a, b] will occur when x=− B , 2A (2.5.11) unless this point is not in the interval, in which case the minimum value occurs at one of the endpoints, x = a or x = b. Note that, geometrically, (2.5.11) is the location of the vertex of the parabola which is the graph of f . Note that if A < 0, then the maximum value of f (x) would occur at (2.5.11) if it is in the interval [a, b], and at one of the endpoints otherwise. y x Figure 2.5.4 A field of length x and width y Example Suppose we wish to fence in a rectangular field with 500 yards of fencing in such a way that we maximize the area of the resulting field. If, as in Figure 2.5.4, we let x denote the length of the field, y its width, and A its area, then A = xy. Moreover, since we only have 500 yards of fencing to work with, we know that 2x + 2y = 500. Section 2.5 Some Consequences Of Continuity 7 16000 14000 12000 10000 8000 6000 4000 2000 50 100 150 200 250 Figure 2.5.5 Graph of A = 250x − x2 on [0, 25] Hence y = 250 − x, (2.5.12) from which it follows that A = xy = x(250 − x) = 250x − x2 . From (2.5.12), and the fact that we must have both x ≥ 0 and y ≥ 0, it follows that 0 ≤ x ≤ 250. Thus our problem becomes one of finding the maximum value of A = −x2 + 250x on the closed interval [0, 250]. From our previous example, the maximum value of A will occur when 250 250 = = 125. x=− (2)(−1) 2 From (2.5.12), we have y = 125 when x = 125. Hence the area of the field is maximized when its dimensions are 125 yards by 125 yards. For these dimensions, the area of the field is A x=125 = (125)(125) = 15, 625 square yards. See Figure 2.5.5 for the graph of A. Example Consider the function f (x) = x2 + 1 on the open interval (0, 1). Then lim f (x) = lim (x2 + 1) = 1 x→0+ x→0+ and lim f (x) = lim (x2 + 1) = 2, x→1− x→1− but 0 < f (x) < 2 for all values of x in (0, 1). Hence, as x approaches 0 from the right, f (x) approaches, but never reaches, 1; similarly, as x approaches 1 from the left, f (x) 8 Some Consequences Of Continuity Section 2.5 approaches, but never reaches, 2. Thus f is an example of a continuous function on an open interval which attains neither a maximum nor a minimum value on the interval. Hence we see why the interval in the statement of the Extreme Value Theorem must be a closed interval. Problems 1. Use the bisection algorithm to approximate a solution to each of the following equations on the given interval. Your answer should have an error of no more than 0.005. (a) x2 − 2 = 0 on [0, 4] (c) cos(x) = x on [0, π] (b) x5 − 6x3 + 2x = 2 on [−1, 1] √ (d) 2 sin(x) = x + 1 on [0, 2] 2. (a) Plot the graph of g(t) = t2 − cos2 (t) on [−π, π]. (b) How many solutions are there to the equation t2 = cos2 (t)? (c) Use the bisection algorithm to estimate the solutions to the equation t2 = cos2 (t). State your answers with an error less than 0.005. 3. Suppose if the market price for a certain product is p dollars, then the demand for that product will be 50000p + 10000 units. D(p) = p2 At the same time, suppose that at a price of p dollars producers will be willing to supply 1 S(p) = p2 + 2p units. 3 (a) Plot the graphs of D and S on the same graph. (b) Use the bisection algorithm to estimate the solution to the equation D(p) = S(p). This point is called the equilibrium price because it is the price for which the consumers’ demand for the product is exactly equal to the manufacturers’ supply. (c) How many units of the product will be manufactured at the equilibrium price? (d) What would happen if the producers raised the price above the equilibrium price? What would happen if they lowered the price below the equilibrium price? (e) What would happen if the producers increased production? What would happen if they lowered production? 4. A farmer wishes to fence in a rectangular field, using a straight river for one side, with 500 yards of fencing. What should the dimensions of the field be in order to maximize the area of the field? 5. When a potter sells his pots for p dollars apiece, he can sell D(p) = 750 − 50p of them. Suppose the pots cost him $5.00 apiece to make. What price should the potter charge in order to maximize his profit? Section 2.5 Some Consequences Of Continuity 9 6. Let h(t) = t4 − 1. (a) Does h have a maximum value on [−1, 2)? (b) Does h have a minimum value on [−1, 2)? (c) Are the results of (a) and (b) consistent with the Extreme Value Theorem? Explain. 7. Recall that the Heavidside function is defined by  H(t) = 0, if t < 0, 1, if t ≥ 0. (a) Note that H(−1) = 0 and H(1) = 1. Is there a point c in (−1, 1) such that H(c) = 0.5? (b) Is the result of (a) consistent with the Intermediate Value Theorem? (c) Does H attain a maximum value on [−1, 1]? Does H attain a minimum value on [−1, 1]? (d) Are the results of (c) consistent with the Extreme Value Theorem? 8. Suppose g is defined on [−1, 1] by  g(t) = |t|, if t 6= 0, 1, if t = 0. (a) Does g attain a maximum value on [−1, 1]? If so, at what points? (b) Does g attain a minimum value on [−1, 1]? If so, at what points? (c) Are the results of (a) and (b) consistent with the Extreme Value Theorem? 9. Suppose f and g are continuous on [0, 1], f (0) < g(0) and f (1) > g(1). Show that there exists a point c in the open interval (0, 1) such that f (c) = g(c). 10. Suppose f is continuous on [0, 1] and 0 ≤ f (x) ≤ 1 for all x in [0, 1]. Show that there exists a point c in [0, 1] such that f (c) = c.