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