LimitIntermediateValue.mws

Intermediate Value Theorem

>    restart;

>   

Lesson Overview

The Continuity lesson demonstrated how continuity is built upon the foundation in limits developed in the first few lessons of this Unit. To conclude this unit we consider an important application of continuity, the Intermediate Value Theorem (IVT). The examples in this lesson demonstrate a few of the many applications of the Intermediate Value Theorem.

>   

The Intermediate Value Theorem

Theorem - Intermediate Value Theorem

Let f be a continuous function defined on a closed interval [a, b]  and let z  be a number between f(a)  and f(b) . The equation f(c) = z  has at least one solution c  in the open interval ( a , b  ).

>   

The fundamental idea behind the Intermediate Value Theorem is that a continuous function on a closed interval attains all values between the values of the function at the endpoints of the interval. Without continuity on the interior of the interval the function could jump over some (or all) values between the values at the endpoints. The same possibility arises if the function is not continuous at both endpoints.

>   

Applications

The Intermediate Value Theorem has many applications. A classical application of the IVT is the Bisection Method. The Bisection Method is an algorithm for finding an approximation to a zero of a continuous function.

Example 1 - Bisection Method

Consider the function

>    f := x -> (x^5 - 4*x^2 + 2)/(x-1):
`f(x)` = f(x);

`f(x)` = (x^5-4*x^2+2)/(x-1)

A plot of this function suggests that there are three real solutions to f(x) = 0 .

>    plot( f(x), x=-5..5, y=-10..10, discont=true );

[Maple Plot]

It appears as though one of the solutions to f(x) = 0  is in the closed interval [-1,0]. The IVT confirms this as the function f is continuous on [-1,0] and f(-1) = 3/2  >0 and f(0) = -2  < 0.

The Bisection Method carries this idea further.

Step 1:  The midpoint of [-1, 0]  is x = -1/2 ; because f(-1/2) = -31/48  <0 the IVT tells us the solution will be found in [-1, -1/2] .

Step 2:  The midpoint of [-1, -1/2]  is x = -3/4 ; because f(-3/4) = 499/1792 >0 the IVT tells us the solution will be found in [-3/4, -1/2] .

This process can be continued until the interval is sufficiently short. To implement this in Maple, let max_len  denote the length of the interval when the iteration should stop.

>    bisect := proc( f::procedure, II::range, max_len::positive )
  local a, b, c;
  a := op(1,II);
  b := op(2,II);
  if signum(f(a))=signum(f(b)) or not iscont(f(x),x=II) then
    error "the IVT does not apply on the interval", II
  end if;
  while abs(b-a)>max_len do
    c := (a+b)/2;
    if f(c)=0 then
      break
    elif signum(f(a))=signum(f(c)) then
      a := c
    else
      b := c
    end if;
  end do:
  return( [a..b] )
end proc:

>   

>    max_len := 10^(-4):

When the Bisection Method is restarted on [-1,0] with a tolerance of 10^(-4)  = 0.0001:

>    bisect( f, -1...0., 10^(-4) );

[-.6807861327 .. -.6807250976]

The conclusion that this root occurs on [-0.680786, -0.680725] is consistent with the result from Maple's fsolve  command:

>    fsolve( f(x)=0, x );

-.6807685310

>   

The other real roots of this function can be approximated in the same way. Note that the IVT cannot  be applied on [0, 1] , [1, 2] , or any interval containing x = 1  because the function has a vertical asymptote at x = 1  (and so cannot be continuous there). It is not difficult, however, to avoid this difficulty because we know Limit(f(x),x = 1,left) = infinity  and Limit(f(x),x = 1,right) = -infinity . For the smaller positive root we can apply the Bisection Method on [0,0.99]:

>    f(0), f(0.99);

-2, 96.94099500

>    bisect( f, 0..0.99, 10^(-4) );

[.7470922852 .. .7471527100]

>    fsolve( f(x)=0, x, x=0..0.99 );

.7471268154

Again the result is consistent with Maple's approximation to this solution:

The second positive root can be found by applying the Bisection Method on [1.01,2]:

>    f(1.01), f(2);

-102.9389950, 18

>    bisect( f, 1.01..2, 10^(-4) );

[1.450013428 .. 1.450073852]

>    fsolve( f(x)=0, x , x=1.01..2 );

1.450025320

>   

Other applications of the IVT are less obvious.

Example 2 - Periodic Temperatures

Suppose the temperature at midnight is 55 degrees, increases to a high of 85 degrees, then returns to 55 degrees at midnight the next day. Assume that the temperature throughout the day is a continuous function of the time of day.

Use the IVT to show that there is at least one time in the morning when the temperature is the same as the temperature exactly 12 hours later.

Let T(t)  denote the temperature (in degrees) at time t  for 0 <= t  <= 24. Define the function f by f(t) = T(t+12)-T(t)  for 0 <= t  <= 12. Then

  f(12) = T(24)-T(12)  = T(0)-T(12)  = -(T(12)-T(0)) = -f(0) .

Case 1:  If f(0) = 0  then the T(12)  = T(0) = 55  and we have two times 12 hours apart when the temperatures are equal.

Case 2:  If f(0) <> 0 , then f(0)  and f(12)  have different signs. Because T is continuous throughout the day, f must be continuous on [0,12]. The IVT can be applied to conclude that there is at least one time `t*`  in (0,12) when f(`t*`) = 0 ; that is, T(`t*`) = T(`t*`+12) .

Since exactly one of these two cases must be true, the proof is complete. [Note that the information about the high temperature is unneeded.]

>   

Lesson Summary

The Intermediate Value Theorem is another result that is not difficult to understand intuitively:

 a continuous function on a closed interval must attain every value between the function values at the endpoints.

The most familiar application of the IVT is the Bisecton Method. The Bisection Method is a fairly simple method, based on the IVT, for finding an approximation to a solution of f(x) = 0  on a closed interval where the function values at the two endpoints of the interval have different signs.

The IVT can also be applied to many seemingly unrelated examples.

>   

What's Next?

This concludes Unit 1. The online homework assignment should be completed after you have worked enough of the online practice problems to develop your skills and confidence applying the IVT. The textbook homework assignment also needs to be completed. After you complete the homework assignments, take some time to review all of the lessons in this unit, then take Quiz 2 for the last four (4) lessons of Unit 1.

In Unit 2 you will learn about derivatives and develop a solid understanding of derivatives as rates of change.

>   

>   

>