Piecewise Continuous Functions
Piecewise Continuous Functions
Left and Right Limits
In our last lecture, we discussed the trigonometric functions tangent, cotangent, secant, and cosecant. All of
these functions differed from sine and cosine in that they were not defined at all real numbers. At the points
at which these functions were not defined, we found vertical asymptotes. As you may recall, a function f (x)
has a positive left vertical asymptote, for instance, at a point a if, as x approaches a from the negative, or
left, side, the function either becomes more and more positive. Another way to say this is that for every
positive number b, there is some distance d such that if x is within a distance of d of a on its left side, we
can guarantee that f (x) will be bigger than b. For example, we know that the function f (x) = x−2 has a
positive left vertical asymptote at x = 0. If say, we wanted to guarantee that f (x) is greater than 100, we
could do this by choosing a value of x which is within 0.1 of 0, that is, −0.1 < x < 0. If we want to guarantee
that f (x) is greater than 10000, we would choose a value of x between −0.01 and 0. This idea of guaranteed
largeness is at the heart of vertical asymptotes.
Now we want to extend this idea a bit further, and introduce the idea of left and right limits. Let f (x)
be some real valued function. We say that f (x) has a left limit of S at x = a if as x approaches a from the
negative side, f (x) approaches S. We write this in limit notation in the following way:
lim f (x) = S.
x→a−
Likewise, we say that f (x) has a right limit of R at x = a if as x approaches a from the positive side, f (x)
approaches R. The limit notation for a right limit is
lim f (x) = R.
x→a+
For left and right vertical asymptotes, we have the notion of guaranteed largeness (or smallness, if we
have a negative vertical asymptote). For left and right limits, we have a notion of guaranteed closeness. If
f (x) has a right limit of R at x = a, what we are saying is that, if we want to guarantee that f (x) is going
to be within some distance b of R (in other words, R − b < f (x) < R + b), no matter how small b happens to
be, we can find some number d such that if x is within d of a on its positive side, then f (x) will be within b
of R. So, for instance, if is well-known among mathematicians that f (x) = x2 has a right limit of 0 at x = 0.
Suppose we want to guarantee that f (x) is going to be within 0.01 of 0, that is, −0.01 < f (x) < 0.01. To
make this guarantee, we choose x to be within 0.1 of 0 on its right side, that is, 0 < x < 0.1. If we want to
guarantee that f (x) is within 0.0001 of 0, then we choose x to be within 0.01 of 0. No matter how small a
bound we put on f (x), we can always guarantee that f (x) will be within that bound by placing a suitably
small bound on x. This is the essence of left and right limits.
Continuous and Piecewise Continuous Functions
In the example above, we noted that f (x) = x2 has a right limit of 0 at x = 0. It also has a left limit of 0
at x = 0. This should make intuitive sense to you if you draw out the graph of f (x) = x2 : as we approach
x = 0 from the negative side, f (x) gets closer and closer to 0. It is not surprising that f (x) = x2 has both
a left limit and a right limit of 0 at x = 0, since f (0) = 0, and the graph of this function has no breaks in
it, that is, if we draw the graph of x2 with a pen, as we pass through x = 0, we never have to lift the pen.
This is the intuitive concept of continuity. Mathematically, we define continuity using limits.
Let f (x) be a real valued function. Suppose that f (x) has both a left limit S and a right limit R at
x = a. Suppose further that f (x) is defined at x = a, and that R and S are both equal to f (a). We write
this in limit notation as
lim− f (x) = f (a) = lim+ f (x).
x→a
x→a
We then say that f (x) is continuous at x = a. In other words, if we approach x = a from either the left or
the right, f (x) approaches f (a). The function f (x) = x2 is continuous at x = 0 by this definition. It is also
continuous at every other point on the real line by this definition. If a function is continuous at every point
in its domain, we call it a continuous function. The following functions are all continuous:
1
• polynomial functions
• sine and cosine
• exponential and generalized exponential functions
• any stretches or shifts of the functions above
Technically, negative power functions and the other trigonometric functions are also continuous everywhere
on their domains, and yet these functions have breaks in them: you cannot draw the graphs of these functions
without lifting your pen at least once. This is because these functions are not defined everywhere, and the
breaks in the graphs only occur where the functions are undefined. In this sense, our mathematical definition
of continuity does not match our intuitive concept of continuity. This is a very subtle point, and you should
not expect to be tested on it, nor will you be marked off if you say that negative power functions or the
other four trigonometric functions are discontinuous.
So far in this class, we have not studied truly discontinuous functions, but that changes today. First,
consider the following function:
(
2x + 3
x 6= −1
f (x) =
4
x = −1.
If we draw the graph of this function, we see a line with a hole in it at x = −1, and, above the hole, a point
at (−1, 4). Consider the left and right limits of f (x) at x = −1. Clearly, as x approaches −1 from the left,
f (x) approaches 2 · (−1) + 3 = 1. In other words, as we travel along the graph of f (x) from the left to
x = −1, the graph gets closer and closer to the point (−1, 1), which is where the hole in the line is. The
same thing occurs if we move along the graph from the right to x = −1. Thus, in limit notation, we have
that
lim − f (x) = 1
and
lim + f (x) = 1.
x→−1
x→−1
So the left limit and the right limit of f (x) at x = −1 are equal, but not equal to f (−1), which is defined to
be 4. Therefore f (x) is discontinuous at x = −1. This example fits our intuitive understanding of continuity
as well: in order to draw the graph of f (x), we need to lift our pen at x = −1 so that we can draw the point
(−1, 4).
The function f (x) at x = −1 is an example of a function which has a both a left limit and a right limit
at a point, and while the left limit and the right limit do not equal the function at that point, they do equal
each other. In general, if f (x) has both a left limit and a right limit at x = a, and the left limit and the
right limit both equal L, then we simply say that f (x) has a limit L at x = a, and we write
lim f (x) = L.
x→a
So, in our example above, we would write
lim f (x) = 1.
x→−1
Of course, there exist functions for which the left limit and the right limit do exist, but they do not equal
each other. For example, take
(
−x + 1
x<0
g(x) =
x−1
x ≥ 0.
Consider the behavior of g(x) at x = 0. As x approaches 0 from the left, the function behaves like the linear
function −x + 1, so g(x) approaches 1. As x approaches 0 from the right, the function behaves like another
linear function, x − 1, and so g(x) approaches −1. Thus we have that
lim g(x) = 1 6= −1 = lim+ g(x).
x→0−
x→0
This function is clearly discontinuous at x = 0, since the left and right limits do not equal each other, let
alone both of them equalling the value of the function at 0. The right limit does equal the value of the
2
function at x = 0 , however, and so we say that g(x) is right continuous at x = 0. In general, if f (x) has a
right limit at x = a and that limit equals f (a), then we say that f (x) is right continuous at x = a, and if
f (x) has a left limit at x = a and that limit equals f (a), then we say that f (x) is left continuous at x = a.
Can you see why if f (x) is both left continuous and right continuous at x = a then f (x) is continuous at
x = a?
The functions that we have been using as examples above, which are continuous everywhere except at
a small number of points, are called piecewise continuous functions. We usually write piecewise continuous
functions by defining them case by case on different intervals. For example,
x2 + 4x + 3
x < −3
x
+
3
−3 ≤ x < 1
h(x) = −2
x=1
x
e
1
< x ≤ ln 2
e−x
x > ln 2
is a piecewise continuous function. As an exercise, sketch out this function and decide where it is continuous,
left continuous, and right continuous. Pay special attention to the behavior of h(x) at x = −3.
There is one final point: if f (x) is not continuous at x = a, then f (x) cannot have a derivative at x = a
either. Intuitively, this makes sense, because it makes no sense to define a tangent line to a function at a
point where it is discontinuous. We will learn a more mathematically-rigorous reason why a function has to
be continuous at a point in order to have a derivative at that point in a couple of lectures.
3