1 Continuity and Limits of Functions

Seunghee Ye
Ma 8: Week 4
Oct 20
Week 4 Summary
This week, we will move on from our discussion of sequences and series to functions. Even though
sequences and functions seem to be very different things, they very similar. In fact, we should think of
functions as a generalization of sequences.
In Section 1, we will define continuity and limit of functions. Then, we will look at a few examples to
become familiar with the new definitions. In Section 2, we will go over Theorems that will serve as useful
tools in studying continuity of functions. In Section 3, we will talk about big O and little o notation.
Then, we will define differentiation.
Topics
Page
1 Continuity and Limits of Functions
1.1 Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.2 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1
1
2
2 Continuity Theorems
2.1 Continuity: Useful Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.2 Extreme/Intermediate Value Theorems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5
5
6
3 Differentiation
3.1 Big O and Little o . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.2 Differentiation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7
7
8
1
Continuity and Limits of Functions
1.1
Definitions
First, let’s define what a function is:
Definition (Function)
A function, f , from the real numbers to real numbers is a map which assigns to a real number x ∈ R a
unique real number y ∈ R. If f is a function from the reals to reals, we will write f : R → R.
Some examples of functions are:
• Polynomials e.g. f (x) = x2 + x + 3
• Trig functions e.g. f (x) = sin x
• Exponential functions e.g. f (x) = ex
• Constant functions e.g. f (x) = 28
Recall that a sequence converging to a sequence meant that as n goes to infinity, the terms got closer
and closer to a number, L, which we called the limit. The analog for functions is continuity and limit of a
function as x approaches a particular real number a.
How did we learn continuity in school? Or what does “continuous” mean in English? One way to describe
a continuous function is being able to draw the graph without taking the pen off the paper. Clearly this
isn’t a mathematically acceptable definition. So let’s first give the precise definition of continuity and then
try to unpackage what it really says:
Page 1 of 10
Seunghee Ye
Ma 8: Week 4
Oct 20
Definition (Continuity and Limit)
Let f : R → R be a function. Let a ∈ R. Then, L ∈ R is called the limit of f as x approaches a, if
for any ε > 0, we can find δ > 0 such that if |x − a| < δ, we have |f (x) − L| < ε. If L is the limit of f as x
approaches a, we will write
lim f (x) = L
x→a
Moreover, if L = f (a), we say that the function, f , is continuous at a. If L does not exist or L 6= f (a), we
say that f is discontinuous at a.
Let’s take a closer look at the definition and try to understand what the definition is really trying to say.
Again, we have ε > 0, as we did before. But instead of looking for N ∈ N with some magical properties, we
are now required to find δ > 0 with some similar magical properties.
In words, this is what the definition is saying: Suppose we are given a very tiny interval around L
(namely the interval (L − ε, L + ε)). Then, we are trying to find an interval around our favorite point a
(namely the interval (a − δ, a + δ)) such that our function f maps this interval into the given interval i.e.
f (x) ∈ (L − ε, L + ε) for all x ∈ (a − δ, a + δ). If we can do this for any tiny interval around L that gets
thrown to us, we say f approaches L as x approaches a.
Pictures are worth thousand words (even though mathematicians would try to argue that it isn’t true).
Let’s take a look at Figure 1.1. In Figure 1.1, we have drawn the graph of a function, say f (x). If we wanted
to show that lim f (x) = L, we would need to show that for any blue interval around L, we can find a
x→a
small enough green interval around a such that the part of the graph of f (x) which lies over the green
interval sits completely within the blue band .
Figure 1: Idea behind limit and continuity
1.2
Examples
As we already saw with sequences, working directly with definitions involving ε can prove to be quite tricky.
Let’s look at a few examples to get some practice with this type of proofs.
We start with an appetizer.
Example 1.1. Let f : R → R be f (x) = x. Show that f is continuous for all a ∈ R.
Proof. If we gave a definition of continuity such that f (x) = x (called the identity function) is not continuous, we should probably change the definition of continuity! Fortunately, this won’t be a problem for our
definition.
Page 2 of 10
Seunghee Ye
Ma 8: Week 4
Oct 20
Let ε > 0. Then, we would like to find δ > 0 such that
|x − a| < δ
⇒
|f (x) − f (a)| < ε
But note that f (x) = x and f (a) = a. So we can simply take δ = ε. Then, we have:
|x − a| < δ
⇒
|f (x) − f (a)| = |x − a| < δ = ε
Hence, f satisfies the definition of continuity at each a ∈ R.
That was too easy. So let’s move to a slightly more difficult example.
Example 1.2. Show that the function f (x) =
1
x2
is continuous for all nonzero a ∈ R.
Proof. As was the case before, we start by examining the quantity in the absolute value. In our case that is
1
1
(1)
|f (x) − f (a)| = 2 − 2 x
a
2
a − x2 = 2 2 (2)
a x
(a − x)(a + x) (3)
= a2 x2
a + x
= |a − x| · 2 2 (4)
a x
a + x
(5)
= |x − a| · 2 2 a x
This is the quantity that we want to make small by picking x close to a. But note that when x is close to
a, we can bound the second term. More precisely, if x is within a2 of a, we get:
a + x
a2 x2 So far, we have shown that if x is within
a
2
a + 3a
2 ≤ 2 2 a x
5a 2
≤ a2 a 2 2 5a 10 = a24 = 3 a
4
(6)
(7)
(8)
of a, i.e. |x − a| < a2 , we have
a + x
10 |f (x) − f (a)| = |x − a| · 2 2 ≤ |x − a| · 3 a x
a
Eventually, we want to find δ such that |f (x) − f (a)| < ε. It suffices to get
3
10 a ε|a3 |
|x − a| · 3 < ε ⇒ |x − a| < ε · =
a
10
10
We are almost ready to start our proof. Note that so far we have imposed two conditions on x with regard
3
|
to how close it has to be to a. First, we wanted |x − a| < a2 . Then, at the end, we had |x − a| < ε|a
10 . Our
δ will be the minimum of these two values i.e. δ =
1
2
3
|
min( a2 , ε|a
10 ). Let’s start the proof:
Page 3 of 10
Seunghee Ye
Ma 8: Week 4
Oct 20
3
|
a
Let ε > 0. Let δ = min( a2 , ε|a
10 ). Now, suppose |x − a| < δ. Since δ ≤ 2 , we know that
10 |f (x) − f (a)| ≤ |x − a| · 3 a
But note that δ <
ε|a3 |
10 ,
we get
10 ε|a3 |
|x − a| · 3 <
a
10
10 · 3 = ε
a
Therefore, we conclude that whenever |x − a| < δ, we have |f (x) − f (a)| < ε. Thus, f is continuous at a.
Since a was chosen to be an arbitrary nonzero real number, we conclude that f is continuous at any nonzero
real number a.
Now that we’ve seen two examples of continuous functions, let’s take a look at a function that is discontinuous. But before we do that, we introduce a lemma that will help us prove that a function is discontinuous.
Lemma 1.1. Suppose f : R → R is a function. Then, lim f (x) = L. if and only if for any sequence of real
x→a
numbers {an } such that lim an = a, we have
n→∞
lim f (an ) = L
n→∞
Conversely, lim f (x) 6= L if and only if there exists a sequence {an } such that
x→a
• lim an = a; and
n→∞
• lim f (an ) 6= L
n→∞
Example 1.3. Consider the function, f : R → R defined as follows:
(
f (x) =
sin
1
x
L
x 6= 0
x=0
where L is a real number. Show that f (x) is discontinuous at 0 for any value of L.
Proof. To show that f (x) is discontinuous at 0 for any value of L, we must show that lim f (x) 6= f (a) = L
x→a
for any L ∈ R. In other words, we must show that f does not have a limit as x approaches 0.
We will try to use Lemma 1.1 to show this. Hence, we must find a sequence {an } converging to 0 such
that {f (an )} does not converge to L. Hence it suffices to find two sequences {an } and {a0n }, both converging
to 0, but such that {f (an )} and {f (a0n )} converge to distinct limits.
1
Let’s first consider an = 2nπ
. Then, we have
lim an = lim
n→∞
n→∞
1
=0
2nπ
Now, we look at the sequence {f (an )}:
lim f (an ) = lim f
n→∞
n→∞
For the second sequence, we consider a0n =
1
2nπ
2
(4n+1)π .
= lim sin(2nπ) = lim 0 = 0
n→∞
Again, we have
lim a0n = lim
n→∞
n→∞
n→∞
2
=0
(4n + 1)π
Page 4 of 10
Seunghee Ye
Ma 8: Week 4
Oct 20
However, this time the sequence {f (a0n )} does not converge to 0:
2
(4n + 1)π
0
lim f (an ) = lim f
= lim sin
= lim 1 = 1
n→∞
n→∞
n→∞
n→∞
(4n + 1)π
2
Hence, for any L, we can find a sequence {an } such that
• lim an = 0; and
n→∞
• lim f (an ) 6= L
n→∞
Therefore, we conclude that no value of L ∈ R can be the limit of f as x approaches 0. Hence, f is
discontinuous at 0 for any value of L.
2
Continuity Theorems
2.1
Continuity: Useful Tools
As we saw in the previous section, proving continuity using the definition can be quite tricky. Thankfully,
there are a number of useful tools and theorems that will allow us to prove that certain limits exist without
going through the ε − δ business.
Theorem 2.1 (Arithmetic of Limits). Let f, g : R → R be functions such that lim f (x) and lim g(x) both
x→a
x→a
exist. Then,
• lim (αf (x) + βg(x)) = α lim f (x) + β lim g(x) for all α, β ∈ R
x→a
x→a
• lim (f (x)g(x)) =
x→a
• lim
x→a
f (x)
g(x)
lim f (x)
x→a
x→a
lim g(x)
x→a
lim f (x)
=
x→a
lim g(x)
, if lim g(x) 6= 0.
x→a
x→a
Theorem 2.1 tells us that limits of functions behave as we would like them to. It also gives us the
following, very useful, corollary.
Corollary 2.1. Every polynomial is continuous at a ∈ R.
Proof. We know that the constant function f (x) = 1 is continuous everywhere. We also saw in the previous
section that the function f (x) = x is continuous everywhere. By multiplying these two functions together
and scaling by constant factors, we can make any polynomial (in fact, polynomials are precisely functions
that can be made in such way from f (x) = 1 and f (x) = x). Therefore, by Theorem 2.1, we conclude that
limits of polynomials are defined everywhere.
To show that polynomials are continuous everywhere, we only have left to show that the limits are equal
to the value of the polynomial. However, since the limit of f (x) = 1 is 1 everywhere; and the limit lim x = a
x→a
for all a ∈ R, we conclude that for any polynomial g(x), we have lim g(x) = g(a). Hence, every polynomial
x→a
is continuous everywhere.
Theorem 2.2 (Squeeze Theorem). Let f, g, h : R → R be functions. Suppose that
• g(x) ≤ f (x) ≤ h(x) for all x 6= a
• lim g(x) = lim h(x) = L
x→a
x→a
Then, lim f (x) = L.
x→a
Page 5 of 10
Seunghee Ye
Ma 8: Week 4
Oct 20
Example 2.1. Show
1
lim x sin
=0
x→0
x
2
Proof. We did a similar example where we used the Squeeze Theorem for sequences to show that the sequence
{an = sinn n } converged to 0. As before, note that for all x 6= 0 ∈ R we have
1
−1 ≤ sin
≤1
x
1
−x ≤ x sin
≤ x2
x
2
⇒
2
But we know by Corollary 2.1
lim −x2 = lim x2 = 0
x→0
x→0
Therefore, by Theorem 2.2, we conclude that
1
lim x sin
=0
x→0
x
2
2.2
Extreme/Intermediate Value Theorems
Theorem 2.3 (Extreme Value Theorem). Let f be a function and suppose f is continuous on the interval
[a, b]. Then, f (x) attains its maximum on this interval i.e. there exists c ∈ [a, b] such that for all x ∈ [a, b],
f (x) ≤ f (c).
You might ask: “Isn’t this always true?” Well, the answer is not always. For example, consider the
function f (x) = x on the interval (0, 1). Then, the function f (x) does not attain its maximum on the
interval. The least upper bound for {f (x)|x ∈ (0, 1)} is 1 which is f (1). However, 1 lies outside our interval
(0, 1).
“But that was cheating,” you might say. What if we have a closed and bounded interval, say [0, 1].
Shouldn’t Theorem 2.3 be true for any function? Let’s consider the following function:
(
f (x) =
1
x
x 6= 0
0
x=0
It’s easy to see that f (x) is not continuous at 0. But f is defined everywhere on [0, 1]. But note that f isn’t
even bounded from above since f “blows up” as x → 0.
Well, if you still think I’m cheating by giving examples of “unnatural” functions, then your intuition is
probably telling you “natural = continuous”. In that case, see Theorem 2.3.
Theorem 2.4 (Intermediate Value Theorem). Let f be a function and suppose f is continuous on the
interval [a, b]. Suppose f (a) < L < f (b). Then, there exists c ∈ (a, b) such that f (c) = L.
We can use the Intermediate Value Theorem to prove the following corollary.
Corollary 2.2. Let f be a continuous function on [a, b]. Suppose f (a) < a and f (b) > b. Then, we can find
c ∈ [a, b] such that f (c) = c.
Proof. Consider the function g(x) := f (x) − x on [a, b]. By Theorem 2.1, we know that g(x) = f (x) − x is
continuous on [a, b]. Now, g(a) = f (a) − a < 0 and g(b) = f (b) − b > 0 by hypothesis. By the Intermediate
Value Theorem, we can find c ∈ [a, b] such that g(c) = 0. However, that means that
g(c) = f (c) − c = 0
⇒
f (c) = c
Hence, we can find c ∈ [a, b] such that f (c) = c.
Page 6 of 10
Seunghee Ye
3
Ma 8: Week 4
Oct 20
Differentiation
3.1
Big O and Little o
Definition (Big O and little o)
Let f and g be functions. We say f (x) is big O of g(x) as x approaches a if we can find a constant
C and δ > 0 such that
|f (x)| ≤ C|g(x)|
for all x such that 0 < |x − a| < δ.
We say that f (x) is little o of g(x) as x approaches a if
lim
x→a
f (x)
=0
g(x)
This is a more general definition than the one given in Ma 1. The definition given in Ma 1 is in fact a special
case of above definition where g(x) = x and a = 0.
What’s the idea of big O and little o? First, little o is a bit easier to understand. We say that f (x)
is o(g(x)) if the limit of f (x)/g(x) as x approaches a is 0. Obviously, if f (a) = 0 and g(a) 6= 0, then the
statement is satisfied since the limit will simply be 0/g(a) = 0. But this is not very interesting. If f (x)
does not approach 0 but g(x) does, then the the limit will be ±∞. If f and g both approach nonzero real
numbers, the limit will also be nonzero.
The interesting case is when f and g both approach 0. In this case, we can’t simply say that the limit is
0/0 since that isn’t defined. To say that the limit of f (x)/g(x) is 0 means that as x approaches 0, f (x) is a
lot smaller than g(x) at all times near a. In other words “f approaches 0 faster than g”. Let’s look at an
example to see what this means:
Example 3.1. Show that f (x) = x2 is o(x) as x → 0.
Proof. Well, let’s go ahead and compute the limit:
x2
= lim x = 0
x→0
x→0 x
lim
Hence, x2 is o(x).
Ok, x2 is a lot smaller than x near 0 so maybe this makes sense. How about a slightly more general case?
Example 3.2. xn is o(xm ) if and only if n < m
Proof. Let’s take a look at that limit again:
xn
= lim xn−m
x→0 xm
x→0
lim
But this limit is 0 if n − m > 0; 1 if n = m; and ∞ if n < m. Hence, xn is o(xm ) if and only if n < m.
More generally, we can deduce the following.
Proposition 3.1. Let f and g be polynomials such that f (a) = g(a) = 0. Then, f (x) is o(g(x)) as x
approaches a if and only if deg f > deg g.
The proof is straightforward so I will leave it as an exercise. But this really is everything you need to
know about little o. It is telling us whether a function f approaches 0 faster than another function g. In
particular, if f doesn’t approach 0 at all, f won’t be little o of any function. If f does approach 0, then it
Page 7 of 10
Seunghee Ye
Ma 8: Week 4
Oct 20
will be little o of any function that does not approach 0. Finally, if f and g both approach 0, f is o(g) if f
approaches 0 faster than g does.
What about big O? The idea of big O is once again comparing how fast f and g approach 0. Simply put,
f is O(g) if f approaches 0 as fast as g. Let’s do a few examples to get comfortable with big O.
Example 3.3. Show that x is O(x).
Proof. Well... this is obvious. We can pick δ = 1 (anything, really) and C = 1. Then, for x ∈ (−1, 1) we get
|x| ≤ 1 · |x| = |x|
which is vacuously true.
Clearly x approaches 0 as fast as itself. Obviously for any function f , f will be big O of itself. Now, let’s
look at a very useful theorem.
Theorem 3.1. Let f (x) and g(x) be functions. Suppose that lim f (x) = lim g(x) = 0. Moreover suppose
x→0
lim
x→0
x→0
f (x)
= L 6= ±∞
g(x)
Then, f (x) is O(g(x)).
Proof. Since f (x)/g(x) approaches L as x → 0, for ε = 1, we can find δ > 0 such that
f (x)
|x − 0| < δ ⇒ − L < ε = 1
g(x)
Hence, we have
⇒
⇒
⇒
f (x)
g(x) − L < 1
f (x) g(x) − |L| < 1
f (x) g(x) < 1 + |L|
|f (x)| < (1 + |L|)|g(x)|
(9)
(10)
(11)
(12)
So let δ be the one we found above, and let C = 1 + |L|. Then, for all |x| < δ, we have |f (x)| < C|g(x)|.
Therefore, f (x) is O(g(x)).
Corollary 3.1. Suppose f (x) is o(g(x)). Then, f (x) is O(g(x)).
Great! This does agree with our description that f is O(g) if f approaches 0 as fast as g does; and f is
o(g) if f approaches 0 faster than g. Put like this, it’s obvious that little o is a stronger condition than big
O.
3.2
Differentiation
Definition (Differentiation)
Let f be a function. Then, we say that f is differentiable at a if the limit
lim
h→0
f (a + h) − f (a)
(a + h) − a
exists. If the limit exists, we denote it as f 0 (a) and call it the derivative of f at a.
Page 8 of 10
Seunghee Ye
Ma 8: Week 4
Oct 20
Let’s look at a few examples of derivatives for some “easy” functions.
Example 3.4. The derivative of f (x) =
1
x
at any point a 6= 0 is
−1
a2 .
Proof. Pick any point a 6= 0 in R. Then, we have
f (a + h) − f (a)
h→0
(a + h) − a
lim
=
1
a+h
lim
h→0
=
−
1
a
h
a−(a+h)
a(a+h)
lim
h
−h
lim
h→0 ha(a + h)
−1
lim
h→0 a(a + h)
1
− 2
a
h→0
=
=
=
(13)
(14)
(15)
(16)
(17)
Before we look at the next example, we define the function f (x) = ex . In particular, we will define it to
be the following formal power series:
∞
X
xn
ex =
n!
n=0
We will need a couple of properties of ex for the next example. First, we can show using this power series
representation and the binomial theorem that for any a, b ∈ R, ea+b = ea eb . Second, the series ex converges
for all x ∈ R and e0 = 1. This, again, is not very hard to prove but we will not present the proof here so we
can get to more “fun” stuff!
Example 3.5. Show that for any a ∈ R, the derivative of ex at a is ea .
Proof. Let’s start by examining the limit:
ea+h − ea
h→0
h
h
e
−1
= lim ea
(∗)
h→0
h
f (a + h) − f (a)
h→0
h
lim
=
lim
(18)
(19)
(20)
Now, we will use the fact that eh =
(∗)
∞
X
hn
h h2
=1+ +
+ ···.
n!
1
2
n=0
=
=
=
=
=
+
h
1
h2
2!
3
+ h3! + · · · ) − 1
lim e
h→0
h
h
h2
h3
+
+
+
···
2!
3!
lim ea 1
h→0
h
h
h2
a
lim e 1 + +
+ ···
h→0
2!
3!
!
∞
X
hn−1
lim ea
h→0
n!
n=1
!
∞
X
hn−1
a
e lim
h→0
n!
n=1
a (1
+
(21)
(22)
(23)
(24)
(25)
Page 9 of 10
Seunghee Ye
Ma 8: Week 4
Oct 20
Now, we only have left to show that
lim
h→0
Note that for any h, we have
∞
X
hn−1
n!
n=1
!
=1
∞
∞
X
X
hn−1
|h|n
≤
= e|h|
n!
n!
n=1
n=0
P∞
n−1
Hence, the series n=1 h n! converges absolutely for all h. For power series, f (x), which converges at a,
lim f (x) can be computed by directly plugging a in x. Hence,
x→a
lim
h→0
∞
X
hn−1
n!
n=1
!
=1
Therefore, we conclude that the derivative of ex at any a ∈ R is ea .
Page 10 of 10