<<

Seunghee Ye Ma 8: Week 4 Oct 20

Week 4 Summary

This week, we will move on from our discussion of and 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 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.1 Definitions ...... 1 1.2 Examples ...... 2

2 Continuity Theorems 5 2.1 Continuity: Useful Tools ...... 5 2.2 Extreme/Intermediate Value Theorems ...... 6

3 Differentiation 7 3.1 Big O and Little o ...... 7 3.2 Differentiation ...... 8

1 Continuity and Limits of Functions

1.1 Definitions First, let’s define what a is:

Definition (Function) A function, f, from the real numbers to real numbers is a map which assigns to a 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

functions e.g. f(x) = 28

Recall that a 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 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 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 , 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 contin- uous, 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.

1 Example 1.2. Show that the function f(x) = x2 is continuous for all nonzero a ∈ R. Proof. As was the case before, we start by examining the quantity in the . In our case that is

1 1 |f(x) − f(a)| = − (1) x2 a2 2 2 a − x = (2) a2x2

(a − x)(a + x) = (3) a2x2

a + x = |a − x| · (4) a2x2

a + x = |x − a| · (5) a2x2

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 a, we can bound the second term. More precisely, if x is within 2 of a, we get:

3a a + x a + 2 ≤ (6) a2x2 a2x2

5a ≤ 2 (7) 2 a 2 a 2

5a 10 2 = 4 = (8) a a3 4

a a So far, we have shown that if x is within 2 of a, i.e. |x − a| < 2 , we have

a + x 10 |f(x) − f(a)| = |x − a| · ≤ |x − a| · a2x2 a3

Eventually, we want to find δ such that |f(x) − f(a)| < ε. It suffices to get

3 3 10 a ε|a | |x − a| · < ε ⇒ |x − a| < ε · = a3 10 10

We are almost ready to start our proof. Note that so far we have imposed two conditions on x with regard a ε|a3| to how close it has to be to a. First, we wanted |x − a| < 2 . Then, at the end, we had |x − a| < 10 . Our 1 a ε|a3| δ will be the minimum of these two values i.e. δ = 2 min( 2 , 10 ). Let’s start the proof:

Page 3 of 10 Seunghee Ye Ma 8: Week 4 Oct 20

a ε|a3| a Let ε > 0. Let δ = min( 2 , 10 ). Now, suppose |x − a| < δ. Since δ ≤ 2 , we know that

10 |f(x) − f(a)| ≤ |x − a| · a3

ε|a3| But note that δ < 10 , we get 3 10 ε|a | 10 |x − a| · < · = ε a3 10 a3 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 discontin- uous. But before we do that, we introduce a lemma that will help us prove that a function is discontinuous.

Lemma 1.1. Suppose f : → is a function. Then, lim f(x) = L. if and only if for any sequence of real R R 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: ( sin 1  x 6= 0 f(x) = x L 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 0 that {f(an)} does not converge to L. Hence it suffices to find two sequences {an} and {an}, both converging 0 to 0, but such that {f(an)} and {f(an)} converge to distinct limits. 1 Let’s first consider an = 2nπ . Then, we have 1 lim an = lim = 0 n→∞ n→∞ 2nπ

Now, we look at the sequence {f(an)}:

 1  lim f(an) = lim f = lim sin(2nπ) = lim 0 = 0 n→∞ n→∞ 2nπ n→∞ n→∞

0 2 For the second sequence, we consider an = (4n+1)π . Again, we have

0 2 lim an = lim = 0 n→∞ n→∞ (4n + 1)π

Page 4 of 10 Seunghee Ye Ma 8: Week 4 Oct 20

0 However, this time the sequence {f(an)} does not converge to 0:   0 2 (4n + 1)π lim f(an) = lim f = lim sin = lim 1 = 1 n→∞ n→∞ (4n + 1)π n→∞ 2 n→∞

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 : → be functions such that lim f(x) and lim g(x) both R R x→a x→a exist. Then,

• lim (αf(x) + βg(x)) = α lim f(x) + β lim g(x) for all α, β ∈ x→a x→a x→a R     • lim (f(x)g(x)) = lim f(x) lim g(x) x→a x→a x→a

f(x) lim f(x) • lim = x→a , if lim g(x) 6= 0. x→a g(x) lim g(x) 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 ∈ , we conclude that for any polynomial g(x), we have lim g(x) = g(a). Hence, every polynomial R x→a is continuous everywhere.

Theorem 2.2 (). 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 x2 sin = 0 x→0 x Proof. We did a similar example where we used the Squeeze Theorem for sequences to show that the sequence sin n {an = n } converged to 0. As before, note that for all x 6= 0 ∈ R we have

 1   1  −1 ≤ sin ≤ 1 ⇒ −x2 ≤ x2 sin ≤ x2 x x

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 x2 sin = 0 x→0 x

2.2 Extreme/Intermediate Value Theorems Theorem 2.3 (). 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: ( 1 x 6= 0 f(x) = x 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 Ma 8: Week 4 Oct 20

3 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

f(x) lim = 0 x→a 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 = lim x = 0 x→0 x x→0

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 = lim xn−m x→0 xm x→0 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 x→0

f(x) lim = L 6= ±∞ x→0 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) − L < 1 (9) g(x)

f(x) ⇒ − |L| < 1 (10) g(x)

f(x) ⇒ < 1 + |L| (11) g(x) ⇒ |f(x)| < (1 + |L|)|g(x)| (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

f(a + h) − f(a) lim h→0 (a + h) − a

exists. If the limit exists, we denote it as f 0(a) and call it the of f at a.

Page 8 of 10 Seunghee Ye Ma 8: Week 4 Oct 20

Let’s look at a few examples of for some “easy” functions.

1 −1 Example 3.4. The derivative of f(x) = x at any point a 6= 0 is a2 . Proof. Pick any point a 6= 0 in R. Then, we have

f(a + h) − f(a) 1 − 1 lim = lim a+h a (13) h→0 (a + h) − a h→0 h a−(a+h) = lim a(a+h) (14) h→0 h −h = lim (15) h→0 ha(a + h) −1 = lim (16) h→0 a(a + h) 1 = − (17) a2

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 that for any a, b ∈ R, ea+b = eaeb. 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:

f(a + h) − f(a) ea+h − ea lim = lim (18) h→0 h h→0 h eh − 1 = lim ea (∗) (19) h→0 h (20)

∞ X hn h h2 Now, we will use the fact that eh = = 1 + + + ··· . n! 1 2 n=0

2 3 (1 + h + h + h + ··· ) − 1 (∗) = lim ea 1 2! 3! (21) h→0 h 2 3 h + h + h + ··· = lim ea 1 2! 3! (22) h→0 h  h h2  = lim ea 1 + + + ··· (23) h→0 2! 3! ∞ ! X hn−1 = lim ea (24) h→0 n! n=1 ∞ ! X hn−1 = ea lim (25) h→0 n! n=1

Page 9 of 10 Seunghee Ye Ma 8: Week 4 Oct 20

Now, we only have left to show that ∞ ! X hn−1 lim = 1 h→0 n! n=1 Note that for any h, we have ∞ ∞ X hn−1 X |h|n ≤ = e|h| n! n! n=1 n=0 P∞ hn−1 Hence, the series n=1 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

∞ ! X hn−1 lim = 1 h→0 n! n=1

Therefore, we conclude that the derivative of ex at any a ∈ R is ea.

Page 10 of 10