1 00:00:00,000 --> 00:00:07,420 PROFESSOR: Hi. 2 00:00:07,420 --> 00:00:08,970 Welcome back to recitation. 3 00:00:08,970 --> 00:00:12,680 I have here a little bit of a strange problem for you. 4 00:00:12,680 --> 00:00:15,640 So let me just tell it to you, and then I'll give you 5 00:00:15,640 --> 00:00:16,640 some time to work on it. 6 00:00:16,640 --> 00:00:19,010 So I want to define a function, g of x, 7 00:00:19,010 --> 00:00:21,390 and I want to define it piecewise. 8 00:00:21,390 --> 00:00:26,020 So when x is positive, I just want g of x to be 1 over x. 9 00:00:26,020 --> 00:00:31,320 But when x is negative, I want g of x to be 1 of x plus 2. 10 00:00:31,320 --> 00:00:33,510 So I've got a little graph here of the function. 11 00:00:33,510 --> 00:00:35,610 So you've got, you know, when x is positive, 12 00:00:35,610 --> 00:00:37,800 it's just your usual y equals 1 over x. 13 00:00:37,800 --> 00:00:40,969 But when x is negative, I've taken, I've shifted it up by 2. 14 00:00:40,969 --> 00:00:42,510 So this is a perfectly good function. 15 00:00:42,510 --> 00:00:43,627 It's not defined at 0. 16 00:00:43,627 --> 00:00:45,130 OK? 17 00:00:45,130 --> 00:00:46,840 So what I would like you to do is 18 00:00:46,840 --> 00:00:49,010 to compute the derivative of this function, wherever 19 00:00:49,010 --> 00:00:50,550 it's defined. 20 00:00:50,550 --> 00:00:54,331 And you'll notice, when you get there, that you'll have some.. 21 00:00:54,331 --> 00:00:58,440 you'll get some answer, and maybe you'll notice something 22 00:00:58,440 --> 00:01:00,730 a little weird about that answer. 23 00:01:00,730 --> 00:01:03,670 So if you notice something weird about it, what I want you to do 24 00:01:03,670 --> 00:01:05,434 is try and explain why this is true. 25 00:01:05,434 --> 00:01:07,100 And if you don't notice something weird, 26 00:01:07,100 --> 00:01:11,000 then, you know, come back and we'll talk about it together. 27 00:01:11,000 --> 00:01:14,350 So why don't you pause the video, go do that computation, 28 00:01:14,350 --> 00:01:17,400 and think about what, if there's something strange going on 29 00:01:17,400 --> 00:01:18,245 here. 30 00:01:18,245 --> 00:01:20,453 And then come back and we can talk about it together. 31 00:01:28,510 --> 00:01:29,180 Welcome back. 32 00:01:29,180 --> 00:01:31,284 Hopefully you had some fun working on this problem 33 00:01:31,284 --> 00:01:32,200 and thinking about it. 34 00:01:32,200 --> 00:01:34,100 So let's do the first part, which 35 00:01:34,100 --> 00:01:36,020 is just the computational part. 36 00:01:36,020 --> 00:01:39,002 Let's have a go at it. 37 00:01:39,002 --> 00:01:40,960 So, because this function is defined piecewise, 38 00:01:40,960 --> 00:01:43,630 when we compute a derivative, we can just compute the derivative 39 00:01:43,630 --> 00:01:44,630 on the different pieces. 40 00:01:44,630 --> 00:01:46,860 So the function isn't defined at 0, 41 00:01:46,860 --> 00:01:49,260 so of course, it doesn't have a derivative at 0. 42 00:01:49,260 --> 00:01:51,990 But then we can compute a derivative when x is positive, 43 00:01:51,990 --> 00:01:54,580 and we can compute a derivative when x is negative. 44 00:01:57,320 --> 00:02:04,020 So when x is bigger than 0, g prime of x, well, 45 00:02:04,020 --> 00:02:10,020 that's just d over dx of 1 over x. 46 00:02:10,020 --> 00:02:11,730 So that's something we're familiar with. 47 00:02:11,730 --> 00:02:14,355 Its minus 1 over x squared. 48 00:02:14,355 --> 00:02:15,875 So that's for x positive. 49 00:02:19,870 --> 00:02:28,530 When x is less than 0, g prime of x is d over dx of 1 50 00:02:28,530 --> 00:02:32,760 over x plus 2, because that's what g of x is. 51 00:02:32,760 --> 00:02:35,360 And, OK, and so this is, well, the plus 2 gets killed, 52 00:02:35,360 --> 00:02:37,910 and so then we have the derivative of 1 over x. 53 00:02:37,910 --> 00:02:41,350 That's minus 1 over x squared. 54 00:02:41,350 --> 00:02:43,704 So one thing you've noticed is that this is minus 1 55 00:02:43,704 --> 00:02:46,120 over x squared here, and it's minus 1 over x squared here. 56 00:02:46,120 --> 00:02:48,620 So although we defined this piecewise, 57 00:02:48,620 --> 00:02:50,900 we could, we can summarize this by saying, 58 00:02:50,900 --> 00:02:58,360 so the derivative is minus 1 over x squared always, 59 00:02:58,360 --> 00:03:02,639 so for all x not equal to-- you know, 60 00:03:02,639 --> 00:03:04,430 it doesn't have a derivative at x equals 0. 61 00:03:04,430 --> 00:03:07,360 It's not defined at 0, it can't have a derivative there. 62 00:03:07,360 --> 00:03:11,720 So, but we don't need the piecewise definition, anymore. 63 00:03:11,720 --> 00:03:14,660 So that was kind of interesting, that we 64 00:03:14,660 --> 00:03:18,100 can summarize the derivative of this piecewise function 65 00:03:18,100 --> 00:03:19,685 in a non-piecewise way. 66 00:03:24,610 --> 00:03:28,810 Now, the thing is, we've learned what the anti-derivative 67 00:03:28,810 --> 00:03:30,240 of this function is. 68 00:03:30,240 --> 00:03:40,820 So we know that the anti-derivative of minus 1 69 00:03:40,820 --> 00:03:48,290 over x squared dx is 1 over x plus a constant. 70 00:03:48,290 --> 00:03:51,710 So we know that the functions whose derivative is minus 1 71 00:03:51,710 --> 00:03:55,740 over x squared are of the form, 1 over x plus a constant. 72 00:03:55,740 --> 00:03:59,480 The thing is, this function g that we just talked about, 73 00:03:59,480 --> 00:04:01,125 this function g isn't of that form. 74 00:04:01,125 --> 00:04:02,020 Right? 75 00:04:02,020 --> 00:04:05,370 You don't get this function by taking the function 76 00:04:05,370 --> 00:04:08,010 1 over x and just shifting it up or down. 77 00:04:08,010 --> 00:04:09,825 You-- something weird happens. 78 00:04:09,825 --> 00:04:11,350 You've shifted it up on one piece 79 00:04:11,350 --> 00:04:12,970 and not on the other piece. 80 00:04:12,970 --> 00:04:16,815 And yet, it's still true that the derivative of g 81 00:04:16,815 --> 00:04:19,170 is equal to minus 1 over x squared. 82 00:04:19,170 --> 00:04:21,749 So this is a little bit of a head-scratcher. 83 00:04:21,749 --> 00:04:25,264 And I wanted to talk about why this happens. 84 00:04:25,264 --> 00:04:27,680 And the thing is that there's a sort of theoretical reason 85 00:04:27,680 --> 00:04:29,510 for this, which is that you remember 86 00:04:29,510 --> 00:04:32,900 that the reason that we know that anti-derivatives have 87 00:04:32,900 --> 00:04:36,130 this form, a function plus a constant, 88 00:04:36,130 --> 00:04:38,280 is because we know that constants 89 00:04:38,280 --> 00:04:40,640 are the functions with derivative 0. 90 00:04:40,640 --> 00:04:45,860 And so we were able to apply the mean value theorem in order 91 00:04:45,860 --> 00:04:49,540 to show that if two functions have the same derivative, then 92 00:04:49,540 --> 00:04:52,480 they differ by each other, differ from each other 93 00:04:52,480 --> 00:04:53,500 by a constant. 94 00:04:53,500 --> 00:04:55,560 If two functions have the same derivative, 95 00:04:55,560 --> 00:04:57,870 they differ by a constant. 96 00:04:57,870 --> 00:05:01,870 And we used, as a really crucial step in that proof, 97 00:05:01,870 --> 00:05:03,744 the mean value theorem. 98 00:05:03,744 --> 00:05:05,410 Now the thing is, the mean value theorem 99 00:05:05,410 --> 00:05:09,090 has, as one of its assumptions, as one of its hypotheses, 100 00:05:09,090 --> 00:05:10,940 that the functions that you're working with 101 00:05:10,940 --> 00:05:12,669 are continuous and differentiable 102 00:05:12,669 --> 00:05:13,377 in some interval. 103 00:05:13,377 --> 00:05:15,620 OK? 104 00:05:15,620 --> 00:05:18,830 So what's happened here is that the functions that we're 105 00:05:18,830 --> 00:05:23,260 talking about, the function 1 over x and the function minus 1 106 00:05:23,260 --> 00:05:25,570 over x squared, those functions are 107 00:05:25,570 --> 00:05:27,985 continuous and differentiable on certain intervals. 108 00:05:27,985 --> 00:05:29,860 So if we look-- if we go back to this picture 109 00:05:29,860 --> 00:05:35,370 here we see that this function g of x, just like the function 1 110 00:05:35,370 --> 00:05:39,570 over x, it's continuous and differentiable for positive x, 111 00:05:39,570 --> 00:05:42,040 it's continuous and differentiable for negative x, 112 00:05:42,040 --> 00:05:44,960 but at 0, there's a discontinuity. 113 00:05:44,960 --> 00:05:46,890 So there's no interval that crosses 114 00:05:46,890 --> 00:05:51,260 0 on which this function is continuous or differentiable. 115 00:05:51,260 --> 00:05:53,610 As a result, the mean value theorem 116 00:05:53,610 --> 00:05:58,080 can't tell us anything about intervals that cross 0. 117 00:05:58,080 --> 00:06:00,010 So if the mean value theorem doesn't tell us 118 00:06:00,010 --> 00:06:03,300 anything in that case, it means the conclusion isn't true 119 00:06:03,300 --> 00:06:05,710 and we get a situation-- sorry. 120 00:06:05,710 --> 00:06:07,070 I should rephrase that. 121 00:06:07,070 --> 00:06:10,120 It means the conclusion doesn't have to be true. 122 00:06:10,120 --> 00:06:15,150 Our proof doesn't work in a case where we have a discontinuity. 123 00:06:15,150 --> 00:06:17,270 And what happens, in fact, is right 124 00:06:17,270 --> 00:06:20,850 what we have here, which is that when you have a function that 125 00:06:20,850 --> 00:06:25,000 has a discontinuity and you look at its anti-derivatives, what 126 00:06:25,000 --> 00:06:28,410 you can do is that, in addition to shifting the whole thing up 127 00:06:28,410 --> 00:06:30,300 and down, you can shift the pieces 128 00:06:30,300 --> 00:06:33,660 on either side of the discontinuity separately. 129 00:06:33,660 --> 00:06:36,870 Just like in this case we can shift the piece 130 00:06:36,870 --> 00:06:39,560 to the left of 0 separately from the piece to the right of 0 131 00:06:39,560 --> 00:06:41,580 and get a function whose derivative is still 132 00:06:41,580 --> 00:06:42,690 what we started with. 133 00:06:42,690 --> 00:06:46,650 So this function g of x, we get by shifting part of 1 134 00:06:46,650 --> 00:06:49,730 over x up, and it gives us a function whose derivative is 135 00:06:49,730 --> 00:06:53,020 still minus 1 over x squared. 136 00:06:53,020 --> 00:06:54,860 So this is true anytime you have a function 137 00:06:54,860 --> 00:06:55,735 with a discontinuity. 138 00:06:55,735 --> 00:06:59,930 So one consequence of this-- I'm going to go back over here 139 00:06:59,930 --> 00:07:08,260 and just write down one special case of this-- is that to say, 140 00:07:08,260 --> 00:07:12,710 we say that the anti-derivative of 1 over x dx 141 00:07:12,710 --> 00:07:19,010 is equal to ln of the absolute value of x plus c. 142 00:07:19,010 --> 00:07:23,900 What this really means is that when x is positive, 143 00:07:23,900 --> 00:07:27,360 we have a single kind of anti-derivative, 144 00:07:27,360 --> 00:07:30,470 and they're of the form, ln x plus a constant. 145 00:07:30,470 --> 00:07:33,220 And when x is negative, we have a single anti-derivative, 146 00:07:33,220 --> 00:07:36,800 that's-- or single family of anti-derivatives, 147 00:07:36,800 --> 00:07:39,360 of the form ln of minus x-- remember, 148 00:07:39,360 --> 00:07:42,740 absolutely value of x is minus x when x is negative-- plus c. 149 00:07:42,740 --> 00:07:44,880 But if we consider x to be positive and negative 150 00:07:44,880 --> 00:07:47,140 at the same time, the two constants 151 00:07:47,140 --> 00:07:48,494 don't necessarily have to agree. 152 00:07:48,494 --> 00:07:50,160 You can have the same situation that you 153 00:07:50,160 --> 00:07:53,760 had before where one side can shift up and down independently 154 00:07:53,760 --> 00:07:57,490 of the other, because there's that discontinuity at 0 there. 155 00:07:57,490 --> 00:07:59,710 So this is just something to keep in mind. 156 00:07:59,710 --> 00:08:01,390 It also means you have to be careful 157 00:08:01,390 --> 00:08:02,820 with certain substitutions. 158 00:08:02,820 --> 00:08:04,500 You don't want to do substitutions 159 00:08:04,500 --> 00:08:06,290 that have discontinuities. 160 00:08:06,290 --> 00:08:08,630 If you do substitutions that have discontinuities, 161 00:08:08,630 --> 00:08:12,150 you might accidentally introduce a discontinuity 162 00:08:12,150 --> 00:08:16,020 and bad things can happen that I won't go into now. 163 00:08:16,020 --> 00:08:18,490 You can make-- end up with statements 164 00:08:18,490 --> 00:08:22,310 that don't make any sense by making a substitution where 165 00:08:22,310 --> 00:08:24,130 the function that you're substituting 166 00:08:24,130 --> 00:08:25,769 has a discontinuity in it. 167 00:08:25,769 --> 00:08:27,560 So you-- or another way of saying it is you 168 00:08:27,560 --> 00:08:32,430 have to restrict to some interval on which it really 169 00:08:32,430 --> 00:08:33,630 is continuous. 170 00:08:33,630 --> 00:08:35,890 And then on each of those intervals it makes sense, 171 00:08:35,890 --> 00:08:37,620 but bad things could happen when you 172 00:08:37,620 --> 00:08:39,850 cross those discontinuities. 173 00:08:39,850 --> 00:08:41,620 So this is a little bit theoretical, 174 00:08:41,620 --> 00:08:43,650 but I think it's a nice thing to be aware of, 175 00:08:43,650 --> 00:08:47,110 a nice thing to keep in mind when you're working 176 00:08:47,110 --> 00:08:49,460 with some of these expressions. 177 00:08:49,460 --> 00:08:50,964 So I'll end there.