Continuity

In many cases, you can compute $\displaystyle \lim_{x\to a} f(x)$ by plugging a in for x:

$$\lim_{x \to a} f(x) = f(a).$$

For example,

$$\lim_{x\to 3} (2x^3 - 5x + 1) = 2\cdot 3^3 - 5\cdot 3 + 1 = 40.$$

This situation arises often enough that it has a name.

Definition. A function $f(x)$ is continuous at a if

$$\lim_{x \to a} f(x) = f(a).$$

This definition really comprises three things, each of which you need to check to show that f is continuous at a:

  1. $f(a)$ is defined.
  2. $\lim_{x \to a} f(x)$ is defined.
  3. The two are equal: $\lim_{x \to a} f(x)
   = f(a)$ .

What does this mean geometrically? Here are the three criteria above in pictorial language:

  1. "$f(a)$ is defined" means there's a point on the graph at a.
  2. "$\lim_{x \to a} f(x)$ is defined" means the graph approaches a single numerical value as you get close to a.
  3. "$\lim_{x \to a} f(x) = f(a)$ " means that the value you're approaching is the value that f actually takes on --- there are "no surprises".

The first criterion means that there can't be a hole or gap in the graph. This also rules out vertical asymptotes. Here are some pictures of these kinds of discontinuities:

$$\hbox{\epsfysize=2.2in \epsffile{contin1.eps}}$$

The second criterion means that the graph can't "jump" at a. This is a jump discontinuity:

$$\hbox{\epsfysize=1.1in \epsffile{contin2.eps}}$$

A jump discontinuity occurs when the left and right-hand limits aren't equal.

The third criterion means that the graph is "filled in" at $x = a$ as you'd expect. You don't get close to a expecting one value and then find that $f(a)$ is something different, as you do below:

$$\hbox{\epsfysize=1.1in \epsffile{contin3.eps}}$$

This is called a removable discontinuity because you could make the function continuous by filling in the hole. In terms of limits, it means that $\displaystyle \lim_{x\to a} f(x)$ exists, but $\displaystyle \lim_{x\to a} f(x) \ne f(a)$ .

Here are some classes of continuous functions:


Example. $f(x)
   = 10x^{100} - 15 x + 41$ is continuous for all x, since it's a polynomial.

$\tan x$ is continuous for all x except odd multiples of $\dfrac{\pi}{2}$ . ($\tan x$ is undefined at odd multiples of $\dfrac{\pi}{2}$ .)

$\sqrt{x}$ is continuous for $x \ge
   0$ . ($\sqrt{x}$ is undefined for $x < 0$ .)


Example. What kind of discontinuity does $f(x) = \dfrac{x^2 - 1}{x^2 - x - 2}$ have at $x = -1$ ?

Since

$$\lim_{x\to -1} \dfrac{x^2 - 1}{x^2 - x - 2} = \lim_{x\to -1} \dfrac{(x - 1)(x + 1)}{(x - 2)(x + 1)} = \lim_{x\to -1} \dfrac{x - 1}{x - 2} = \dfrac{2}{3},$$

the limit is defined. However, $f(-1)$ is undefined. Therefore, there is a removable discontinuity at $x = -1$ . I could make the function continuous at $x = -1$ by defining $f(-1) = \dfrac{2}{3}$ .


Example. What kind of discontinuity does

$$f(x) = \cases{x^2 + 3 & if $x > 2$ \cr 4x & if $x \le 2$ \cr}$$

have at $x = 2$ ?

Since

$$\lim_{x\to 2^+} f(x) = \lim_{x\to 2^+} (x^2 + 3) = 7 \quad\hbox{and}\quad \lim_{x\to 2^-} f(x) = \lim_{x\to 2^-} 4x = 8,$$

the left and right-hand limits aren't equal. Therefore, there is a jump discontinuity at $x = 2$ .


You can use operations on functions to create new continuous functions.


Example. Since $e^x$ and $x^3$ are continuous for all x, their sum $e^x +
   x^3$ and their product $x^3e^x$ are continuous for all x.

The quotient $\dfrac{e^x}{x^3}$ is continuous for all x except $x = 0$ (where the quotient is undefined).

Composition is an important method for constructing continuous functions. For example, $f(x) = \sin x$ is continuous for all x. The polynomial $g(x) = x^4 - 7x^2 + x + 1$ is also continuous for all x. Hence, the composite

$$(f\circ g)(x) = \sin (x^4 - 7x^2 + x + 1)$$

is continuous for all x.


Example. Let

$$f(x) = \cases{1 & if $x < 0$ \cr x^2 & if $0 \le x < 1$ \cr \sin \dfrac{\pi x}{2} & if $x \ge 1$}.$$

Where is f continuous?

The function is continuous except possibly at the "break points" between the three pieces. I must check the points $x = 0$ and $x = 1$ separately.

$$\hbox{\epsfysize=1.75in \epsffile{contin4.eps}}$$

At $x = 0$ ,

$$\lim_{x \to 0-} f(x) = 1 \quad\hbox{but}\quad \lim_{x \to 0+} f(x) = 0.$$

Since the left- and right-hand limits do not agree,

$$\lim_{x \to 0} f(x) \hbox{ is undefined}.$$

Hence, f is not continuous at $x = 0$ .

At $x = 1$ ,

$$\lim_{x \to 1-} f(x) = \lim_{x \to 1-} x^2 = 1, \quad\hbox{and}\quad \lim_{x \to 1+} f(x) = \lim_{x \to 1+} \sin \dfrac{\pi x}{2} = 1.$$

The left- and right-hand limits agree, so

$$\lim_{x \to 1} f(x) = 1.$$

Now $f(1) = 1$ , so

$$\lim_{x \to 1} f(x) = 1 = f(1).$$

Therefore, f is continuous at $x = 1$ .

Conclusion: f is continuous for all x except $x = 0$ .


Example. Let

$$f(x) = \dfrac{x^2 - 2x - 3}{x^2 - 1}.$$

Where is f continuous?

f is a quotient of two polynomials, so it is continuous at all points except those which make the bottom equal to 0.

Hence, f is continuous for all x except $x = 1$ and $x = -1$ .

However, the discontinuity at $x = -1$ is a removable discontinuity:

$$\lim_{x \to -1} f(x) = \lim_{x \to -1} \dfrac{x^2 - 2x - 3}{x^2 - 1} = \lim_{x \to -1} \dfrac{(x - 3)(x + 1)}{(x - 1)(x + 1)} = \lim_{x \to -1} \dfrac{x - 3}{x - 1} = \dfrac{-4}{-2} = 2.$$

$f(-1)$ is undefined, but if I defined $f(-1) = 2$ , then the new f would be continuous at $x = -1$ .

On the other hand, the discontinuity at $x = 1$ is a vertical asymptote; no matter how I define $f(1)$ , the function will still be discontinuous at $x = 1$ .


Continuous functions possess the intermediate value property. Roughly put, it says that a if continuous function goes from one value to another, it doesn't skip any values in between. This corresponds to the geometric intuition that the graph of a continuous function doesn't have any gaps, jumps, or holes. Here is the precise statement.

Theorem. Let $f(x)$ be a continuous function on the interval $[a,b]$ . If m is a number between $f(a)$ and $f(b)$ , then

$$f(c) = m \quad\hbox{for some number}\quad c \quad\hbox{in the interval}\quad [a,b].$$

The theorem is illustrated in the picture below:

$$\hbox{\epsfysize=1.75in \epsffile{contin5.eps}}$$

Try it for yourself: Pick any height m between $f(a)$ and $f(b)$ . Move horizontally from your chosen height to the graph, then downward from the graph till you hit the x-axis. The place where you hit the x-axis is c. You'll always be able to do this if f is continuous. The intuitive idea is that, being continuous, f can't skip any values in going from $f(a)$ to $f(b)$ .

A proof of the Intermediate Value Theorem uses some deep properties of the real numbers, and is beyond the scope of this discussion. As you saw above, the result is geometrically obvious.

Here's a subtle point:

You can know something exists without being able to find it.

If I take your car keys and throw them into a nearby corn field, you know that your keys are in the field --- but finding them is a different story!

The Intermediate Value Theorem says there is a number c such that $f(c) = m$ . It doesn't tell you how to find it, though you can usually approximate c as closely as you want.

And by the way --- there may be more than one number c which works.


Example. Suppose f is a continuous function, $f(4) = 11$ , and $f(7) = 2$ . Prove that for some number x between 4 and 7, $f(x) + x^2 = 42$ .

Since $x^2$ and $f(x)$ are continuous, $f(x) + x^2$ is continuous. Plug in 4 and 7:

$$f(4) + 4^2 = 11 + 16 = 27, \quad f(7) + 7^2 = 2 + 49 = 51.$$

42 is between 27 and 51, so I can apply the Intermediate Value Theorem to $f(x) + x^2$ . It says that there is a number x between 4 and 7 such that $f(x) + x^2 = 42$ .


Example. Approximate a solution to the equation

$$x^5 + 7x^3 + 7x + 1 = 0.$$

Here's the graph:

$$\hbox{\epsfysize=2in \epsffile{contin6.eps}}$$

It looks as though there's a root between -0.5 and 0.

A clever person might say at this point: "Why not just look up the general formula for solving a 5-th degree equation?" After all, there's the general quadratic formula for quadratics ... and there's a general cubic formula and a general quartic formula, though you'd probably have to look them up in a book of tables.

Unfortunately, you'll never find a general quintic formula in any book of tables. Nils Henrik Abel showed almost 150 years ago that there's no general quintic, and Evariste Galois showed a little later that you won't have any luck with higher degree equations, either.

You can still approximate the root, and the Intermediate Value Theorem guarantees that there is one.

$$f(-0.5) \approx -3.40625 \quad\hbox{and}\quad f(0) = 1,$$

and f (being a polynomial) is surely continuous. In this situation, the IVT says that f can't go from negative to positive without passing through 0 somewhere in between.

I'll approximate the root by bisection. At each step, I'll know the root is caught between two numbers. I'll plug the midpoint into f. The root is now on one side or the other, and I just keep going.

This is exactly what common sense would lead you to do.

Here's the computation:

$$\vbox{\offinterlineskip \halign{& \vrule # & \strut \hfil \quad # \quad \hfil \cr \noalign{\hrule} height2pt & \omit & & \omit & & \omit & \cr & x & & $f(x)$ positive & & $f(x)$ negative & \cr height2pt & \omit & & \omit & & \omit & \cr \noalign{\hrule} height2pt & \omit & & \omit & & \omit & \cr & -0.5 & & & & -3.40625 & \cr height2pt & \omit & & \omit & & \omit & \cr \noalign{\hrule} height2pt & \omit & & \omit & & \omit & \cr & 0.0 & & 1 & & & \cr height2pt & \omit & & \omit & & \omit & \cr \noalign{\hrule} height2pt & \omit & & \omit & & \omit & \cr & -0.25 & & & & -0.860352 & \cr height2pt & \omit & & \omit & & \omit & \cr \noalign{\hrule} height2pt & \omit & & \omit & & \omit & \cr & -0.125 & & 0.111298 & & & \cr height2pt & \omit & & \omit & & \omit & \cr \noalign{\hrule} height2pt & \omit & & \omit & & \omit & \cr & -0.1875 & & & & -0.358874 & \cr height2pt & \omit & & \omit & & \omit & \cr \noalign{\hrule} height2pt & \omit & & \omit & & \omit & \cr & -0.15625 & & & & -0.120546 & \cr height2pt & \omit & & \omit & & \omit & \cr \noalign{\hrule} }} $$

At this point, the root c is caught between -0.125 (the last x which made f positive) and -0.15625 (the last x which made f negative). These two numbers are 0.03125 apart. Hence, the midpoint $x = -0.140625$ is within $0.03125/2 =
   0.015625$ of the actual root. The estimate $x = -0.140625$ is therefore good to within 1 or 2 one-hundredths.


Contact information

Bruce Ikenaga's Home Page

Copyright 2005 by Bruce Ikenaga