1 00:00:00,000 --> 00:00:02,899 [SOUND] So, who knows what a function is, right? 2 00:00:02,899 --> 00:00:06,934 But I know what it does. It takes an input value, and produces an 3 00:00:06,934 --> 00:00:10,338 output value. And we've got a whole bunch of functions, 4 00:00:10,338 --> 00:00:13,363 right? And we can take these functions and start 5 00:00:13,363 --> 00:00:17,587 asking questions about them. What happens when you plug in a really 6 00:00:17,587 --> 00:00:22,378 big number, or a really small number? Or, or what happens when you plug in two 7 00:00:22,378 --> 00:00:26,727 numbers that are nearby each other? How are the outputs related, right? 8 00:00:26,727 --> 00:00:31,644 Those are the kinds of questions that are going to occupy us for the rest of the 9 00:00:31,644 --> 00:00:34,241 term. But even before we start thinking about 10 00:00:34,241 --> 00:00:38,182 questions like that, right? There are some things that we can still ask about 11 00:00:38,182 --> 00:00:40,708 functions. Like, how do you know when two functions 12 00:00:40,708 --> 00:00:46,090 are the same function? For instance, here's two functions. 13 00:00:46,090 --> 00:00:56,260 f(x) = (1+x)^2, g(x) = x^2 + 2x + 1. Are these the same function? 14 00:00:56,260 --> 00:01:00,299 Now, let's try. Look at the value like f(2). 15 00:01:00,299 --> 00:01:05,865 f(2) = (1+2)^2, start replacing the x by two, 16 00:01:05,865 --> 00:01:10,674 1 + 2 = 3. 3^2 = 9. 17 00:01:10,674 --> 00:01:19,792 Well, what's what's g(2)? Well, g(2) would be 2^2 + 2 * 2 + 1. 18 00:01:19,792 --> 00:01:28,716 2^2 = 4, 2 * 2 = 4 + 1, 4 + 4 = 8 + 1 = 9. 19 00:01:28,716 --> 00:01:36,380 Look, f and g, when I plug in x = 2 give me the same output value of nine. 20 00:01:36,380 --> 00:01:39,813 And that should be a little bit surprising, right? 21 00:01:39,813 --> 00:01:45,349 Because the way that f and g are telling me to compute their output is totally 22 00:01:45,349 --> 00:01:48,922 different. f takes the input two, adds one to it and 23 00:01:48,922 --> 00:01:53,267 squares it to get nine. g takes two, squares it, doubles it, adds 24 00:01:53,267 --> 00:01:59,356 those two numbers to one, to get nine. So, the method by which f and g are doing 25 00:01:59,356 --> 00:02:02,614 the calculations is totally different, right? 26 00:02:02,614 --> 00:02:08,168 This sequence of operations is not the same as this sequence of operations. 27 00:02:08,168 --> 00:02:11,796 The, the rules are different. And yet, look at this. 28 00:02:11,796 --> 00:02:16,462 f(x), for any value of x, right? Is 1 + x * 1 + x, 29 00:02:16,462 --> 00:02:22,463 right? That's 1 + x^2. Well, I could expand this out, right? 30 00:02:22,463 --> 00:02:31,030 1 * 1 + x, and then x * 1 + x. I could combine some of these terms, 31 00:02:31,030 --> 00:02:35,993 right? 1 + x + x = 2x. x * x = x^2. 32 00:02:35,993 --> 00:02:43,293 Look, 1 + 2x + x^2, that's g(x). this is really quite surprising. 33 00:02:43,293 --> 00:02:48,035 f and g don't compute their output in the same way, right? 34 00:02:48,035 --> 00:02:53,444 This one is doing something different than this function, and yet, for any 35 00:02:53,444 --> 00:02:59,001 input value, f's output value is this, which is the same by expanding out as 36 00:02:59,001 --> 00:03:03,368 g(x). Now, how we're going to deal with this? 37 00:03:03,368 --> 00:03:07,251 We're going to say that f and g are at the same function, 38 00:03:07,251 --> 00:03:10,248 right? Not because they have the same rule, 39 00:03:10,248 --> 00:03:13,450 right? But because for every input value, they 40 00:03:13,450 --> 00:03:17,673 have the same output value. Here's a much more subtle example. 41 00:03:17,673 --> 00:03:21,109 Again, I got two functions. f is defined like this. 42 00:03:21,109 --> 00:03:24,895 f(x) = x^2 / x, and g is defined like this, 43 00:03:24,895 --> 00:03:29,944 g(x) is just x, the identity function. Same question, is f the same as g? 44 00:03:29,944 --> 00:03:34,431 Are these the same function? Now, they're not the same rule, right? 45 00:03:34,431 --> 00:03:39,199 This is not the same as this. So, you know, it's a little more subtle, 46 00:03:39,199 --> 00:03:41,443 you know? But that's okay, right? 47 00:03:41,443 --> 00:03:46,387 Two functions are the same if they have the same output for each input. 48 00:03:46,387 --> 00:03:51,743 So, let's see if that happens here. let's just pick some value to get a first 49 00:03:51,743 --> 00:03:54,794 test. Let's take a look at f(5), right? 50 00:03:54,794 --> 00:03:58,320 f(5) would be 5^2 / 5, that's 25. 51 00:03:58,320 --> 00:04:04,061 5^2 / 5, that's 5. Well, that's the same as g(5), right? If 52 00:04:04,061 --> 00:04:07,548 I plug anything into g, I just get the same thing out. 53 00:04:07,548 --> 00:04:12,155 So, plug in five, you get five. So, at least at the value five, f and g 54 00:04:12,155 --> 00:04:14,904 agree. You might think this always works, 55 00:04:14,904 --> 00:04:17,467 right? Because of something like this. 56 00:04:17,467 --> 00:04:21,484 You might want to say, well, f(x) that's x^2 / x, 57 00:04:21,484 --> 00:04:25,952 no matter what x is. You might rewrite this x^22 as x * x / x. 58 00:04:25,952 --> 00:04:31,731 And then, you'd be tempted to say, cancel one of these xes with the x in the 59 00:04:31,731 --> 00:04:34,427 denominator. And then, you'd write equals x. 60 00:04:34,427 --> 00:04:39,898 And x, well that's, that's g(x). So, this looks like a pretty convincing 61 00:04:39,898 --> 00:04:43,057 argument, right? Over here, I've got f of x, 62 00:04:43,057 --> 00:04:47,450 I've got a bunch of equal signs. And over here, I've got g(x). 63 00:04:47,450 --> 00:04:50,990 So maybe that means F and G are the same function. 64 00:04:50,990 --> 00:04:55,587 Ha, but not so fast. What happens if you plug in zero? 65 00:04:55,587 --> 00:04:59,742 What's f(0)? Well, I know what g(0) is. 66 00:04:59,742 --> 00:05:05,401 g(0) is zero, right? Zero is in the domain of g because zero 67 00:05:05,401 --> 00:05:09,403 makes sense for this rule. But, what's f(0)? 68 00:05:09,403 --> 00:05:12,810 Well, that would be zero squared over zero, 69 00:05:12,810 --> 00:05:13,621 whoa. Okay. 70 00:05:13,621 --> 00:05:16,135 You see this is terrible, right? 71 00:05:16,135 --> 00:05:21,813 I cannot divide by zero. This rule, x^2 / x doesn't make sense 72 00:05:21,813 --> 00:05:26,517 when x is equal to zero. So, zero is not in the domain of f, 73 00:05:26,517 --> 00:05:31,879 but it is in the domain of g. So, I'm going to say that these are not 74 00:05:31,879 --> 00:05:36,059 the same function. They don't have the same domain, 75 00:05:36,059 --> 00:05:38,566 right? f isn't defined at zero, 76 00:05:38,566 --> 00:05:44,084 and g is defined at zero. In that sense, these are really different 77 00:05:44,084 --> 00:05:48,430 functions. This example suggests that there's a real 78 00:05:48,430 --> 00:05:52,861 richness to this theory of functions, right? 79 00:05:52,861 --> 00:05:57,208 And we're going to be studying it a lot more this term. 80 00:05:57,208 --> 00:05:57,877