1 00:00:00,000 --> 00:00:00,550 2 00:00:00,550 --> 00:00:03,660 A bit of a classic implicit differentiation problem 3 00:00:03,660 --> 00:00:10,900 is the problem y is equal to x to the x. 4 00:00:10,900 --> 00:00:13,810 And then to find out what the derivative of y 5 00:00:13,810 --> 00:00:16,350 is with respect to x. 6 00:00:16,350 --> 00:00:19,520 And people look at that, oh you know, I don't have just a 7 00:00:19,519 --> 00:00:21,800 constant exponent here, so I can't just use the power 8 00:00:21,800 --> 00:00:23,300 rules, how do you do it. 9 00:00:23,300 --> 00:00:26,089 And the trick here is really just to take the natural log of 10 00:00:26,089 --> 00:00:27,859 both sides of this equation. 11 00:00:27,859 --> 00:00:29,530 And this is going to build up to what we're going to 12 00:00:29,530 --> 00:00:30,460 do later in this video. 13 00:00:30,460 --> 00:00:34,530 So If you take the natural log on both sides of this equation, 14 00:00:34,530 --> 00:00:38,570 you get the natural log of y is equal to the natural 15 00:00:38,570 --> 00:00:40,880 log of x to the x. 16 00:00:40,880 --> 00:00:44,750 Now our power rules, or I guess our natural log rules, say 17 00:00:44,750 --> 00:00:46,549 look, if I'm taking the natural log of something to the 18 00:00:46,549 --> 00:00:50,729 something, this is equivalent to, I can rewrite the natural 19 00:00:50,729 --> 00:00:54,689 log of x to the x as being equal to x times the 20 00:00:54,689 --> 00:00:56,549 natural log of x. 21 00:00:56,549 --> 00:00:59,379 So let me rewrite everything again. 22 00:00:59,380 --> 00:01:01,910 If I take the natural log of both sides of that equation, I 23 00:01:01,909 --> 00:01:06,189 get the natural log of y is equal to x times the 24 00:01:06,189 --> 00:01:08,530 natural log of x. 25 00:01:08,530 --> 00:01:11,099 And now we can take the derivative of both sides of 26 00:01:11,099 --> 00:01:12,349 this with respect to x. 27 00:01:12,349 --> 00:01:15,640 So the derivative with respect to x of that, and then 28 00:01:15,640 --> 00:01:19,439 the derivative with respect to x of that. 29 00:01:19,439 --> 00:01:24,709 Now we're going to apply a little bit of the chain rule. 30 00:01:24,709 --> 00:01:25,519 So the chain rule. 31 00:01:25,519 --> 00:01:27,729 What's the derivative of this with respect to x? 32 00:01:27,730 --> 00:01:30,840 What's the derivative of our inner expression 33 00:01:30,840 --> 00:01:32,329 with respect to x? 34 00:01:32,329 --> 00:01:35,390 It's a little implicit differentiation, so it's dy 35 00:01:35,390 --> 00:01:38,599 with respect to x times the derivative of this whole 36 00:01:38,599 --> 00:01:40,709 thing with respect to this inner function. 37 00:01:40,709 --> 00:01:44,149 So the derivative of natural log of x is 1/x. 38 00:01:44,150 --> 00:01:45,690 So the derivative of natural log of y with 39 00:01:45,689 --> 00:01:48,840 respect to y is 1/y. 40 00:01:48,840 --> 00:01:50,079 So times 1/y. 41 00:01:50,079 --> 00:01:52,599 42 00:01:52,599 --> 00:01:55,449 And the derivative of this-- this is just the product rule, 43 00:01:55,450 --> 00:01:59,740 and I'll arbitrarily switch colors here-- is the derivative 44 00:01:59,739 --> 00:02:03,609 of the first term, which is 1, times the second term, so times 45 00:02:03,609 --> 00:02:08,759 the natural log of x plus the derivative of the second term, 46 00:02:08,759 --> 00:02:11,549 which is 1/x times the first term. 47 00:02:11,550 --> 00:02:13,380 So times x. 48 00:02:13,379 --> 00:02:23,280 And so we get dy/dx times 1/y is equal to natural log of x 49 00:02:23,280 --> 00:02:28,140 plus-- this just turns out to be 1-- x divided by x, and 50 00:02:28,139 --> 00:02:30,259 then you multiply both sides of this by y. 51 00:02:30,259 --> 00:02:35,590 You get dy/dx is equal to y times the natural 52 00:02:35,590 --> 00:02:37,610 log of x plus 1. 53 00:02:37,610 --> 00:02:40,360 And if you don't like this y sitting here, you could just 54 00:02:40,360 --> 00:02:41,410 make the substitution. 55 00:02:41,409 --> 00:02:43,620 y is equal to x to the x. 56 00:02:43,620 --> 00:02:47,409 So you could say that the derivative of y with respect to 57 00:02:47,409 --> 00:02:52,889 x is equal to x to the x times the natural log of x plus 1. 58 00:02:52,889 --> 00:02:55,949 And that's a fun problem, and this is often kind of given as 59 00:02:55,949 --> 00:02:59,810 a trick problem, or sometimes even a bonus problem if people 60 00:02:59,810 --> 00:03:02,180 don't know to take the natural log of both sides of that. 61 00:03:02,180 --> 00:03:05,290 But I was given an even more difficult problem, and 62 00:03:05,289 --> 00:03:06,549 that's what we're going to tackle in this. 63 00:03:06,550 --> 00:03:09,270 But it's good to see this problem done first because it 64 00:03:09,270 --> 00:03:11,900 gives us the basic tools. 65 00:03:11,900 --> 00:03:14,349 So the more difficult problem we're going to 66 00:03:14,349 --> 00:03:17,699 deal with is this one. 67 00:03:17,699 --> 00:03:19,609 Let me write it down. 68 00:03:19,610 --> 00:03:26,990 So the problem is y is equal to x to the-- and here's the 69 00:03:26,990 --> 00:03:30,640 twist-- x to the x to the x. 70 00:03:30,639 --> 00:03:33,699 And we want to find out dy/dx. 71 00:03:33,699 --> 00:03:36,310 We want to find out the derivative of y 72 00:03:36,310 --> 00:03:38,629 with respect to x. 73 00:03:38,629 --> 00:03:41,299 So to solve this problem we essentially use the same tools. 74 00:03:41,300 --> 00:03:44,320 We use the natural log to essentially breakdown this 75 00:03:44,319 --> 00:03:47,000 exponent and get it into terms that we can deal with. 76 00:03:47,000 --> 00:03:48,780 So we can use the product rule. 77 00:03:48,780 --> 00:03:51,300 So let's take the natural log of both sides of this equation 78 00:03:51,300 --> 00:03:52,810 like we did last time. 79 00:03:52,810 --> 00:03:58,569 You get the natural log of y is equal to the natural log 80 00:03:58,569 --> 00:04:02,629 of x to the x to the x. 81 00:04:02,629 --> 00:04:05,229 82 00:04:05,229 --> 00:04:06,909 And this is just the exponent on this. 83 00:04:06,909 --> 00:04:12,819 So we can rewrite this as x to the x times the natural log 84 00:04:12,819 --> 00:04:17,259 times the natural log of x. 85 00:04:17,259 --> 00:04:21,199 So now our expression our equation is simplified to the 86 00:04:21,199 --> 00:04:25,769 natural log of y is equal to x to the x times the 87 00:04:25,769 --> 00:04:26,939 natural log of x. 88 00:04:26,939 --> 00:04:29,889 But we still have this nasty x to the x here. 89 00:04:29,889 --> 00:04:33,599 We know no easy way to take the derivative there, although I've 90 00:04:33,600 --> 00:04:36,310 actually just shown you what the derivative of this is, so 91 00:04:36,310 --> 00:04:38,720 we could actually just apply it right now. 92 00:04:38,720 --> 00:04:40,890 I was going to take the natural log again and it would turn 93 00:04:40,889 --> 00:04:45,250 into this big, messy, confusing thing but I realized that 94 00:04:45,250 --> 00:04:47,339 earlier in this video I just solved for what the 95 00:04:47,339 --> 00:04:50,229 derivative of x to the x is. 96 00:04:50,230 --> 00:04:51,660 It's this thing right here. 97 00:04:51,660 --> 00:04:53,390 It's this crazy expression right here. 98 00:04:53,389 --> 00:04:57,889 So we just have to remember that and then apply and 99 00:04:57,889 --> 00:04:59,620 then do our problem. 100 00:04:59,620 --> 00:05:01,350 So let's do our problem. 101 00:05:01,350 --> 00:05:05,480 And if we hadn't solved this ahead of time, it was kind of 102 00:05:05,480 --> 00:05:08,470 an unexpected benefit of doing the simpler version of the 103 00:05:08,470 --> 00:05:12,640 problem, you could just keep taking the natural log of this, 104 00:05:12,639 --> 00:05:13,930 but it'll just get a little bit messier. 105 00:05:13,930 --> 00:05:15,970 But since we already know what the derivative of x to the 106 00:05:15,970 --> 00:05:18,150 x is, let's just apply it. 107 00:05:18,149 --> 00:05:20,539 So we're going to take the derivative of both 108 00:05:20,540 --> 00:05:21,530 sides of the equation. 109 00:05:21,529 --> 00:05:26,059 Derivative of this is equal to the derivative of this. 110 00:05:26,060 --> 00:05:28,160 We'll ignore this for now. 111 00:05:28,160 --> 00:05:31,780 Derivative of this with respect to x is the derivative of 112 00:05:31,779 --> 00:05:34,699 the natural log of y with respect to y. 113 00:05:34,699 --> 00:05:38,159 So that's 1/y times the derivative of y 114 00:05:38,160 --> 00:05:38,965 with respect to x. 115 00:05:38,964 --> 00:05:40,629 That's just the chain rule. 116 00:05:40,629 --> 00:05:43,009 We learned that in implicit differentiation. 117 00:05:43,009 --> 00:05:48,870 And so this is equal to the derivative of the first term 118 00:05:48,870 --> 00:05:51,759 times the second term, and I'm going to write it out here just 119 00:05:51,759 --> 00:05:54,279 because I don't want to skip steps and confuse people. 120 00:05:54,279 --> 00:05:57,614 So this is equal to the derivative with respect to x of 121 00:05:57,615 --> 00:06:03,370 x to the x times the natural log of x plus the derivative 122 00:06:03,370 --> 00:06:05,689 with respect to x of the natural log of 123 00:06:05,689 --> 00:06:11,040 x times x to the x. 124 00:06:11,040 --> 00:06:14,100 So let's focus on the right hand side of this equation. 125 00:06:14,100 --> 00:06:17,980 What is the derivative of x to the x with respect to x? 126 00:06:17,980 --> 00:06:19,920 Well we just solved that problem right here. 127 00:06:19,920 --> 00:06:23,730 It's x to the x natural log of x plus 1. 128 00:06:23,730 --> 00:06:30,040 So this piece right there-- I already forgot what it 129 00:06:30,040 --> 00:06:33,720 was-- it was x to the x natural log of x plus 1. 130 00:06:33,720 --> 00:06:41,130 That is x to the x times the natural log of x plus 1. 131 00:06:41,129 --> 00:06:42,810 And then we're going to multiply that times 132 00:06:42,810 --> 00:06:44,069 the natural log of x. 133 00:06:44,069 --> 00:06:48,050 134 00:06:48,050 --> 00:06:51,560 And then we're going to add that to, plus the derivative 135 00:06:51,560 --> 00:06:54,910 of the natural log of x. 136 00:06:54,910 --> 00:06:59,310 That's fairly straightforward, that's 1/x times x to the x. 137 00:06:59,310 --> 00:07:03,009 138 00:07:03,009 --> 00:07:05,689 And of course the left hand side of the equation 139 00:07:05,689 --> 00:07:10,432 was just 1/y dy/dx. 140 00:07:10,432 --> 00:07:14,740 And we can multiply both sides of this now by y, and we get 141 00:07:14,740 --> 00:07:22,470 dy/dx is equal to y times all of this crazy stuff-- x to the 142 00:07:22,470 --> 00:07:27,840 x times the natural log of x plus 1 times the natural log of 143 00:07:27,839 --> 00:07:34,519 x plus 1/x times x to the x. 144 00:07:34,519 --> 00:07:36,000 That's x to the negative 1. 145 00:07:36,000 --> 00:07:38,889 We could rewrite this as x to the minus 1, and then 146 00:07:38,889 --> 00:07:39,750 you add the exponents. 147 00:07:39,750 --> 00:07:44,649 You could write this as x to the x minus 1 power. 148 00:07:44,649 --> 00:07:48,639 And if we don't like this y here, we can just 149 00:07:48,639 --> 00:07:49,889 substitute it back. 150 00:07:49,889 --> 00:07:53,439 y was equal to this, this crazy thing right there. 151 00:07:53,439 --> 00:07:59,110 So our final answer for this seemingly-- well on one level 152 00:07:59,110 --> 00:08:01,120 looks like a very simple problem, but on another level 153 00:08:01,120 --> 00:08:03,220 when you appreciate what it's saying, it's like oh there's a 154 00:08:03,220 --> 00:08:07,480 very complicated problem-- you get the derivative of y with 155 00:08:07,480 --> 00:08:11,370 respect to x is equal to y, which is this. 156 00:08:11,370 --> 00:08:21,480 So that's x to the x to the x times all of this stuff-- times 157 00:08:21,480 --> 00:08:27,580 x to the x natural log of x plus 1 times the natural log 158 00:08:27,579 --> 00:08:34,079 of x, and then all of that plus x to the x minus 1. 159 00:08:34,080 --> 00:08:34,940 So who would have thought. 160 00:08:34,940 --> 00:08:36,460 Sometimes math is elegant. 161 00:08:36,460 --> 00:08:37,870 You take the derivative of something like this and 162 00:08:37,870 --> 00:08:39,080 you get something neat. 163 00:08:39,080 --> 00:08:42,320 For example, when you take the derivative of natural 164 00:08:42,320 --> 00:08:43,774 log of x you get 1/x. 165 00:08:43,774 --> 00:08:46,340 That's very simple and elegant, and it's nice that math 166 00:08:46,340 --> 00:08:47,030 worked out that way. 167 00:08:47,029 --> 00:08:50,129 But sometimes you do something, you take an operation on 168 00:08:50,129 --> 00:08:52,070 something that looks pretty simple and elegant, and you get 169 00:08:52,070 --> 00:08:55,420 something that's hairy and not that pleasant to look 170 00:08:55,419 --> 00:08:59,799 at, but is a pretty interesting problem. 171 00:08:59,799 --> 00:09:00,079 And there you go. 172 00:09:00,080 --> 00:09:01,524