1 00:00:00,000 --> 00:00:00,000 2 00:00:00,000 --> 00:00:10,000 CHRISTINE BREINER: Welcome back to recitation. 3 00:00:10,000 --> 00:00:12,050 Today we're going to talk about something you've been 4 00:00:12,050 --> 00:00:13,110 seeing in the lectures. 5 00:00:13,110 --> 00:00:16,600 Specifically, we're going to talk about continuity and 6 00:00:16,600 --> 00:00:18,000 differentiability. 7 00:00:18,000 --> 00:00:21,120 And we're going to use an example to see a little bit 8 00:00:21,120 --> 00:00:22,350 what the difference is. 9 00:00:22,350 --> 00:00:25,320 That how you can be continuous and not necessarily 10 00:00:25,320 --> 00:00:26,470 differentiable. 11 00:00:26,470 --> 00:00:30,040 And how it's a little stronger to have differentiability. 12 00:00:30,040 --> 00:00:32,770 So we're going to deal with a piecewise function. 13 00:00:32,770 --> 00:00:35,650 I'm going to ask a question, I'll give you a little bit of 14 00:00:35,650 --> 00:00:37,750 time to work on it, and then we'll come back. 15 00:00:37,750 --> 00:00:39,630 So the question is the following-- 16 00:00:39,630 --> 00:00:43,170 for what values of a and b is the following function either 17 00:00:43,170 --> 00:00:46,720 first, continuous, or second, differentiable? 18 00:00:46,720 --> 00:00:49,330 So the function is defined in the following way-- 19 00:00:49,330 --> 00:00:52,950 f of x is going to be equal to the function, x squared plus 1 20 00:00:52,950 --> 00:00:55,010 when x is bigger than 1. 21 00:00:55,010 --> 00:00:57,680 And it's going to be equal to a linear function where you 22 00:00:57,680 --> 00:01:00,560 get to pick the a, which is the slope, and you get to pick 23 00:01:00,560 --> 00:01:03,470 the b, which is a y-intercept, if x is less 24 00:01:03,470 --> 00:01:04,650 than or equal to 1. 25 00:01:04,650 --> 00:01:07,800 So what I've drawn so far, so that you can see, is that I've 26 00:01:07,800 --> 00:01:11,070 drawn the part of x squared plus 1 if x is bigger than 1. 27 00:01:11,070 --> 00:01:15,000 So I've taken the x squared function that starts at 0, 0-- 28 00:01:15,000 --> 00:01:16,980 or the vertex is at 0, 0-- 29 00:01:16,980 --> 00:01:19,600 I've shifted it up one unit, and then I've chopped off 30 00:01:19,600 --> 00:01:22,000 everything left of and including the 31 00:01:22,000 --> 00:01:23,750 value at x equal 1. 32 00:01:23,750 --> 00:01:28,050 So my question, again, is, what choices do I have for a 33 00:01:28,050 --> 00:01:32,040 and b to either first, figure out what choices for a and b 34 00:01:32,040 --> 00:01:35,450 allow this function to be continuous when I put in the 35 00:01:35,450 --> 00:01:36,990 left part-- 36 00:01:36,990 --> 00:01:40,890 so the values when x is less than or equals to 1-- and what 37 00:01:40,890 --> 00:01:44,910 values for a and b allow this function to be differentiable? 38 00:01:44,910 --> 00:01:47,105 So I'm going to give you a moment to work on it yourself, 39 00:01:47,105 --> 00:01:48,760 and then we'll come back and I'll work 40 00:01:48,760 --> 00:01:50,010 through them for you. 41 00:01:50,010 --> 00:01:53,250 42 00:01:53,250 --> 00:01:53,560 OK. 43 00:01:53,560 --> 00:01:56,280 So what we were doing, again, is we were trying to answer 44 00:01:56,280 --> 00:02:00,600 this question, choose values for a and b that make-- first, 45 00:02:00,600 --> 00:02:02,850 let's look at the continuity question. 46 00:02:02,850 --> 00:02:03,150 OK. 47 00:02:03,150 --> 00:02:06,690 So what we really need is , we need to have a linear function 48 00:02:06,690 --> 00:02:09,670 that ultimately goes through this point, 49 00:02:09,670 --> 00:02:10,650 whatever this point is. 50 00:02:10,650 --> 00:02:12,590 We have to figure out what that point is, and then we can 51 00:02:12,590 --> 00:02:15,960 figure out what values of a and b will allow that to work. 52 00:02:15,960 --> 00:02:21,730 So if I want a continuous function, these a and b, 53 00:02:21,730 --> 00:02:24,340 again, they have to be such that the line goes straight 54 00:02:24,340 --> 00:02:25,360 through that point. 55 00:02:25,360 --> 00:02:26,900 So what is that point? 56 00:02:26,900 --> 00:02:28,770 Well, the x value is 1. 57 00:02:28,770 --> 00:02:31,980 So what would the y value have to be in order to 58 00:02:31,980 --> 00:02:33,380 fill in that circle? 59 00:02:33,380 --> 00:02:36,800 We can actually look at f of x and we can say, well, if I 60 00:02:36,800 --> 00:02:41,024 wanted it to be continuous, then the y value I need here, 61 00:02:41,024 --> 00:02:43,770 I need at x equal 1 is going to be whatever the y value is 62 00:02:43,770 --> 00:02:45,290 here at x equal 1. 63 00:02:45,290 --> 00:02:47,240 So let me write that. 64 00:02:47,240 --> 00:02:49,170 Make a little space over here. 65 00:02:49,170 --> 00:03:02,900 So to answer question one, I need a and b so that at x 66 00:03:02,900 --> 00:03:06,730 equal 1, y is equal to-- 67 00:03:06,730 --> 00:03:08,610 well, if I put in 1 here, what do I get? 68 00:03:08,610 --> 00:03:11,260 I get 1 squared plus 1. 69 00:03:11,260 --> 00:03:12,480 So I get 2. 70 00:03:12,480 --> 00:03:15,265 So I need y to y equal 2 when x is equal to 1. 71 00:03:15,265 --> 00:03:16,515 OK? 72 00:03:16,515 --> 00:03:19,810 73 00:03:19,810 --> 00:03:21,330 So ,in other words, down here-- again, let me just say 74 00:03:21,330 --> 00:03:25,520 before I go on, this point is one comma two. 75 00:03:25,520 --> 00:03:27,310 So what I need is a line that goes through the 76 00:03:27,310 --> 00:03:28,150 point one comma two. 77 00:03:28,150 --> 00:03:29,700 OK? 78 00:03:29,700 --> 00:03:31,620 So what is that? 79 00:03:31,620 --> 00:03:34,950 That would be, in this case, that would be, the output is 80 00:03:34,950 --> 00:03:38,950 2, and the input is a times-- well, x is 1-- 81 00:03:38,950 --> 00:03:40,880 1 plus b. 82 00:03:40,880 --> 00:03:47,730 So that means a plus b has to equal 2. 83 00:03:47,730 --> 00:03:50,380 And that actually represents all the solutions. 84 00:03:50,380 --> 00:03:53,260 So there are an infinite number solutions I could have. 85 00:03:53,260 --> 00:03:57,016 And if you think about it, I could draw some of these, I 86 00:03:57,016 --> 00:03:57,880 could draw some of these lines. 87 00:03:57,880 --> 00:04:05,300 So let's take, for instance, b equals 2 and a equals 0. 88 00:04:05,300 --> 00:04:09,780 When b is 2 and a is 0, it's the constant, it's the 89 00:04:09,780 --> 00:04:11,240 constant function f of x equals 2. 90 00:04:11,240 --> 00:04:14,020 It's a straight line. 91 00:04:14,020 --> 00:04:16,550 That would graph-- going to graph that here. 92 00:04:16,550 --> 00:04:21,020 That would graph straight across, and that would fill in 93 00:04:21,020 --> 00:04:25,800 right here, and this would be if we had on this side, this 94 00:04:25,800 --> 00:04:28,845 is f of x equals 2. 95 00:04:28,845 --> 00:04:31,300 OK? 96 00:04:31,300 --> 00:04:35,110 I could also have chosen a plus b equals 2. 97 00:04:35,110 --> 00:04:37,920 I could also have chosen a equals 1 and b equals 1. 98 00:04:37,920 --> 00:04:40,430 So I could have slope 1 and intercept 1. 99 00:04:40,430 --> 00:04:42,015 Notice, by the way, this one is not differentiable. 100 00:04:42,015 --> 00:04:42,970 Right? 101 00:04:42,970 --> 00:04:47,250 It's obviously, there's a significant break there. 102 00:04:47,250 --> 00:04:50,150 We'll see also, with a equal 1 and b equals 1, it's also not 103 00:04:50,150 --> 00:04:51,230 differentiable. 104 00:04:51,230 --> 00:04:55,570 So a equals 1 is slope 1, and b equals 1 is intercept is 1. 105 00:04:55,570 --> 00:04:56,990 That's this line. 106 00:04:56,990 --> 00:05:01,530 107 00:05:01,530 --> 00:05:07,700 So this is kind of running out of room, but f of x 108 00:05:07,700 --> 00:05:12,980 equals x plus 1. 109 00:05:12,980 --> 00:05:14,610 Hopefully you can see that. 110 00:05:14,610 --> 00:05:16,650 f of x equals x plus 1. 111 00:05:16,650 --> 00:05:18,050 f of x equals 2. 112 00:05:18,050 --> 00:05:21,800 This one looks a little bit closer to being almost like 113 00:05:21,800 --> 00:05:23,770 the tangent lines are going to match up there. 114 00:05:23,770 --> 00:05:24,880 But it's not quite. 115 00:05:24,880 --> 00:05:28,980 And we'll see in a second what we will need. 116 00:05:28,980 --> 00:05:31,620 So this was, we answered the continuity question. 117 00:05:31,620 --> 00:05:31,930 OK. 118 00:05:31,930 --> 00:05:34,660 So now let's answer the differentiability question. 119 00:05:34,660 --> 00:05:35,260 OK. 120 00:05:35,260 --> 00:05:36,330 Notice, again, continuous. 121 00:05:36,330 --> 00:05:38,150 We have a lot of lines that will work. 122 00:05:38,150 --> 00:05:39,400 OK. 123 00:05:39,400 --> 00:05:41,190 124 00:05:41,190 --> 00:05:43,750 But to answer the differentiability question, I 125 00:05:43,750 --> 00:05:47,230 need the derivative as I come in from the left to be equal 126 00:05:47,230 --> 00:05:49,270 to the derivative as I come in from the right. 127 00:05:49,270 --> 00:05:51,130 So actually, I think I did that backwards. 128 00:05:51,130 --> 00:05:52,990 This is, as I come in from the right, I need this 129 00:05:52,990 --> 00:05:53,320 derivative-- 130 00:05:53,320 --> 00:05:55,270 this gives me a certain value. 131 00:05:55,270 --> 00:05:56,820 As I come in from the left, I need a 132 00:05:56,820 --> 00:05:58,590 derivative coming this direction. 133 00:05:58,590 --> 00:06:00,050 I need them to be the same. 134 00:06:00,050 --> 00:06:01,580 That's what it would mean for the function to be 135 00:06:01,580 --> 00:06:02,820 differentiable. 136 00:06:02,820 --> 00:06:06,080 I can write that in words. 137 00:06:06,080 --> 00:06:13,180 The limit as x goes to 1 from the left of f prime of x has 138 00:06:13,180 --> 00:06:19,870 to equal the limit as x goes to 1 from the right 139 00:06:19,870 --> 00:06:22,370 of f prime of x. 140 00:06:22,370 --> 00:06:23,180 I'm not sure-- 141 00:06:23,180 --> 00:06:25,640 I think you saw this notation already. 142 00:06:25,640 --> 00:06:27,370 Limits coming in from the left are 143 00:06:27,370 --> 00:06:29,410 designated by a minus sign. 144 00:06:29,410 --> 00:06:30,820 Limits coming in from the right are 145 00:06:30,820 --> 00:06:31,970 designated by a plus sign. 146 00:06:31,970 --> 00:06:35,150 So we need these two limits to agree in order for the 147 00:06:35,150 --> 00:06:37,760 function to have a well-defined derivative at 148 00:06:37,760 --> 00:06:39,310 that point. 149 00:06:39,310 --> 00:06:41,790 So let's figure out what this is. 150 00:06:41,790 --> 00:06:44,270 Because we have the function here. 151 00:06:44,270 --> 00:06:48,060 The function to the right of 1 is x squared plus 1. 152 00:06:48,060 --> 00:06:50,030 We know its derivative. 153 00:06:50,030 --> 00:06:52,910 Its derivative is 2x. 154 00:06:52,910 --> 00:06:59,510 So on this side, we have the limit is x goes to 1 from the 155 00:06:59,510 --> 00:07:02,080 right of 2x. 156 00:07:02,080 --> 00:07:03,150 And now we can fill that in. 157 00:07:03,150 --> 00:07:04,410 What is that? 158 00:07:04,410 --> 00:07:07,870 Well, I just evaluate at x equal 1 and I get 2. 159 00:07:07,870 --> 00:07:10,450 OK? 160 00:07:10,450 --> 00:07:13,010 And now that means I need the limit as x goes to 1 from the 161 00:07:13,010 --> 00:07:15,750 left of the derivative to also be 2, so let's 162 00:07:15,750 --> 00:07:17,610 fill in this side. 163 00:07:17,610 --> 00:07:22,300 The function on the left, at the left of 1 is ax plus b. 164 00:07:22,300 --> 00:07:24,160 So what is its derivative? 165 00:07:24,160 --> 00:07:25,950 Its derivative is just a. 166 00:07:25,950 --> 00:07:26,950 Right? 167 00:07:26,950 --> 00:07:28,800 Because the derivative of b b is a constant. 168 00:07:28,800 --> 00:07:30,010 That derivative is 0. 169 00:07:30,010 --> 00:07:31,647 The derivative of this is a. 170 00:07:31,647 --> 00:07:32,730 OK? 171 00:07:32,730 --> 00:07:40,570 So we get the limit is x goes to 1 from the left of a. 172 00:07:40,570 --> 00:07:42,310 That's what this left hand expression is. 173 00:07:42,310 --> 00:07:46,020 Well, if I evaluate a at x equal 1, I can actually just 174 00:07:46,020 --> 00:07:46,420 plug it in. 175 00:07:46,420 --> 00:07:47,620 There's no x there. 176 00:07:47,620 --> 00:07:49,910 This is a constant function, so as x goes to 1 from the 177 00:07:49,910 --> 00:07:51,710 left, I just get a. 178 00:07:51,710 --> 00:07:54,945 So that tells me that a has to equal 2 here. 179 00:07:54,945 --> 00:07:56,195 OK? 180 00:07:56,195 --> 00:07:58,320 181 00:07:58,320 --> 00:08:01,500 So in order to make the function differentiable, I 182 00:08:01,500 --> 00:08:04,770 only have one value of a I'm allowed to use, and that's 183 00:08:04,770 --> 00:08:05,877 when a equals 2. 184 00:08:05,877 --> 00:08:07,340 OK? 185 00:08:07,340 --> 00:08:08,910 So I didn't draw this one, yet. 186 00:08:08,910 --> 00:08:11,100 I didn't draw it on purpose because I wanted to save that 187 00:08:11,100 --> 00:08:12,280 for last. 188 00:08:12,280 --> 00:08:14,760 So when a is 2, what's b have to be? 189 00:08:14,760 --> 00:08:17,320 Well, in order to be differentiable it first has to 190 00:08:17,320 --> 00:08:18,020 be continuous. 191 00:08:18,020 --> 00:08:20,110 So it has to satisfy this-- 192 00:08:20,110 --> 00:08:22,640 a equals 2-- and it has to satisfy this-- 193 00:08:22,640 --> 00:08:24,240 a plus b equals 2. 194 00:08:24,240 --> 00:08:28,010 So that tells me a equals 2, and it tells me b 195 00:08:28,010 --> 00:08:29,730 has to equal 0. 196 00:08:29,730 --> 00:08:31,345 That comes from our work in number one. 197 00:08:31,345 --> 00:08:33,750 OK? 198 00:08:33,750 --> 00:08:34,970 What does that represent? 199 00:08:34,970 --> 00:08:38,950 That's a line with intercept 0 and slope 2. 200 00:08:38,950 --> 00:08:42,920 So I'll draw that one last. Goes through 0, has slope 2, 201 00:08:42,920 --> 00:08:44,790 so it goes through this point. 202 00:08:44,790 --> 00:08:51,780 And if I draw those, if I connect those up, we see, if 203 00:08:51,780 --> 00:08:53,480 we continued we see that the tangent 204 00:08:53,480 --> 00:08:55,630 lines there agree exactly. 205 00:08:55,630 --> 00:08:59,115 But the function itself is just this part. 206 00:08:59,115 --> 00:09:02,290 It's just, the right hand side is x squared plus 1, the left 207 00:09:02,290 --> 00:09:06,200 hand side is y equals 2x. 208 00:09:06,200 --> 00:09:08,840 So we've now figured out how to make this piecewise 209 00:09:08,840 --> 00:09:12,310 function both continuous and differentiable. 210 00:09:12,310 --> 00:09:14,210 And we'll stop there. 211 00:09:14,210 --> 00:09:14,688