Okay. Hi everyone and welcome to our lecture on functions and models. This is going to be the start of the content from chapter one. This is hopefully going to be a nice pre calc review if it feels a little fast, it's by design. When we get to the actual calculus content, we will certainly slow down and talk more about it. But the idea with this chapter is sort of a warm up in case we haven't done math in a while, in case we haven't seen this, the notation, the terms the graphs. We're just going to sort of ease into things and talk more about these things this way, everyone has the same foundation. We all come from different backgrounds. Some of us have seen this before, but it's been a long time, or we've never seen this before. So the idea is we take a couple of chapters, a couple of lectures and just get everyone on the same page. So today we're going to talk about functions and models. Okay, so here it is the definition. A function is a rule that assigns to each element x and a set a exactly one element called f(x), in a set B. Little wordy [INAUDIBLE] it's kind of one of those things where you know it when you see it. The definition is not used as much, of course as the actual thing itself. So there's lots and lots of functions. Let's pick some easy ones to start. How about x + 1? Give me a number, I'll add one. You give me two, I give you three, you give me four, I give you five. You've seen these before - lines, takes years of high school to get through these. They get more complicated. You probably, I don't know It seems like a rule in calculus, whenever you do an example, you have to start with x squared. This is the graph of the parabola. We graph this thing and has a vertex. It's symmetric, nice and pretty. As you learn more functions of course, you know you see some trigs or logs or I don't know, Power functions - two to the x - there's another one. There are so many of these things. The goal in this class is to get more familiar with functions, understand them and just be useful. These are the tools that are going to take with us to other classes to the rest of this, the rest of the class here. So we want to get very very comfortable and familiar with them. These sets A and sets B that we talk about, they have fancy names, of course this set A is your domain, your domain. I'm going to start asking what's the domain of a function. Your set B over here, this is the range. These are all subsets of real numbers. And again you can think of sort of like a diagram. So you have a set A and a set B. And the function takes some x over here over to some output. And this is called the value of the function f(x). So we'll plug in numbers and we get more excited, we plug in other functions. We plug in expressions, these are all sort of normal things that we do with a function. One of the things of course that we do is we graph a function. So let's just do an example just to refresh some of our memories. So how about f(x) = equals the square root of x. There's a good old square root function - give me a number, I'll give you back the square root. So, things that I'll ask you with, any function - plug in a number. What is the square root of zero? Some people get confused by this, so I'm purposely picking this one. What number times itself is zero? Well that's zero. f of 1 all right, square root of one. What number times itself is 1? We have f(2). These sort of things. So, square root of two is not - it is what it is, what it is, it's not something you write out as decimal. but there's nothing stopping you from plugging in like other letters. So what's f(h)? Well the machine is kind of dumb, it just takes the square root of whatever you hand it, so this is the square root of h. What is the square root of, what is f of a + b? The square root of a + b. You gotta get out of the habit of sort of having a number for everything. So for example, like if I hand you a number, sure give me a number back. If I hand you a variable give me a variable back. If I hand you an expression, give me an expression back. This is sort of the idea of abstraction and so just be comfortable with handing back letters. But with numbers and stuff, what do you do with this thing? We can graph, we can certainly graph we, sorry about that. The picture here and when we do that, let's do a different color, I don't know. So we start graphing (0,0) and (1,1). And if you're at four you get two, right? These things have certain shapes. That's the square root function, sort of does like that, it goes off to infinity. And it just goes there slowly. So we can talk about things like what's the domain of the function and what is the range. So for this function, if you notice, the domain, the only thing I can plug in, let's write this down. The only thing I can plug in is positive numbers and of course zero. So I'd say like x is greater than or equal to 0. I can't plug in negative numbers. If you do you start heading over to the world of complex numbers and we try to avoid that in this class. And the range, the set of outputs of the function. If I give you a positive number and take a square root, I will also get back a positive number, right? So this is inequality notation. There's another way to write this with some people may be familiar with. You can also write this and there's nothing wrong with this, either one is acceptable - from 0 to Infinity. So a little sideways eight is the infinity symbol. When you have zero and you want to include it - for example, here we have greater than or equal - we put a square bracket. So we would do that for both of them. Zero to infinity, something like that. And infinity, because you can never quite get there, you never include it. It always gets the parentheses, something like that. So this is just one example of functions. There are many, many basic functions but the ones that come up more often get to know them, get to know their values. If I ask you what the square root 25 is, you shouldn't have to run to a calculator. If I say, "Alright, picture the graph of the square root of X in your head," you should kind of imagine a little slowly arching graph that starts at the origin with domain and range, non negative real numbers. So let's do, let's do another one of these and let's pick something else here. So how about we do the graph of f(x) = three x squared plus one. We'll do purple - Go Ravens. Okay, 3x squared + 1. So what does this function say? Give me a number. I'll square it, multiply it by three and then add one. Remember your order of operations here. So square it, multiply, and again you can plug in numbers. That seems fine. If you want to graph this thing, it's like something squared. It's going to be that parabola opening upward kind of thing. But let's just do, what can we do with this thing? Let's plug in f(a+h) and then let's minus the original function, at some a and divide the whole thing by h, let's go nuts. You say, why would I ever want to do that? This expression, by the way, has a name. If you took - in pre-calc hopefully they stress this. This is called the difference quotient. The difference quotient. It is - we'll talk more about it later but it will come up again, this expression. So let's just jump right to it. So think about what this says. This says take a plus h. What is a plus h? It's not a number. It's okay. It's a letter, who cares. Plug it into the function. So everywhere I see an x I'm going to replace it with a plus h. Let's do this part first and then subtract off the original function with a plugged in. So let's do this let's get the numerator: 3 times - - so I'm going to use parentheses here. It's important because I don't want to mess up. I'm plugging in an expression. So I see an x, I replace it with a plus h squared plus one. So there's the a plus h plugged in. Okay, now we're going to subtract off the function. Better safe than sorry, let's use parentheses again. I'm going to plug in a though, so it's not 3x squared plus one, it's 3a squared plus 1, and all of that divided by this letter h. What's a, what h? I don't know, they're some letters. What could they be? Any real number. So they are what they are. Again I handed you letters so I expect letters back. All right so let's clean this up a little bit. Let's do some algebra. Now remember when I have a plus h squared, I can't just bring in the twos. I call that the "high school dream theorem" - we wish that were true. No, you have to FOIL this out. So you get a squared plus 2a h plus h squared. So - First, Outside, Inside, Last. Plus one. Now minus sign don't forget you got to distribute this thing to all the pieces so it's minus 3a squared minus 1 and all of that is still over the h. So we've evaluated this function at this expression we're just cleaning it up. We're just simplifying our answer right now. Let's see, what do you notice here? So if I bring in the three, you get 3a squared plus 6ah plus 3h squared. So distribute that three across. There's a plus 1, there's a minus 3a squared then there's a -1. And all of that is still over h. And if you notice - and this maybe isn't obvious at first - but stuff cancels. And with stuff canceling, let me say, there's something deeper going on. It usually means something's happening. The 3a squared cancels with the negative 3a squared. The positive one cancels with the negative one.. And so you're left with 6ah plus 3h squared all over h. You say, "That's a little cleaner than what I was expecting." That's a little cleaner than what I expected, and you may sort of feel satisfied and be done, but, you know, do you see what I see? There's more to be done here. If you factor out the h, you get 6a plus 3h. So when you factor it out - in both pieces factor it out, and there's an h on the bottom, and all of a sudden there's even more cancelation that occurs. So our final cleaned up answer is 6a plus 3h. You could factor out of three here because they both have a three and a six but that's not the piece I'm after. This is perfectly fine. If you factor out the three, you're not wrong. But this is the final answer. What we're going to do eventually - and the thing, I guess the takeaway to notice is if you notice up here, I ran into a problem - is that h can't be zero, right? Because it's in the denominator and I'm not allowed to divide by zero. But through the magic of math and algebra and canceling over here, like that big problem of "h can't be zero," (maybe not a problem immediately, but we'll see why) Over here, there's no problem with h being zero. I can certainly just plug in zero here. So where this will come in later is when I want h to be zero. H will represent something later. I'm stuck. But through the magic of this expression, through the magic of this difference quotient, there's a lot going on here. So this is for now just a practice in plugging in expressions but something's up. Something's up that we'll come back to. All right, let's do one more. Let's talk about some functions a little bit more. One thing that we should know about functions is that they have to have a certain property. So the question we're after is, given a graph... So if I give you a graph, how do you tell if it is the graph of function? So what does that mean? So let's just say you start with the graph, I'll give you a graph and I have maybe something looks like this or I have another one. Maybe something that looks like this. I don't know, sideways. So the way to tell is what's called the Vertical Line Test. I'll just abbreviate it as VLT, the Vertical Line Test, and it works as follows. If you draw a bunch of vertical lines on the graph... So vertical, up and down, just draw a bunch. The idea is, does the graph cross any vertical line twice? So you can tell from this one, no matter which one you draw, the answer is going to be, "no." And for this sideways-parabola-looking thing, the answer is going to be, "yes." So, it crosses it twice. When that happens, if I never cross a vertical line twice, that's good. That means that it's going to pass. So put a little thing here. So this passes the Vertical Line Test. On the other hand, if it does cross the line - a vertical line - twice, then it fails. What does that mean? That this is not the graph of a function. So that's one way to tell if it passes or not. This Vertical Line Test is important. It'll tell us if the graph we're looking at is that of a function. And also this is an important test for you to know, because if you ever graph a function, then you should make sure it passes the Vertical Line Test. We're going to start asking you to graph some functions and it's a common mistake to come back with things that fail. And that's sort of a little self checking thing that people can always check. All right, so we'll do some more examples of these next time. See you soon.