1 00:00:00,000 --> 00:00:01,260 2 00:00:01,260 --> 00:00:03,796 Now that you've seen some examples of the chain rule 3 00:00:03,795 --> 00:00:06,929 in use, I think the actual definition of the chain rule 4 00:00:06,929 --> 00:00:08,769 might be more digestible now. 5 00:00:08,769 --> 00:00:11,549 So let me give you the actual definition of the chain rule. 6 00:00:11,550 --> 00:00:27,339 Let's say I have a function f of x and it equals h of g of x. 7 00:00:27,339 --> 00:00:29,640 And you remember all this from composite functions. 8 00:00:29,640 --> 00:00:33,350 So the chain rule just says that the derivative of f of x 9 00:00:33,350 --> 00:00:39,500 or f prime of x is equal to the derivative of this inner 10 00:00:39,500 --> 00:00:48,369 function, g prime of x times the derivative of this h 11 00:00:48,369 --> 00:00:52,599 function, h prime of x. 12 00:00:52,600 --> 00:00:54,105 But it's not going to be just h prime of x. 13 00:00:54,104 --> 00:00:59,069 It's going to be h prime of g of x. 14 00:00:59,070 --> 00:01:01,750 So let's apply that to some examples like we were 15 00:01:01,750 --> 00:01:04,290 doing before, and I think it'll make some sense. 16 00:01:04,290 --> 00:01:17,870 So let's say we had f of x is equal to x squared plus 5x 17 00:01:17,870 --> 00:01:24,079 plus 3, all of this to the fifth power. 18 00:01:24,079 --> 00:01:27,579 So in this example, what's h of x, what's g of x, and 19 00:01:27,579 --> 00:01:28,439 you know what f of x is. 20 00:01:28,439 --> 00:01:33,239 Well let's say g of x would be this inner function. 21 00:01:33,239 --> 00:01:40,009 So we would say-- let me pick a different color-- g of x here 22 00:01:40,010 --> 00:01:47,260 is x squared plus 5x plus 3. 23 00:01:47,260 --> 00:01:49,480 It's the stuff, f g of x. 24 00:01:49,480 --> 00:01:52,260 25 00:01:52,260 --> 00:01:55,715 Well h of g of x is this whole thing, so what would h of x be? 26 00:01:55,715 --> 00:02:01,750 27 00:02:01,750 --> 00:02:04,840 This is h of g of x, but h of x would just be x 28 00:02:04,840 --> 00:02:06,939 to the fifth, right? 29 00:02:06,939 --> 00:02:10,530 Because this expression as you took this entire g of x and you 30 00:02:10,530 --> 00:02:12,370 put it in for x right here. 31 00:02:12,370 --> 00:02:15,629 I think that make sense if you take this entire expression and 32 00:02:15,629 --> 00:02:17,719 you substitute x here for this entire expression you 33 00:02:17,719 --> 00:02:19,810 get this expression. 34 00:02:19,810 --> 00:02:30,280 And this shows that this is equal to h of g of x. 35 00:02:30,280 --> 00:02:33,449 If you just take this blue part and substitute it for x, you 36 00:02:33,449 --> 00:02:35,409 get this entire expression. 37 00:02:35,409 --> 00:02:38,859 So the chain rule just tells us that the derivative of this, 38 00:02:38,860 --> 00:02:40,980 that f prime of x-- and I have a feeling I'm going to run out 39 00:02:40,979 --> 00:02:45,569 of space-- f prime of x-- well actually before I do anything, 40 00:02:45,569 --> 00:02:46,949 let's figure out the derivatives of g 41 00:02:46,949 --> 00:02:48,469 of x and h of x. 42 00:02:48,469 --> 00:02:52,699 g of x of g prime of x-- let me draw a little line here to 43 00:02:52,699 --> 00:02:55,530 divide it out, I know I'm running out of space. 44 00:02:55,530 --> 00:03:03,530 So g prime of x is equal to 2x plus 5. 45 00:03:03,530 --> 00:03:06,199 46 00:03:06,199 --> 00:03:09,289 2x plus 5, and then derivative 3 is just 0, right? 47 00:03:09,289 --> 00:03:17,150 And the derivative of h of x? h prime of x is equal 48 00:03:17,150 --> 00:03:22,409 to 5 x to the fourth. 49 00:03:22,409 --> 00:03:25,270 So the chain rule just says that the derivative of this 50 00:03:25,270 --> 00:03:30,530 entire composite function is just-- let me just 51 00:03:30,530 --> 00:03:31,240 write it down here. 52 00:03:31,240 --> 00:03:34,850 I'm doing this to optimally confuse you. 53 00:03:34,849 --> 00:03:40,049 The derivative of this entire function is just g prime of x. 54 00:03:40,050 --> 00:03:42,450 Well we figured out with g prime of x is here, it's 2x 55 00:03:42,449 --> 00:03:55,259 plus 5 times h times h prime of g of x. 56 00:03:55,259 --> 00:03:56,310 So what's h prime of g of x? 57 00:03:56,310 --> 00:03:59,750 Well h prime of x is 5x to the fourth, but we want 58 00:03:59,750 --> 00:04:01,800 h prime of g of x. 59 00:04:01,800 --> 00:04:11,330 So h prime of g of x would equal 5 times g 60 00:04:11,330 --> 00:04:14,190 of x to the fourth. 61 00:04:14,189 --> 00:04:17,310 And we know what g of x is, it's this whole thing. 62 00:04:17,310 --> 00:04:21,970 So it would be times 5, and this whole thing x squared 63 00:04:21,970 --> 00:04:26,990 plus 5x plus 3, all that to the fourth power. 64 00:04:26,990 --> 00:04:29,814 I think I have truly, truly confused you, so I'm going 65 00:04:29,814 --> 00:04:33,629 to try to do a couple of more examples. 66 00:04:33,629 --> 00:04:36,310 Clear this. 67 00:04:36,310 --> 00:04:37,560 OK. 68 00:04:37,560 --> 00:04:39,319 Let me write it up here again. 69 00:04:39,319 --> 00:04:55,870 So if we say that f of x is equal to h of g of x, then f 70 00:04:55,870 --> 00:05:07,055 prime of x is equal to g prime of x times h prime of g of x. 71 00:05:07,055 --> 00:05:09,790 72 00:05:09,790 --> 00:05:10,955 So I'll do another example. 73 00:05:10,954 --> 00:05:15,269 74 00:05:15,269 --> 00:05:28,750 Let's say that g of x is equal to x to the seventh minus 75 00:05:28,750 --> 00:05:33,149 3x to the ninth is 3. 76 00:05:33,149 --> 00:05:44,870 And let's say that h of x is equal to-- let's do something 77 00:05:44,870 --> 00:05:46,259 reasonably straightforward. 78 00:05:46,259 --> 00:05:55,569 Let's say h of x is x to the minus 10. 79 00:05:55,569 --> 00:06:00,430 So what is f of x? f of x is just h of g of x, and this 80 00:06:00,430 --> 00:06:03,660 should be a bit of a reminder from composite functions. 81 00:06:03,660 --> 00:06:04,310 So let's see. 82 00:06:04,310 --> 00:06:15,995 h of g of x would just be-- you take g of x and you substitute 83 00:06:15,995 --> 00:06:25,090 it for x here, so it would just be this expression, x to the 84 00:06:25,089 --> 00:06:31,669 seventh minus 3x to the minus third, and then all of that 85 00:06:31,670 --> 00:06:33,810 to the minus 10th power. 86 00:06:33,810 --> 00:06:35,720 So this is our f of x. 87 00:06:35,720 --> 00:06:38,700 And this is of course equal to f of x, right, because f of 88 00:06:38,699 --> 00:06:41,349 x is equal to h of g of x. 89 00:06:41,350 --> 00:06:44,050 I know this very confusing, but bear with me. 90 00:06:44,050 --> 00:06:45,650 Maybe you have to watch the video twice and it'll 91 00:06:45,649 --> 00:06:47,129 start making more sense. 92 00:06:47,129 --> 00:06:49,769 Well we want to now figure out what f prime of x is. 93 00:06:49,769 --> 00:06:54,759 94 00:06:54,759 --> 00:06:58,569 Well the chain rule tells us all it is, is we take the 95 00:06:58,569 --> 00:07:00,930 derivative of g of x, right? 96 00:07:00,930 --> 00:07:03,240 So the derivative of g of x is what? 97 00:07:03,240 --> 00:07:04,449 That's easy. 98 00:07:04,449 --> 00:07:06,189 Or hopefully it's easy by now. 99 00:07:06,189 --> 00:07:12,279 Derivative of g of x is 7x to the sixth, and minus 3 times 100 00:07:12,279 --> 00:07:16,719 minus 3 is plus 9x to the minus 4. 101 00:07:16,720 --> 00:07:20,790 I just took minus 3 and went down 1, so that's g prime of x. 102 00:07:20,790 --> 00:07:23,350 103 00:07:23,350 --> 00:07:31,129 And then times h prime of g of x. 104 00:07:31,129 --> 00:07:34,550 Well what's h prime of x? 105 00:07:34,550 --> 00:07:35,009 That's easy. 106 00:07:35,009 --> 00:07:39,889 That's just minus 10 times x to the minus 11. 107 00:07:39,889 --> 00:07:43,050 But we want to do h prime of g of x. 108 00:07:43,050 --> 00:07:45,590 So instead of having an x here, we're going to substitute that 109 00:07:45,589 --> 00:07:48,319 x with the entire g of x expression. 110 00:07:48,319 --> 00:07:55,759 So this is just times 10 time something to the minus eleven, 111 00:07:55,759 --> 00:07:57,599 and that something is just g of x. 112 00:07:57,600 --> 00:08:00,310 113 00:08:00,310 --> 00:08:05,780 x to the seventh, minus 3x access to the minus 3. 114 00:08:05,779 --> 00:08:10,779 And there's our answer. f prime of x is the derivative of kind 115 00:08:10,779 --> 00:08:15,299 of the inner function, g of x, times the derivative of the 116 00:08:15,300 --> 00:08:19,420 outer function, but instead of it just being applied to x it'd 117 00:08:19,420 --> 00:08:23,960 be applied to the entire g of x instead of an x being here. 118 00:08:23,959 --> 00:08:25,469 Maybe I've confused you more. 119 00:08:25,470 --> 00:08:27,680 Let me do one quick example just to show you that you 120 00:08:27,680 --> 00:08:30,939 don't have to kind of do this whole h of g of every time. 121 00:08:30,939 --> 00:08:33,789 122 00:08:33,789 --> 00:08:48,980 So if I have f of x is equal to 5 times minus x to the eighth, 123 00:08:48,980 --> 00:08:54,180 plus x to the minus eighth, all of that over to 124 00:08:54,179 --> 00:08:57,629 the fifth power. 125 00:08:57,629 --> 00:09:00,610 If I want to figure out f prime of x I just take the derivative 126 00:09:00,610 --> 00:09:05,480 of this inner function I guess I could call it, so that's 127 00:09:05,480 --> 00:09:12,480 minus 8x to the seventh minus 8x-- because it's just take the 128 00:09:12,480 --> 00:09:18,580 negative 8-- to the minus ninth, times the derivative 129 00:09:18,580 --> 00:09:19,920 of this larger function. 130 00:09:19,919 --> 00:09:27,740 So 5 times 5 is 25 times something to the fourth. 131 00:09:27,740 --> 00:09:30,440 And that something is just going to be this expression 132 00:09:30,440 --> 00:09:35,730 minus x to the eighth plus x to the minus eighth. 133 00:09:35,730 --> 00:09:36,289 And we're done. 134 00:09:36,289 --> 00:09:37,099 You could simplify it. 135 00:09:37,100 --> 00:09:40,080 You could multiply this 25 out and do et cetera, et cetera. 136 00:09:40,080 --> 00:09:42,540 Hopefully this gives you more of an intuition of what the 137 00:09:42,539 --> 00:09:45,730 chain rule is all about, and I'm going to do a lot more 138 00:09:45,730 --> 00:09:47,909 examples in the next couple of presentations as well. 139 00:09:47,909 --> 00:09:48,250 See you soon. 140 00:09:48,250 --> 00:09:49,549