infinite series header

Continuity of a function

The functions we work with in calculus must be sufficiently "nice" or "well-behaved" so as to make them possible to differentiate. That means they must be continuous over the range in which we are interested.

At a discontinuity like a step discontinuity (figure on the right), there exist an infinite number of tangent lines (red). We don't like that kind of ambiguity in math, so we must both avoid it and be aware of when it might occur. Along a smooth curve, each point has one and only one tangent line.

Later, the idea of continuity will be important for developing the mean value theorem, one of the most important theorems of calculus.

Conditions for continuity

A continuous function conforms to three specific conditions outlined below.

1. f(a) is defined – e.g. can't have a zero denominator

2. – e.g. is finite and both one-sided limits are the same.

3. – i.e. the function can be evaluated at the limit.

What is a discontinuity?

Discontinuities appear in functions when they are either oddly defined, like so-called piecewise functions, or when they are undefined at certain points, such as holes or vertical asymptotes, which you have seen before (see the Rational Functions section).

A piecewise function is one that is defined in two or more parts, like this:

Here's what that function looks like:

It is continuous because it meets all of the criteria in the definition above. Compare that to the made-up graph below, which has several discontinuities.

Jump discontinuities

The discontinuity on the left is an infinite discontinuity. These always occur at vertical asymptotes. The function may tend toward +∞ or -∞ or either, on either side of the vertical asymptote, as shown. Remember that this happens because as a denominator gets very small, the function value gets very large, either in the positive or negative direction.

The two jump (or "step") discontinuities shown here can only be drawn by lifting the pencil, so they are also true discontinuities. Discontinuities like this usually only occur in piecewise-defined functions, but not exclusively. Here's an example of a function not defined where such a discontinuity appears:

The hole on the right is also called a replaceable discontinuity because we can consider the underlying function without the hole to find the limit (the y-value) at the hole.

For example, the function

can be reduced like this to a simpler function.

The only difference between this new function and the one we started with is that the hole at (x, y) = (2, 2) is gone. The graph of f(x) is the line y = x with a hole at (2, 2)

Continuity and differentiability

The ideas of continuity and our ability to take a derivative (differentiability) at a given point on a curve are linked. For example, look at the purple curve above - the one that shows all of the discontinuities. Imagine trying to take a derivative at one of the step discontinuities.

What is the slope of that curve at that point (see the figure at the top of this page) ?

It turns out that this is not a two-way door: If a function is continuous at a point, it's not necessarily differentiable. But, if it's differentiable, it's continuous.

Continuity and differentiability

If a function f(x) is differentiable at x, then it is continuous at x.

That a function f(x) is continuous at x is not enough to say it's differentiable there.

Proof: Differentiability → Continuity

To prove that differentiability of a function f(x) at a point x = a means that f(x) is continuous there, we begin with the definition of the derivative of f(x) at x = a:

Now our definition of continuity is that

Now we can rewrite that as

Now we'll divide by (x - a) and multiply by it, so that we've really made no change at all, except to make the left part look like the derivative:

Now recalling our properties of limits, we can separate this product into a product of limits. The second limit is clearly zero as x → a, which proves our assertion.

Proof: Continuity does not necessarily mean differentiability

Now let's prove that the converse of the above proof is not true. That is, continuity of a function at some point a does not necessarily mean that the function is differentiable there.

Let's begin by looking at a continuous function with a sharp point, f(x) = |x|:

We know a fair bit about this function, and remember that we only need one example of where continuity does not imply differentiability to prove our assertion. The left side of f(x) = |x| is the line y = -x, and the right side is y = x. Now to prove continuity, we only need to prove that the limit of f(x) exists at f(0). To do that we take limits of the function from left and right.

So the limit exists and the function is continuous at its vertex, (0, 0). Now the derivative of this function at x = 0 can be calculated by using the difference quotient with a one-sided limit. First the right-side limit:

We used the fact that when h > 0, |h|/h = 1. Now the left-sided limit, using |h|/h = -1 if h < 0:

The two derivatives are different, and we require a function to have one and only one slope at a point if the function is to be differentiable there. So we've shown that just because a function is continuous, doesn't mean it's differentiable.

Creative Commons License   optimized for firefox by Dr. Jeff Cruzan is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License. © 2012,2016, Jeff Cruzan. All text and images on this website not specifically attributed to another source were created by me and I reserve all rights as to their use. Any opinions expressed on this website are entirely mine, and do not necessarily reflect the views of any of my employers. Please feel free to send any questions or comments to