- [Instructor] Well, you know, we always like to start with a problem, a nice warmup problem. And so here we go, a nice warmup problem. Is the following statement true or false? If the limit as x gets close to a if f of x is b, and the limit as y gets close to b if g of y is L, is it the case, must it be the case that as x gets close to a, g of f of x gets close to L? So I polled a lot of people before class and I would say that there's a heavy preference to one side as to whether it's true or false. Let's think about what the intuition says. So what's happening here? Well, if we think about this, this is sort of like what I like to call an onion problem in that there are layers, and that probably there'll be a couple of tears. But here we go. So let's think about from the inside. X is getting close to a. So the inside I have f of x. So that says that the inside, our intuition says the inside is getting close to b. Okay, so when I say the inside, this whole expression. So what I'm plugging into the function g is getting close to the value of b. And here I say if what I'm plugging into b, sorry, if what I'm plugging into the function g gets close to b, then it should be near L or it goes to L. So what I'm plugging into g is getting close to b. And so it seems reasonable that the answer should be that the limit is L. Alright, so the intuition tells us the limit should be L. So the answer is of course false. Now, if you take this question and you ask a grad student, they will tell you the answer is true. If you ask a faculty member, they will tell you the answer is true. Why is the answer false? So first off, what does it mean by false? When we say false in mathematics, we say there is some weird situation where the statement doesn't hold. So mathematicians have a really high standard for being true. It's a great way to get off of jury duty. You know, you know, you know, if the judge asks "Well, what do you consider true?? "Well, I'm a mathematician." "Okay, that's it, thank you. You don't need to be here anymore." So what's wrong with our intuition? Well, let me try to convince you that first off, there is some case where the answer turns out that the limit is not what it should be. So I'm gonna do a really simple example. I'm gonna let our function f and g be the same function, and I'm gonna graph it. And it's the following function. So here's my axes and it's gonna be 0 except at the value 0, in which case it's gonna be 1. So there's a function, so in particular f of x equals g of x equals 0 if x is not 0, and 1 if x does equal 0. And now I'm gonna let a equal b equal 0. So I have to check does this statement hold, does that statement hold? So does the limit as x approaches 0 of f of x equal 0? Well, we follow the picture in. And the answer is yes because as I come in from both sides, I'm still 0. So that's a true statement. So now we go to our next statement. Does the limit as y approaches 0 of g of y equal 0? So I guess I should have said what L is. So I'm gonna let a equals b equals L. And the answer is still yes because it's the exact same function. I'm approaching the same point. All I've done is switch the variable names. Okay? So so far both of these assumptions are true. Now let's figure out the following. What does the function g of f of x look like? Well, there's two possibilities. Suppose for a second that x is not 0. So if x is not 0, what is the f of 0 going to be? It's gonna be 0. And then with g of 0 will be 1. So it's 1 if x is not 0. If x equals 0, f of 0 is 1, then g of 1 is 0. So it's 0 if x is 0. So if you sketch that function, it has a very different shape. It looks 0 here and there's a flat line up here. So the question is what's the limit as x approaches a of g of f of x? Well, what value am I approaching? One, notice that is not L. Okay, now at this time you're probably thinking, this is the kind of reason why mathematicians don't get invited to parties. (class members chuckling) You're right because we like to think about things and we have to be very cautious. Now where did our sort of our intuition fail us? And the problem is that we were dealing with a particular phenomenon which we're gonna talk about today, but here's where our intuition fails. You see what we're talking about is when we talk about limits, we always say, well, what's happening nearby? And we ignore what happens at the point itself. And so here what I'm saying that as y gets close to b, well, y can't be the value of b. It has to be near b. But what was happening when we looked at this output, the output was exactly equal to what b was so that we were putting into something, our f of x was plugging in something which was not allowed. So that was the issue. Now, the good news is this is a very subtle thing. We're not gonna make anything this subtle going forward and we're going to fix it. So what's the problem? Well, the problem is you had this issue where you have something weird happen. And in particular, when we say something weird happen is that sort of what you want to be true didn't match with what happened. So in other words, your expectation did not meet reality. I'm sure there's some correlation to dating apps these days where expectation is not the same as reality. So we wanna say, look, let's try to avoid that. And here's the beautiful thing. If you can get to the types of functions where expectation and reality line up, then this statement is completely true. And that's why most of your instructors, your graduate students you talk to, that's why they think the statement is true. Because they always sort of will implicitly say, oh it's a nice function. So that's our topic for today. What do we mean when we're talking about this word nice function? So let's start with the nicest functions that we know, and that is polynomials. So polynomials have this lovely property in that we showed that if I have any polynomial and that remember, that means powers of x combined together in a nice way, that if I wanna understand the limit of that polynomial, all I have to do is to plug it in. So here in polynomials we have the case of what should happen is exactly what does happen. So when we have that, that's a really nice function and we give a name for this type of function. And these are called continuous functions. And these are the types of functions that we're going to encounter when we're doing our mathematics. And it's good because most of the functions you encounter out in the wild will be continuous functions. So what needs to be true? Well, if I have a continuous function, there has to be three things that hold. Because what needs to be the case? Well first off, I have to talk about the limit. If the limit doesn't exist, I can't talk about in continuity. So the limit has to exist. The second thing is that the function has to be defined because I need to be able to plug into the function. And the last thing is that those two values, the limit and the actual value of the function have to agree. So again, the limit has to exist, function has to be defined, and those answers have to match. So that's what it means for a function to be continuous. And if a function is not continuous at any particular value, we say it's discontinuous at that location. Alright, well, what kind of continuities problems can we have? It turns out there's several different things that can happen. So we're gonna talk about a few of them and we're gonna give them names. So the fact that we have different names means there's different types of phenomena. There's two in particular that we need to sort of deal with. So the first type of discontinuity is what's called the removable discontinuity. Now what is that? Well, the function is not continuous at x equals a, but the limit exists. So see if the limit exists, if you think about these three criteria here, the limit existing is sort of the hardest one to do 'cause limits are pretty tough. But if the limit exists, we can say look, we can patch it up and make it work. And we do it by saying, okay, what do we need to define the function to be in order to make it continuous? So here's an example. I have this function f of x, which is x plus 3 if x does not equal 1, and it's equal to 2 if x does equal 1. This is a pretty simple function 'cause x plus 3, that's a line and it's a line we can mark it. The intercept is at 3, the y intercept, slope of 1. And the only catch is that's if I am not 1. So at 1 there's something different. So I'm gonna put a little circle here indicating that that's not what happens at 1. At 1 what happens is we get a value called 2, which is down here. So this is a discontinuous function. Now I claim it's discontinuous. We should check. What is the limit as x approaches 1 of f of x? It's 4 because if x approaches 1, what we can do is we can say that I can replace f of x now by this expression x plus 3. Because as I approach 1, I'm not 1, so I can use that rule. And then that's a polynomial that we can take that limit. But of course this 4 it turns out does not equal 2. It's one of those cool facts you learned back a few years ago. And that's f of 1. So this is not continuous, but the limit does exist. So how do we fix our function? Well, the easy thing is to say that is in the wrong place. So we just wanna move it and fill in the hole. So we say, all right, well what should we make it? And the answer is, whatever the limit turned out to be, that's what goes here. So we replace the 2 by 4 and now our function is continuous. Of course you might say, well there's a much easier thing. Just call it x plus 3 everywhere. And that's true because this is a simple example. But we might have something more interesting. So let's do a different example that's more fun. All right, so here we go. How should the value a be chosen so that the following function is continuous at t equals 0? So we have this function g of t. It's again a piecewise function. Now we don't know what it is at 0 yet. So it's some number a. We gotta figure out what a is. And then there's this sort of weird looking other expression, 1 minus 3 times 9 plus 2t to the negative 1/2 over sine of 4t, huh, hmm. Well, that does not look fun but we're gonna do it anyways. All right, 'cause we gotta know, inquiring minds. Now one thing that's tempting to do is just plug in 0, and if you plug in 0, well, you'll get sine of 0 downstairs and that's always a dangerous thing. Upstairs you're gonna get 1 minus 3. Then you're gonna get 9 to the negative 1/2. Now the negative really means like 1 over, so it's like 1 over square root of 9, which means this part there is 1/3. 3 times 1/3 is 1. And so we're getting 0 over 0. And if you see 0 over 0, what do you know to do? - [Student] More work. - [Instructor] More work, more work. Alright, so here we go. To figure it out, what should a be? Well, the answer is a should be whatever the limit is as t goes to 0 of our expression g of t. Well, of course what does that mean? So we say this is the limit as t goes to 0. I can plug in this expression here. And we're gonna clean it up. Instead of writing it as 9 plus 2t to the -1/2, we'll write as a square root of 9 plus 2t downstairs. So 1 minus 3 over square root of 9 plus 2t. All right. And then we have sine of 4T. And I don't like sort of a fraction within a fraction. So I'm gonna replace this one, this one in front. We can write that as square root of 9 plus 2t over square root of 9 plus 2t. So we're getting a common denominator. So if we do that and we move that square root of 9 plus 2t downstairs, then we have that this expression is the square root of 9 plus 2t minus 3 over, well, a sine of 4t and the square root of 9 plus 2t. All right, so that's just a little bit of gentle massage. Now we still have the same issue. We still have 0 over 0. We haven't really canceled anything or found a way to say aha, this 0 over 0 we can handle in a nice way. The fact that we see a sine function makes us say it'd be really cool if I get like a t or a 4t somewhere in there 'cause I know that sine of blah over blah is 1. Well, hmm, don't have that yet but well, we're still early in the problem. So the next thing is to say we have a square root. So what do you do if you see a square root? Conjugate, yeah, conjugates are really useful for getting rid of square roots. So we have our expression. And when we say conjugate, we're gonna multiply both the top and the bottom. So if we think of this as a minus b, we're gonna have a plus b, a plus b, alright? And now upstairs, well, when we multiply that we're gonna get a squared minus b squared. So that becomes the limit as t goes to 0. We're gonna get 9 plus 2t. It's a t minus 9, and downstairs, don't multiply it out. On the part that the conjugate's being useful for, yes, multiply it out. On the part that it's not useful for, don't. Don't multiply it out. Leave it as it is. Okay, sine of 4t, the square root of 9 plus two 2t, and that square root of 9 plus 2t plus 3. Great, now from here we're like hey, good news. The nines cancel out. So we're making some progress. And we also have some other progress. So we have a nice fact here. Let's recall the limit as blah goes to, this is a technical math term, blah, but sine of blah over blah. Do you remember what that is? - [Students] One. - [Instructor] Yeah. Okay, you've mastered it. What if we did the following? It's still blah, but we did blah over sine of blah. - [Student] One. - [Instructor] it's still one. Yeah, 'cause you just flip the limit as well. So I say hey, you know, I've got like sine of 4t. What would be great to be upstairs? 4t 'cause that would be get us right into that nice, nice sweet spot. We're close, we've got 2t 'cause the nines are gone. How can I make it 4t? - [Student] Multiply it by 2t. - [Instructor] Well the 2t we already have. So we just need the 2. So we're gonna multiply by 2 over 2. So this is the limit as t goes to 0, of 4t over sine of 4t, and then everything else, square root of 9 plus 2t, square root of 9 plus 2t plus 3. And there's a single 2 coming from right there. So at this point what we like to do is we like to sort of group, and we say that 4t over sine of 4t, it's a a blah something sine of blah. The inside of the sine matches the other part. What does this single part go to? Goes to 1, and sort of the philosophy here is to say if you can break it up into parts and you know the limit of each part, then you're fine. So what we did was we manipulated to the point where we said, hey, that 0 over 0 I can put in as being something over the sine of something. And that part I can manage and therefore I have everything else. Now the hope is this goes to something. Well, the top is 1. Then you go work through the terms, square root of 9, 3, square root of 9 plus 3, 6, and 2, 2, giving 1 over 36. So the answer is that a should be 1 over 36. And if that's what you pick, then your function will be continuous. Okay. So that's an example. That's if we have our limit existing. Now there's another type of discontinuity which is the following. It's called the jump discontinuity. And it says suppose, oh there's a typo here, I should have fixed that. Ignore that a. So if the left and right limits at x equals a exist but aren't the same, then it's called the jump discontinuity. And where does the name come from? Well, if you sketch it really quick, so let's do an example. I claim this is a jump discontinuity. So I have x plus 3 if x is less than 1, so that looks something like that. I'm at 2 if x equals 1, which I'll say roughly there and I'm 2x minus 2 if x is greater than 1. And that looks something like that. So this is what g of x looks like if you were to sketch it. Now what's happening here? Well, when we come in from the right, on a side note, this is 4, when we come in from above, from the right side, we're approaching 0. When we come in from below from the left side, we're approaching 4, and 0 and 4 don't match. We can see the picture. So the jump is, suppose you were trying to draw this with a pen or a pencil. As you're drawing, and then you get to this point 1, you have to jump up, lift the pen or pencil and then start drawing again. Now here's the issue. Removable discontinuities, you can patch 'cause it's just like you gotta fill in the hole. Jump discontinuity, you cannot patch them up. There's no way. There's not a huge patch. You can't say aha, I know. Here's an idea that Steve hasn't thought of. I'll just make like a really large patch. No, no, no, you can't do that. So jump discontinuity is something which you can make continuous by redefining. So that's what a jump discontinuity is. There are other discontinuities, and essentially the other discontinuities fall into the category of the limit has a problem. And there's lots of ways for limits to have problems. One thing is that it might blow up. Another thing is it might have some infinitely many oscillations and so forth and so on. So an example of this, if you were to look at this function here is this h of x. When x is less than 0, it looks like negative 1 over x, which means that as you get close to 0, it's blowing up. So it's going towards infinity. From the right, it looks like sine of 1 over x, which is a very fun example just because it has that ability to oscillate and we can actually understand it. And then of course at 0, well, for some reason it's been defined to be 2. But you can see that this has, it's a limit with some very serious problems. The limit doesn't exist. Now you might say, well couldn't we say that the limit from the left is infinity? And that's a great discussion, which we're gonna have very soon, but not today. So there's our two big types of discontinuities to be aware of. You've got your removable, you've got your jump. Then everything else is sort of like, well, there's problems with the limits. So we say that a function is continuous if the function is continuous at every point. So one of the things we might want to do is say, well, let's make it a continuous function. So here's a nice example. Find the values a and b so that the function f of x is a continuous function. So we want this to be continuous. So our function has three parts. If I'm below negative 1, I look like 3x squared. If I'm between negative 1 and 1, I look like ax plus b where a and b are to be determined. And if I'm above 1, I look like 4x squared plus 1. Now we can sketch parts of this pretty easily. We can certainly sketch the below negative 1 and the above 1 because they have nothing to do with a and b. So if we were to sketch them, we say, all right, well, what do they look like? Well, 3x squared, that's a parabola that opens up, stretched up a little bit. I don't need the whole parabola though. I just need the part that starts below negative 1. So if here's negative 1 and let's see, negative 1, I would've been 3. So I come up here to 3 and I put a circle because I'm not including negative 1, but then I'm coming up off there. So that's the part of the parabola 3x squared, but only the part below negative 1. For the other side, 4x squared plus 1, what happens? Well, at 1 I'm gonna go up, plug in 1. I would get 4 plus 1, which is 5. And so do do do do do, and that's also going up. Oh, I did not plan well. Okay, but again, the 4x squared plus 1 is a parabola but I only include the part above 1. Now I should say you don't actually need to draw the picture to do this problem. I just like to sort of get an intuition of what's going on. Let's think about the middle. I should pause and say, is 3x squared a nice function? Is 3x squared continuous? - [Student] Yes. - [Instructor] It is continuous. What's special about 3x squared to make it continuous? - [Student] (indistinct) polynomial. - [Instructor] Polynomial, same reasoning says 4x squared plus 1 is continuous. So the left part is continuous, the right part is continuous. ax plus b, what does that look like? (student speaking indistinctly) It's linear or a line. Now are lines continuous? - [Students] Yes. - [Instructor] Yeah, so the good news is that each little piece is continuous. So what do I need to worry about? Well, each piece is continuous. The only thing I have to worry about is where I glue them together. So in other words, I may have to make sure things line up at the negative 1 and at positive 1 because I'm having two different behaviors from the two different sides. So as long as those behaviors line up, life is good. So how do we figure out what to draw? Well, one thing we can do is we can actually think about in terms of a picture, and say I know I need to put in a line and I need to put in a line that's going to match at these points. So the line has to look like that. It has to be the straight line that connects the point from negative 1,3 to positive 1,5. That line segment is the exact line segment that we need. So that's our picture way to see what we need to do. Now once we have that, it's pretty straightforward to figure out what that line is. For instance, what do we see? Well, we've gone over to in the x direction from negative 1 to positive 1. How far have we gone in the y direction? - [Student] Two. We've also gone 2. So what's our slope? Our slope is 1 'cause we went over 2, we went up 2. So it's the same change in x, same change in y. Where's the intercept gonna be? It will turn out it's halfway in between 'cause it's nice and because of our symmetry. So sorry, the intercept is at 4. And so our line that we need is the line x plus 4. So we need to have a equals 1 and b equals 4. Now you might say, could we have done this without a picture? And the answer is yes, absolutely. How do you do it without a picture? Well, probably you give yourself a lot more space, but here you go. We say the only things we need to worry about are negative 1 and 1. So we look at the limits. So limit as x approaches negative 1 from below of f of x has to be the same as the limit as x approaches negative 1 from above of f of x so that the two sides agree at where they glue together. If I'm coming to negative 1 from below, well, I can replace what my function here is because if I'm below negative 1 my function is 3x squared. So the limit as x approaches negative 1 from below of 3x squared has to equal the limit as x approaches negative 1 from above of, and now I go to the part that's just above negative 1. I don't want the part that's way above negative 1, just above negative 1. So that's the ax plus b. And now if we take these limits, 'cause these limits are polynomials, we come to the conclusion that 3, which is what happens when I plug in x equals negative 1, has to equal, in here it would be negative a plus b. And that's what you would get if you took the limits as x approaches negative 1 from both sides. That's half of your setup. The other half is you repeat this same thing. But now instead of going the limit as x goes to negative 1, where do we go? - [Student] Positive 1. - [Instructor] Positive 1. So if you repeat that, I'm gonna skip the steps, but as limit as x goes to positive 1, you're gonna end up with 5 equals a plus b. And now what you have is you get two equations and two unknowns, and off you go. So you don't have to have a picture. The key thing is just to say I have to make sure these line up. So I check to make sure that the two one-sided limits agree. And for every single potential problem point, in other words, every place where you're gluing parts together, you're gonna get an expression. So there you go. Alright, now what are examples of continuous functions? Well, polynomials are as well as rational functions. And so a rational function just means a polynomial over a polynomial. You also have other functions. Your e to the x, your sine x, your cosine x, the best function of all, the arc tangent of x. It's a really cool function. You also have other things like square root of x, as long as you're talking about x greater than 0. There's a small catch at x equals 0 and it's undefined below 0. Things like log x and tangent of x, and sec of x, these are also continuous as long as you stay away from your asymptotes. So a lot of the functions that we're familiar with are continuous functions. And essentially that's good because continuous functions are nice. We saw at the very beginning that if we have like a small problem with our continuity, it can cause weird things to happen. But the other thing, our continuous functions make sense to describe phenomenon that we see around us. 'Cause the moral of a continuous function says if you change a little bit of your input, you can't change your output by a lot. You can't all of a sudden jump a huge amount. And so continuous functions are the right types of functions to model what we see around us. Now the nice thing is we can combine continuous functions. And so if we have a few building blocks, the next thing is how can we put them together? And these look like the same kind of things we talked about with limits because that shouldn't be surprising. Continuous functions are really defined in terms of limits. So if you have things which are continuous and you add them, still continuous. You can scale continuous functions. That's what's happening here. That's a constant. You can multiply continuous functions, they're still continuous. If you divide a continuous function by a continuous function, as long as your denominator's not 0, you're continuous. The most important one probably is composition, function inside of a function. If you have a continuous function inside of a continuous function, you're still a continuous function. Alright, well let's try this. All right. So here we go. Is the following function continuous? So sine of e to the x squared plus 23 plus x to the 5th times arc tangent of x minus 17 times cosine of sine of x, and that's the numerator. That's divided by x to the 4th plus 5 plus sine squared of the quantity e to the x plus e to the negative x plus the natural log of x squared plus 1. Alright, good. Now you might think that wasn't on the list. Well, it wasn't quite on the list, but the question is, can we build up to it? So we think about our various pieces. So let's go through the top. And let's just start with the term on the left. Well, is x squared continuous? Yeah, it's a polynomial. Is e to the x squared continuous? - [Student] Yeah. - [Instructor] Yeah because it's a composition. E to the x squared plus 23. - [Student] Yeah. Yeah, because adding continuous functions, that's continuous. sine of e to the x squared plus 23. - [Student] Yes. - [Instructor] That's composition, okay. So the first part's continuous. Is x to the 5th continuous? - Yes. - Yeah. - [Instructor] Yeah, polynomial, arc tangent of x? - Yes. - Yeah. - [Instructor] Yes because it's the greatest function of all time. Multiply x to 5th times arc tangent of x, is that continuous? - [Student] Yeah. - [Instructor] Yeah. Because products of two continuous functions are continuous. So now I have a continuous function plus a continuous function, so still continuous. Alright, sine, is that continuous? Yes. Is cosine of sine continuous? - [Student] Yes. - [Instructor] Yeah, because of composition. If I multiply by 17, will it still be continuous? - [Student] Yes. - [Instructor] Yes, 'cause I can scale by a constant, and then if I combine it with something else by subtraction, is that still continuous? Yeah. So see we're building up. And we don't write all these things down 'cause it would take a long time. But we've seen like yeah, we got our building blocks. Downstairs, okay, x to the 4th polynomial, 5. polynomial e to the x plus negative x, is that continuous? - [Student] Yes. - [Instructor] Yeah, we have a composition and we have adding two continuous functions. Then it's plugged into sine squared. Is that continuous? - [Student] It is. - [Instructor] Yeah, because we first plugged it into sin, which is continuous, then we square it, which is continuous, x squared plus 1, polynomial, continuous, log of x square plus 1, composition. We add them all together. Is the downstairs continuous? - [Student] Yeah. - [Instructor] Yeah, now as long as, yeah, someone said as long as it's not 0. Alright, can the downstairs ever be 0? Well, now we're kind of paranoid. We've been hurt before. All right. Well certainly, notice the x to the 4th. That can't be negative. Sine squared can't be negative. What about log? Log could be negative but look at the inside of the log. How small can x squared plus 1 be? 1 That's the smallest they can get. What's the well, okay, so log of 1 is 0, and if you plug anything bigger than 1 into log, it's positive. So all the three terms there are all at least 0 and then you have a plus 5. So that definitely bumps you away from 0. So this function is continuous for all values of x, no problems. Cool. So the answer is yes. Alright, well in case you're wondering, is there ever gonna be an exam problem where you just have to write down the word yes? No, no. Well, sometimes there's multiple choice but you never want the multiple choice. Oh, oh, oh I should hide that. I should hide that. Pretend like you didn't see that. Alright, so suppose I have f of x as above. So there's my function f of x, and I wanna find the limit as x approaches 2 of f of x. Ah, you're probably thinking that sounds like a much harder limit than all the ones that we've done so far. Or is it? Is there an easy way for us to do this limit? (student speaking indistinctly) Plug it in. Why can we just plug it in? - Because it's continuous. - [Instructor] Because it's continuous. See, continuous things have this beautiful property. A function that's continuous, if I wanna know what the limit is, I just plug in the value. And therefore the answer is the limit as x approaches 2 of f of x. This is not a hard thing. It just takes us a long time to write down. It would be sine of, I guess e to the 4th plus 23, 2 to the 5th, which of course we all know that's equal to 32, arc tangent of 2 minus 17, cosine of sine of 2 divided by 2 to the 4th, which is 16, but we can write it as 2 to the 4th, plus 5 plus sine squared, e squared, plus e to the negative 2 plus log of 2 squared plus 1. And that's it. We're done. So you always like continuous functions. Continuous functions are your friends. If you have a continuous function, you always sort of say, hey, if I'm taking the limit of something that's continuous, the first thing we should always do is just plug it in because maybe whoever wrote the problem wasn't paying attention, or maybe they're trying to make sure you're paying attention and not trying to do something that's too hard. Alright, so we need another, one more important idea today and some examples. There's something called the intermediate value theorem and it deals with continuous functions. It says suppose I have a function which is continuous. So I have a continuous function and it's continuous, say starting at a and going to b. What happens above b and what happens below a, we don't care, but between a and b, it's continuous. Then what has to be the case is that where I start, so I start at this value here, f of a, and where I stop is this value f of b. So there might be some space here between f of a and f of b. And if I pick anything that goes between f of a and f of b, so suppose I pick, this is my value here, t, and I were to draw this line straight across, what has to be the case is I have to cross it at some point, so at least once. It's possible I crossed it multiple times. So it's not saying I only cross once, but it's saying that for any value between f of a and f of b, I have to cross through. Alright, well, it seems pretty intuitive. It sort of comes back to that philosophy which you may have heard about continuous functions is you can't lift your pencil up. In other words, if I'm starting at a f of a and I keep drawing, I have to cross over everything eventually. Now you might say, you know, I bet you I could get across. Let's see, how could we do that? Well, hmm, maybe, I'm not a great artist, but let's say here is f of a and here is f of b. And we don't make any assumptions, by the way. It could be that f of a is smaller than f of b. It could be the way that it's drawn here. And you might say, well, how do I get from this point to that point without lifting my pencil? Well, hmm, the answer, well, is channel your inner Mario Brothers. Look for the pipe, right? And so that way it's really easy. You just say mm hm, do do do, whoop. But okay, no, no, there is no pipe. Pipes don't exist in our world. So you cannot avoid it. You have to cross through the points. So just in case I haven't said it, let me point out this warning because there tends to be, when you hear the statement of the intermediate value theorem, the intermediate value theorem says I have to hit all the values in between. Sometimes people hear that and say, oh, that means that you're going to stay in between. And that's not what the intermediate value theorem says. So it's possible that you can sort of sneak your way below at some points. You'll notice for instance, there's a few times when the curve dips outside of that interval between f of a and f of b. And that's okay. The only thing we can say for sure is that everything in between, it got some point where I got the evaluation. All right, well, let's test our intuition. Here we go. Here's a polynomial, 18x cubed minus 63x squared plus 67x minus 20. And there's two questions here. So part a, does f of x have a root in the interval between 0 and 1? And there's another typo, this should be P. All right, sorry about that, I'll fix that later. So does this polynomial have a root in the interval 0 to 1? So what do we mean by root? So a root means there's some number which I can plug in and I get 0 out. That's what a root means. Channeling what we just learned, let's look at the values P of 0 and P of 1. What do I get when I plug 0 in? Negative 20. How about when we plug 1? Now that one's probably not quite so fast. What do you see? Well you see an 18 and a 67. Those will combine together to give you 85. Then you see a negative 63 and a negative 20. They also combine together to give you negative 83. So you end up with 2. Now what does this say? This says at 0 you're negative, at 1, you're positive. So what has to happen somewhere in between 0 and 1? (students speaking indistinctly) Yeah, you have to pass through that 0. It has to be a root. So intermediate value theorem says there's a root. Now we should be careful. We know that there's at least one. It could be more than one, but there's at least one. So if you ever switch from positive to negative, then you have to have a root. Well, actually we forgot to say something. What else do we have to check before we apply the immediate value theorem? - [Student] Is it continuous? - [Instructor] Is it continuous? Yeah, we didn't check that. Is this function continuous? - Yeah, it's polynomial. - Yeah, it's polynomial. Good. Okay, but we wanna make sure. We want to dot all our I's, cross all our T's. Alright, so that's part a. Part b, how about between 1 and 2? All right, 1, well, we know what happens when we evaluate 1. We got 2 'cause I'm just gonna copy my work. 2, well, hmm, huh, what is that? Well it's 18 times 2 cubed, which is 8 minus 63 times 2 squared which is 4 plus 67 times 2 minus 20. 18 times 8 is of course - [Student] 144. - [Instructor] That's right. Yeah. Cool. You knew it. I was wondering if anyone was gonna say gross, and I was like, yeah, that's also right. (students laughing) Alright, but anyways, 63 times 4 is 252. 67 times 2 is 134, and 20 is 20. So 144 plus 134, that's 278. Then we're gonna subtract off 252 and 20. That's subtracting off 272, giving us a grand total of 6, which means we are over there. So at 1 we're at 2 and at 2 we're at 6. So is there a root between 1 and 2? Our answer is. - [Student] We don't know yet. - [Instructor] We have no idea. Now you're probably thinking, wait a second, we start positive, we end positive, there's no root. But remember what we said. Be careful about what the intermediate value theorem says. It doesn't say that you have to stay between them. It just says you have to hit everything in between. What could potentially happen is that you could actually dip down and come back up. Now I say what potentially could happen is that you see that because it actually does happen. It turns out there are two roots between 1 and 2. So be careful. Just because you stay the same sign doesn't mean that you had a sort of a brief fling with the negative side. Alright, I think we got enough time to talk about this last part. Show that there is some value x between 0 and 1 where cosine of x is equal to x. I don't know if you ever did this, when you have a calculator, one of those little scientific calculators, and you would just like push the cosine button and you'd update and like, oh, okay, lemme push it again. And then you're like, lemme keep pushing it, da da da da da. And if you do that, what happened eventually? - [Student] You got an error. - [Instructor] You didn't get an error unless you pushed really hard, yeah. What would happen is that you'd start getting to a very particular number. All right. Now how could you argue this? Well, there's a couple ways to do this. You could say, I can think of this as f of x. Let me look at cosine of x minus x. If we're looking at it in that way, what are you looking for? - [Student] A root? - [Instructor] You're looking for a root. So I just have to argue that there is a root. Let's think about what f of 0 is. Well, that's cosine of 0 minus 0, which is 1. That's a a positive number. What's f of 1? Well that's cosine of 1 minus 1. Now, I don't know the exact value of cosine 1, but I do know something. It's not 1. In fact, it has to be less than 1. So cosine of 1 minus 1, what kind of number is it? - [Student] Negative. - [Instructor] It's negative. So if I start out positive and if I end up negative, what has to be the case? - [Student] There has to be a root. - [Instructor] There has to be a root. So this is enough to say there has to be a root between 0 and 1. Of course, we should have also pointed out what is true about f of x? - [Student] Continuous. - [Instructor] It's continuous. But here's sort of a different way to think about it. And this is fun. So start with y equals x, start with cosine x, and here's what you can do. This is what's happening when you do your calculator. When you first plug in, start at 0, you plug in your cosine. You say, aha, that goes to 1. Well, now you just go across and go down. My picture's off, okay? And say, all right, that's what happens when you plug in, you get 1. Now what do you do? Well, now you evaluate and you go across and you go down. So this is 0. Then you go to here. Your next iteration goes here. And actually what happens is you start to spiral in. So your repeated punching of the cosine will actually spiral in to this intersection point. This intersection point's where cosine of x and x agree. Alright, that's very vague, but that's good enough for now. Alright, see you next time.