Continuous Functions

Site: Saylor Academy
Course: MA005: Calculus I
Book: Continuous Functions
Printed by: Guest user
Date: Saturday, April 27, 2024, 5:54 PM

Description

Read this section for an introduction to what we mean when we say a function is continuous. Work through practice problems 1 and 2.

Introduction

We saw a few "nice" functions whose limits as \mathrm{x} \rightarrow \mathrm{a} simply involved substituting \mathrm{a} into the function: \lim\limits_{x \rightarrow a} \mathrm{f}(\mathrm{x})=\mathrm{f}(\mathrm{a}). Functions whose limits have this substitution property are called continuous functions, and they have a number of other useful properties and are very common in applications. We will examine what it means graphically for a function to be continuous or not continuous. Some properties of continuous functions will be given, and we will look at a few applications of these properties including a way to solve horrible equations such as \sin (x)=\frac{2 x+1}{x-2}.



Source: Dave Hoffman, https://s3.amazonaws.com/saylordotorg-resources/wwwresources/site/wp-content/uploads/2012/12/MA005-2.4-Continuous-Functions.pdf
Creative Commons License This work is licensed under a Creative Commons Attribution 3.0 License.

Definition and Meaning of Continuous

Definition of Continuity at a Point

A function \mathbf{f} is continuous at \mathbf{x}=\mathbf{a} if and only if \lim\limits_{x \rightarrow a} \mathbf{f}(\mathbf{x})=\mathbf{f} \mathrm{(a)} .

The graph in Fig. 1 illustrates some of the different ways a function can behave at and near a point, and Table 1 contains some numerical information about the function and its behavior. the information in the table, we can conclude that \mathrm{f} is continuous at 1 since \lim\limits_{x \rightarrow 1} \mathrm{f}(\mathrm{x})=2=\mathrm{f}(1).



\mathrm{1}

\mathrm{f(a)}

\lim\limits_{x \rightarrow a} f(x)

\mathrm{1} 

\mathrm{2}

\mathrm{2}

\mathrm{2}

\mathrm{2}

\mathrm{2}

\mathrm{3}

\mathrm{2}

does not exist

\mathrm{4}

undefined

\mathrm{2}


We can also conclude from the information in the table that \mathrm{f} is not continuous at 2 or 3 or 4 , because \lim\limits_{x \rightarrow 2} \mathrm{f}(\mathrm{x}) \neq \mathrm{f}(2), \lim\limits_{x \rightarrow 3} \mathrm{f}(\mathrm{x}) \neq
    \mathrm{f}(3), and \lim\limits_{x \rightarrow 4} \mathrm{f}(\mathrm{x}) \neq \mathrm{f}(4).

Graphic Meaning of Continuity

When x is close to 1, the values of f(x) are close to the value f(1) and the graph of \mathrm{f} in Fig. 1 does not have a hole or break at \mathrm{x}=1. The graph of \mathrm{f} is connected at \mathrm{x}=1 and can be drawn without lifting your pencil. At \mathrm{x}=2 and \mathrm{x}=4 the graph of \mathrm{f} has holes, and at \mathrm{x}=3 the graph has a break. The function \mathrm{f} is also continuous at 1.7 (why?), and at every point shown except at 2, 3, and 4.

Informally: A function is continuous at \mathrm{a} point if the graph of the function is connected there.

A function is not continuous at a point if its graph has a hole or break at that point. 

Sometimes the definition of continuous (the substitution condition for limits) is easier to use if we break it into several smaller pieces and then check whether or not our function satisfies each piece.

\{\mathrm{f} is continuous at \mathrm{a} \} if and only if \left\{\lim\limits_{x \rightarrow a} \mathrm{f}(\mathrm{x})=\mathrm{f}(\mathrm{a})\right\} if and only if

(i) \mathrm{f} is defined at \mathrm{a},

(ii) the limit of \mathrm{f}(\mathrm{x}), as \mathrm{x} \rightarrow \mathrm{a}, exists (so the left limit and right limits exist and are equal)

and (iii) the value of \mathrm{f}at \mathrm{a}equals the value of the limit as \mathrm{x} \rightarrow \mathrm{a} : \lim\limits_{x \rightarrow a} \mathrm{f}(\mathrm{x})=\mathrm{f}(\mathrm{a}).

If \mathrm{f} satisfies conditions (i), (ii) and (iii), then \mathrm{f} is continuous at \mathrm{a}. If \mathrm{f} does not satisfy one or more of the three conditionsat \mathrm{a}, then f is not continuous at a.

For the function in Fig. 1, at a=1, all 3 conditions are satisfied, and f is continuous at 1 . At a=2 conditions (i) and (ii) are satisfied but not (iii), so \mathrm{f} is not continuous at 2 . At \mathrm{a}=3, condition (i) is satisfied but (ii) is violated, so f is not continuous at 3 . At a=4, condition (i) is violated, so f is not continuous at 4.

A function is continuous on an interval if it is continuous at every point in the interval. A function \mathrm{f} is continuous from the left at \mathrm{a} if \lim\limits_{x \rightarrow a^{-}} \mathrm{f}(\mathrm{x})=\mathrm{f}(\mathrm{a}), and is continuous from the right if \lim\limits_{x \rightarrow a^{+}} f(x)=f(a).

Example 1: Is  f(x)  =  \left\{ \begin{array}{lll}x + 1 & \mbox {if  x ≤ 1 } \\   2 & \mbox { if 1 < x ≤ 2 } \\ 1/(x–3) & \mbox { if  x > 2} \end{array} \right. continuous at 1,2,3?

Solution: We could answer these questions by examining the graph of \mathrm{f}(\mathrm{x}), but lets try them without the graph. At \mathrm{a}=\mathbf{1}, \mathrm{f}(\mathbf{1})=2 and the left and right limits are equal, \mathrm{f}(\mathrm{x})=\lim\limits_{x \rightarrow 1^{-}}(x+1)=2 and \lim\limits_{x \rightarrow 1^{+}} \mathrm{f}(\mathrm{x})=\lim\limits_{x \rightarrow 1^{+}} 2=2, so \mathrm{f} is continuous at \mathbf{1}

At \mathrm{a}=\mathbf{2}, \mathrm{f}(\mathbf{2})=2, but the left and right limits are not equal,

\lim\limits_{x \rightarrow 2^{-}} f(x)=\lim\limits_{x \rightarrow 2^{-}} 2=2 and \lim\limits_{x \rightarrow 2^{+}} f(x)=\lim\limits_{x \rightarrow 2^{+}} 1 /(x-3)=-1, so \mathrm{f} fails condition (ii) and is not continuous at 2. \mathrm{f} is continuous from the left at \mathbf{2}, but not from the right.

At \mathrm{a}=\mathbf{3}, \mathrm{f}(\mathbf{3})=1 / 0 which is undefined so \mathrm{f} is not continuous at \mathbf{3} because it fails condition (i).

Example 2: Where is f(x)=3 x^{2}-2 x continuous?

Solution: At every point. By the Substitution Theorem for Polynomials, every polynomial is continuous everywhere.

Example 3: Where are \mathrm{g}(\mathrm{x})=\frac{\mathrm{x}+5}{\mathrm{x}-3} \quad and \mathrm{h}(\mathrm{x})=\frac{\mathrm{x}^{2}+4 \mathrm{x}-5}{\mathrm{x}^{2}-4 \mathrm{x}+3} continuous?

Solution: \mathrm{g} is a rational function so by the Substitution Theorem for Polynomials and Rational Functions it is continuous everywhere except where its denominator is 0: \mathrm{g} is continuous everywhere except 3 . The graph of g (Fig. 2) is connected everywhere except at 3 where it has a vertical asymptote. \mathrm{h}(\mathrm{x})=\frac{(\mathrm{x}-1)(\mathrm{x}+5)}{(\mathrm{x}-1)(\mathrm{x}-3)} is also continuous everywhere except where its denominator is 0: \mathrm{h} is continuous everywhere except 3 and 1 . The graph of h (Fig.3) is connected everywhere except at 3 where it has a vertical asymptote and at 1 where it has a hole: \mathrm{f}(1)=0 / 0 is undefined.


Example 4: \quad Where is f(x)=\operatorname{INT}(x) continuous?

Solution: The graph of \mathrm{y}=\operatorname{INT}(\mathrm{x}) seems to be connected except at each integer, and at each integer there is a "jump" (Fig.4).


If \mathrm{a} is an integer, then \lim\limits_{x \rightarrow a^{-}} \operatorname{INT}(x)=a-1, and \lim\limits_{x \rightarrow a^{+}} \operatorname{INT}(x)=a, so \lim\limits_{x \rightarrow a} \operatorname{INT}(x) is undefined, and \mathrm{INT(x)} is not continuous.

If \mathrm{a} is not an integer, then the left and right limits of \mathrm{INT(x)}, as x \rightarrow a, both equal \mathrm{INT(a)} so

\lim\limits_{x \rightarrow a} \operatorname{INT}(x)=\operatorname{INT}(a)=f(a) and \operatorname{INT}(x) is continuous. f(x)=\operatorname{INT}(x) is continuous except at the integers.

In fact, f(x)=\operatorname{INT}(x) is continuous from the right everywhere and is continuous from the left everywhere except at the integers.

Practice 1: \quad Where is \mathrm{f}(\mathrm{x})=\mid \mathrm{xl} / \mathrm{x} continuous?

Why Do We Care Whether a Function Is Continuous?

There are several reasons for us to examine continuous functions and their properties:

  • Most of the applications in engineering, the sciences, and business are continuous and are modeled by continuous functions or by pieces of continuous functions.
  • Continuous functions have a number of useful properties which are not necessarily true if the function is not continuous. If a result is true of all continuous functions and we have a continuous function, then the result is true for our function. This can save us from having to show, one by one, that each result is true for each particular function we use. Some of these properties are given in the rest of this section.
  • Differential calculus has been called the study of continuous change, and many of the results of calculus are guaranteed to be true only for continuous functions. If you look ahead into Chapters 2 and 3, you will see that many of the theorems have the form "If \mathrm{f} is continuous and (some additional hypothesis), then (some conclusion)".

Combinations of Continuous Functions

Theorem: If \quad \mathrm{f}(\mathrm{x}) and \mathrm{g}(\mathrm{x}) are continuous at \mathrm{a}, and \mathrm{k} is any constant,

then the elementary combinations of f and g (k \cdot f(x), f(x)+g(x), f(x)-g(x), f(x) \cdot g(x), \text { and } f(x) / g(x)(g(a) \neq 0)) are continuous at \mathrm{a}.

The continuity of a function is defined in terms of limits, and all of these results about simple combinations of continuous functions follow from the results about simple combinations of limits in the Main Limit Theorem. Our hypothesis is that \mathrm{f} and \mathrm{g} are both continuous at a, so we can assume that \lim\limits_{x \rightarrow a} f(x)=f(a) and \quad \lim\limits_{x \rightarrow a} g(x)=g(a) and then use the appropriate part of the Main Limit Theorem. For example, \lim\limits_{x \rightarrow a}\{\mathrm{f}(\mathrm{x})+\mathrm{g}(\mathrm{x})\}=\left\{\lim\limits_{x \rightarrow a} \mathrm{f}(\mathrm{x})\right\}+\left\{\lim\limits_{x \rightarrow a} \mathrm{~g}(\mathrm{x})\right\}=\mathrm{f}(\mathrm{a})+\mathrm{g}(\mathrm{a}), so \mathrm{f}+\mathrm{g} is continuous at \mathrm{a}.

Practice 2: Prove: If \mathrm{f} and \mathrm{g} are continuous at \mathrm{a}, then \mathrm{kf} and \mathrm{f}-\mathrm{g} are continuous at \mathrm{a}. (\\mathrm{k} a constant.)

Composition of Continuous Functions

If \mathrm{g} is continuous at \mathrm{a} and \mathrm{f} is continuous at \mathrm{g}(\mathrm{a}), then \quad \lim\limits_{x \rightarrow a}\{\mathrm{f}(\mathrm{g}(\mathrm{x}))\}=\mathrm{f}\left(\lim\limits_{x \rightarrow a} \mathrm{~g}(\mathrm{x})\right)=\mathrm{f}(\mathrm{g}(\mathrm{a})) so \\mathrm{f}\circ\mathrm{g(x)} =\mathrm{f}(\mathrm{g}(\mathrm{x}))\) is continuous at \mathrm{a}.

This result will not be proved here, but the proof just formalizes the following line of reasoning:

The hypothesis that "\mathrm{g} is continuous at \mathrm{a}" means that if x is close to \mathrm{a} then g(x) will be close to \mathrm{g}(\mathrm{a}). Similarly, "\mathrm{f} is continuous at \mathrm{g} (\mathrm{a})" means that if \mathrm{g}(\mathrm{x}) is close to \mathrm{g}(\mathrm{a}) then f(g(x))=f \circ g(x) will be close to f(g(a))=f \circ g(a). Finally, we can conclude that if x is close to a then \mathrm{g}(\mathrm{x}) is close to \mathrm{g}(\mathrm{a}) so \mathrm{f}\circ\mathrm{g(x)}  is close to \mathrm{f}\circ\mathrm{g(a)} , and therefore \mathrm{f}\circ\mathrm{g} is continuous at \mathrm{x}=\mathrm{a}.

The next theorem presents an alternate version of the limit condition for continuity, and we will use this alternate version occasionally in the future.

Theorem: \quad \lim\limits_{x \rightarrow a} f(x)=f(a) if and only if \quad \lim\limits_{h \rightarrow 0} f(a+h)=f(a).

Proof: Let's define a new variable \mathrm{h} by \mathrm{h}=\mathrm{x}-\mathrm{a} so \mathrm{x}=\mathrm{a}+\mathrm{h}

(Fig. 5). Then x \rightarrow a if and only if h=x-a \rightarrow 0, so \lim\limits_{x \rightarrow a} f(x)=\lim\limits_{h \rightarrow 0} f(a+h), and \lim\limits_{x \rightarrow a} f(x)=f(a) if and only if \lim\limits_{h \rightarrow 0} f(a+h)=f(a).


A function \mathbf{f} is continuous at \mathrm{a} if and only if \lim\limits_{h \rightarrow 0} \mathbf{f}(\mathbf{a}+\mathbf{h})=\mathbf{f}(\mathbf{a}).

Which Functions Are Continuous?

Fortunately, the situations which we encounter most often in applications and the functions which model those situations are either continuous everywhere or continuous everywhere except at a few places, so any result which is true of all continuous functions will be true of most of the functions we commonly use.

Theorem: The following functions are continuous everywhere, at every value of \mathrm{x}:

(a) polynomials, (b) \sin (x) and \cos (x) and (c) |\times|.

Proof: (a) This follows from the

Substitution Theorem for Polynomials and the definition of continuity.

(b) The graph of \mathrm{y}=\sin (\mathrm{x}) (Fig. 6) clearly indicates that \sin (\mathrm{x}) does not have any holes or breaks so \sin (\mathrm{x}) is continuous everywhere. Or we could justify that result analytically:


for every real number \mathrm{a},

\begin{aligned} \lim\limits_{h \rightarrow 0} \sin (a+h) &=\lim\limits_{h \rightarrow 0} \sin (a) \cos (\mathrm{h})+\cos (a) \sin (h) \\ &=\lim\limits_{h \rightarrow 0} \sin (a) \cdot \lim\limits_{h \rightarrow 0} \cos (\mathrm{h})+\lim\limits_{h \rightarrow 0} \cos (\mathrm{a}) \cdot \lim\limits_{h \rightarrow 0} \sin (\mathrm{h}) \end{aligned}

(recall from section 1.2 that \quad \lim\limits_{h \rightarrow 0} \cos (\mathrm{h})=1 and \lim\limits_{h \rightarrow 0} \sin (\mathrm{h})=0)

=\lim\limits_{h \rightarrow 0} \sin (a) \cdot \mathbf{1}+\lim\limits_{h \rightarrow 0} \cos (\mathrm{a}) \cdot \mathbf{0}=\sin (\mathrm{a})

so f(x)=\sin (x) is continuous at every point. The justification of f(x)=\cos (x) is similar.

(c) \mathrm{f}(\mathrm{x})=|\mathrm{x}|. When \mathrm{x}>0, then |\mathrm{x}|=\mathrm{x} and its graph (Fig. 7) is a straight line and is continuous since x is a polynomial function. When x, then |x|=-x and it is also continuous. The only questionable point is the "corner" on the graph when \mathrm{x}=0, but the graph there is only bent, not broken:


\lim\limits_{h \rightarrow 0^{+}}|x|=\lim\limits_{h \rightarrow 0^{+}} x=0

and \lim\limits_{h \rightarrow 0^{-}}|x|=\lim\limits_{h \rightarrow 0^{-}}-x=0 so \lim\limits_{h \rightarrow 0}|x|=0=10,

and \mathrm{f}(\mathrm{x})=|\mathrm{x}| is also continuous at \mathrm{0}.

A continuous function can have corners but not holes or breaks (jumps). 

Several results about limits of functions can be written in terms of continuity of those functions. Even

functions which fail to be continuous at some points are often continuous most places.

Theorem: (a) A rational function is continuous except where the denominator is \mathrm{0}.

(b) Tangent, cotangent, secant and cosecant are continuous except where they are undefined.

(c) The greatest integer function \mathrm{[ x ] = INT(x)} is continuous except at each integer.

(d) But the "holey" function \mathrm{h}(\mathrm{x})= \begin{cases}2 & \text { if } \mathrm{x} \text { is a rational number } \\ 1 & \text { if } \mathrm{x} \text { is an irrational number }\end{cases} is discontinuous everywhere.

Intermediate Value Property of Continuous Functions

Since the graph of a continuous function is connected and does not have any holes or breaks in it, the values of the function can not "skip" or "jump over" a horizontal line (Fig. 8). If one value of the continuous function is below the line and another value of the function is above the line, then somewhere the graph will cross the line. The next theorem makes this statement more precise. The result seems obvious, but its proof is technically difficult and is not given here.


Intermediate Value Theorem for Continuous Functions

If \mathrm{f} is continuous on the interval [\mathrm{a}, \mathrm{b}] and \mathrm{V} is any value between \mathrm{f}(\mathrm{a}) and \mathrm{f}(\mathrm{b}),

then there is a number \mathrm{c} between \mathrm{a} and \mathrm{b} so that \mathrm{f}(\mathrm{c})=\mathrm{V}

(that is, f actually takes each intermediate value between \mathrm{f}(\mathrm{a}) and \mathrm{f}(\mathrm{b})).

If the graph of \mathrm{f} connects the points (\mathrm{a}, \mathrm{f}(\mathrm{a})) and (\mathrm{b}, \mathrm{f}(\mathrm{b})) and \mathrm{V} is any number between \mathrm{f}(\mathrm{a}) and \mathrm{f}(\mathrm{b}), then the graph of \mathrm{f} must cross the horizontal line \mathrm{y}=\mathrm{V} somewhere between \mathrm{x}=\mathbf{a} and \mathbf{x}=\mathbf{b} (Fig.9). Since \mathrm{f} is continuous, its graph cannot "hop" over the line \mathrm{y}=\mathrm{V}.


Most people take this theorem for granted in some common situations:

  • If a child's temperature rose from 98.6^{\circ} to 101.3^{\circ}, then there was an instant when the child's temperature was exactly 100^{\circ}. In fact, every temperature between 98.6^{\circ} and 101.3^{\circ} occurred at some instant.
  • If you dove to pick up a shell 25 feet below the surface of a lagoon, then at some instant in time you were 17 feet below the surface. (Actually, you want to be at 17 feet twice. Why?)
  • If you started driving from a stop (velocity =0) and accelerated to a velocity of 30 kilometers per hour, then there was an instant when your velocity was exactly 10 kilometers per hour.

But we cannot apply the Intermediate Value Theorem if the function is not continuous:

  • In 1987 it cost 22¢ to mail a letter first class inside the United States, and in 1990 it cost 25¢ to mail the same letter, but we cannot conclude that there was a time when it cost 23¢ or 24¢ to send the letter. Postal rates did not increase in a continuous fashion. They jumped directly from 22¢ to 25¢.
  • Prices, taxes, and rates of pay change in jumps, discrete steps, without taking on the intermediate values.

The Intermediate Value Property can help us finds roots of functions and solve equations. If \mathrm{f} is continuous on [a, b] and f(a) and f(b) have opposite signs (one is positive and one is negative), then \mathrm{0}  is an intermediate value between \mathrm{f}(\mathrm{a}) and \mathrm{f}(\mathrm{b}) so \mathrm{f} will have a root between \mathrm{x}=\mathrm{a} and \mathrm{x}=\mathrm{b}.

Bisection Algorithm for Approximating Roots

The Intermediate Value Theorem is an example of an "existence theorem" because it concludes that something exists: a number \mathrm{c} so that \mathrm{f}(\mathrm{c})=\mathrm{V}. Many existence theorems do not tell us how to find the number or object which exists and are of no use in actually finding those numbers or objects. However, the Intermediate Value is the basis for a method commonly used to approximate the roots of continuous functions, the Bisection Algorithm.

Bisection Algorithm for Finding a Root of f(x)

(i) Find two values of x, say a and b, so that f(a) and f(b) have opposite signs (then \mathrm{f}(\mathrm{x}) has a root between a and \mathrm{b}, a root in the interval [\mathrm{a}, \mathrm{b}]).

(ii) Calculate the midpoint (bisection point) of the interval [a, b], m=(a+b) / 2, and evaluate \mathrm{f}(\mathrm{m}).

(iii) (a) If \mathrm{f}(\mathrm{m})=0, then \mathrm{m} is a root of \mathrm{f}, and we are done.

(b) If f(m) \neq 0, then f(m) has the sign opposite one of f(a) or f(b) :

if \mathrm{f}(\mathrm{a}) and \mathrm{f}(\mathrm{m}) have opposite signs, then \mathrm{f} has a root in [\mathrm{a}, \mathrm{m}] so put \mathrm{b}=\mathrm{m}

if \mathrm{f}(\mathrm{b}) and \mathrm{f}(\mathrm{m}) have opposite signs, then \mathrm{f} has a root in [\mathrm{m}, \mathrm{b}] so put \mathrm{a}=\mathrm{m}

(iv) Repeat steps (ii) and (iii) until a root is found exactly or is approximated closely enough.

The length of the interval known to contain a root is cut in half each time through steps (ii) and (iii) so the Bisection Algorithm quickly "squeezes" in on a root (Fig. 10).


The steps of the Bisection Algorithm can be done "by hand", but it is tedious to do very many of them that way. Computers are very good with this type of tedious repetition, and the algorithm is simple to program.


Example 7: Find a root of f(x)=x-x^{3}+1.

Solution: \mathrm{f}(0)=1 and \mathrm{f}(1)=1 so we cannot conclude that \mathrm{f} has a root between 0 and 1. f(1)=1 and f(2)=-5 have opposite signs, so by the Intermediate Value Property of continuous functions (this function is a polynomial so it is continuous everywhere) we know that there is a number c between 1 and 2 such that \mathrm{f}(\mathrm{c})=0 (Fig. 11). The midpoint of the interval [1,2] is m=(1+2) / 2=3 / 2=1.5, and f(3 / 2)=-7 / 8 so \mathrm{f} changes sign between 1 and 1.5 and we can be sure that there is a root between 1 and 1.5. If we repeat the operation for the interval [1,1.5], the midpoint is \mathrm{m}=(1+1.5) / 2=1.25, and \mathrm{f}(1.25)=19 / 64>0  so \mathrm{f} changes sign between 1.25 and 1.5 and we know \mathrm{f} has a root between 1.25 and 1.5.


Repeating this procedure a few more times, we get that

a

b

m=(b+a) / 2

\mathrm{f}(\mathrm{a})

\mathrm{f}(\mathrm{b})

\mathrm{f}(\mathrm{m})

root between

 1

  2

 

 1

 −5

 

 1

 2

 1

 2

 1.5

 1

 −5

 –0.875

 1

 1.5

 1

 1.5

 1.25

 1

 −0.875

 0.2969

 1.25

 1.5

 1.25

1.5

 1.375

 0.2969

 −0.875

 –0.2246

 1.25

 1.375

 1.25

1.375

 1.3125

 0.2969

 −0.2246

 0.0515

 1.3125

 1.375

 1.3125

 1.375

 1.34375

   

 

   

 

If we continue the table, the interval containing the root will squeeze around the value \mathrm{1.324718}.

The Bisection Algorithm has one major drawback - there are some roots it does not find. The algorithm requires that the function be both positive and negative near the root so that the graph actually crosses the x-axis. The function f(x)=x^{2}-6
    x+9=(x-3)^{2} has the root x=3 but is never negative (Fig. 12).

We cannot find two starting points a and b so that f(a) and f(b) have opposite signs, and we cannot use the Bisection Algorithm to find the root \mathrm{x}=3. In Chapter 2 we will see another method, Newton's Method, which does find roots of this type.


The Bisection Algorithm requires that we supply two starting points \mathrm{a} and \mathrm{b}, two \mathrm{x}-values at which the function has opposite signs. These values can often be found with a little "trial and error", or we can examine the graph of the function and use it to help pick the two values.

Finally, the Bisection Algorithm can also be used to solve equations because the solution of any equation can always be transformed into an equivalent problem of finding roots by moving everything to one side of the equal sign. For example, the problem of solving the equation x^{3}=x+1 can be transformed into the equivalent problem of solving x+1-x^{3}=0 or of finding the roots of f(x)=x+1-x^{3} which we did in the previous example.


Example 8: \quad Find all of the solutions of \sin (x)=\frac{2 x+1}{x-2}. (x is in radians).

Solution: We can convert this problem of solving an equation to the problem of finding the roots of \mathrm{f}(\mathrm{x})=\sin (\mathrm{x})-\frac{2 \mathrm{x}+1}{\mathrm{x}-2}=0. The function \mathrm{f}(\mathrm{x}) is continuous everywhere except at \mathrm{x}=2, and the graph of \mathrm{f}(\mathrm{x}) in Fig. 13 can help us find two starting values for the Bisection Algorithm. The graph shows that \mathrm{f}(-1) is negative and \mathrm{f}(0) is positive, and we know \mathrm{f}(\mathrm{x}) is continuous on the interval [-1,0]. Using the algorithm with the starting interval [-1,0], we get that the root is contained in the shrinking intervals:

\begin{aligned} &{[-.5,0],[-.25,0],[-.25,-.125], \ldots} \\ &{[-.238281,-.236328], \ldots,[-.237176,-.237177]} \end{aligned}

so the root is approximately -.237177.


We might also notice that \mathrm{f}(0)=0.5 is positive and \mathrm{f}(\pi)=0-\frac{2 \pi+1}{\pi-2} \approx-6.38 is negative. Why is it wrong to conclude that \mathrm{f}(\mathrm{x}) has another root between x=0 and x=\pi?

Practice Problem Answers

Practice 1: \quad f(x)=\frac{|x|}{x} \quad (Fig. 23) is continuous everywhere except at \mathbf{x}=\mathbf{0} where this function is not defined.

If a > 0, then \lim\limits{x \rightarrow a} \frac{|x|}{x}=1=\mathrm{f}(\mathrm{a}) so \mathrm{f} is continuous at \mathrm{a}. If a < 0, then \lim\limits_{x \rightarrow a} \frac{|x|}{x}=-1=\mathrm{f}(\mathrm{a}) so \mathrm{f} is continuous at \mathrm{a}.

\mathrm{f}(0) is not defined., \lim\limits_{x \rightarrow 0^{-}} \frac{|x|}{x}=-1 and \lim\limits_{x \rightarrow 0^{+}} \frac{|x|}{x}=+1 so \lim\limits_{x \rightarrow 0} \frac{|x|}{x} does not exist.

Practice 2: (a) To prove that \mathrm{kf} is continuous at \mathrm{a}, we need to prove that \mathrm{kf} satisfies the definition of continuity at \mathrm{a}: \lim\limits_{x \rightarrow a} \operatorname{kf}(\mathrm{x})=\mathrm{kf}(\mathrm{a}).

Using results about limits, we know

\lim\limits_{x \rightarrow a} \mathrm{kf}(\mathrm{x})=\mathrm{k} \lim\limits_{x \rightarrow a} \mathrm{f}(\mathrm{x})=\mathrm{kf}(\mathrm{a}) (since \mathrm{f} is assumed to be continuous at \mathrm{a}) so \mathrm{kf} is continuous at \mathrm{a}.

(b) To prove that \mathrm{f}-\mathrm{g} is continuous at \mathrm{a}, we need to prove that \mathrm{f}-\mathrm{g} satisfies the definition of continuity at \mathrm{a}: \lim\limits_{x \rightarrow a}(f(x)-g(x))=f(a)-g(a)

Again using information about limits,

\lim\limits_{x \rightarrow a}(\mathrm{f}(\mathrm{x})-\mathrm{g}(\mathrm{x}))=\lim\limits_{x \rightarrow a} \mathrm{f}(\mathrm{x})-\lim\limits_{x \rightarrow a} \mathrm{~g}(\mathrm{x})=\mathrm{f}(\mathrm{a})-\mathrm{g}(\mathrm{a}) (since \mathrm{f} and \mathrm{g} are both continuous at \mathrm{a}) so \mathrm{f – g} is continuous at \mathrm{a}.