1 00:00:00,000 --> 00:00:00,000 2 00:00:00,000 --> 00:00:09,340 PROFESSOR: Welcome back to recitation. 3 00:00:09,340 --> 00:00:11,740 In this video I want us to practice using Newton's Method 4 00:00:11,740 --> 00:00:14,540 to find the solution to an equation. 5 00:00:14,540 --> 00:00:17,290 So what we're going to do in particular is we're going to 6 00:00:17,290 --> 00:00:20,200 use Newton's Method to approximate a solution to the 7 00:00:20,200 --> 00:00:23,730 following equation, 2 cosine x equals 3x. 8 00:00:23,730 --> 00:00:25,970 And I'm going to tell you where to start. 9 00:00:25,970 --> 00:00:28,290 We're going to the have our initial value, 10 00:00:28,290 --> 00:00:29,980 x0, be pi over 6. 11 00:00:29,980 --> 00:00:32,150 And I want you to find x2. 12 00:00:32,150 --> 00:00:34,600 So why don't you pause the video, take a little time to 13 00:00:34,600 --> 00:00:37,800 work on that, and then I'll come back and I will show you 14 00:00:37,800 --> 00:00:39,050 how I did it. 15 00:00:39,050 --> 00:00:46,690 16 00:00:46,690 --> 00:00:46,920 OK. 17 00:00:46,920 --> 00:00:47,750 Welcome back. 18 00:00:47,750 --> 00:00:50,290 Again, what we're going to do is use Newton's Method to 19 00:00:50,290 --> 00:00:52,900 approximate a solution to this equation. 20 00:00:52,900 --> 00:00:55,430 And so what I want to point out first is, I want to point 21 00:00:55,430 --> 00:00:58,980 out why pi over 6 is a reasonable first value to 22 00:00:58,980 --> 00:01:02,270 choose, and I want to point out that this, in fact, has 23 00:01:02,270 --> 00:01:03,640 only one solution. 24 00:01:03,640 --> 00:01:07,390 So what I'm going to do to give us a reason for that is 25 00:01:07,390 --> 00:01:10,630 I'm going to draw a rough sketch of two curves and show 26 00:01:10,630 --> 00:01:11,990 where they intersect. 27 00:01:11,990 --> 00:01:15,260 And so I want us to notice that if I were to look at the 28 00:01:15,260 --> 00:01:20,290 two curves, y equals cosine x and y equals 3/2x and I draw 29 00:01:20,290 --> 00:01:24,320 them on the same x, y plane, that where they intersect will 30 00:01:24,320 --> 00:01:26,870 be where I have solutions to this equation. 31 00:01:26,870 --> 00:01:29,410 And that's because I just divide both sides by 2. 32 00:01:29,410 --> 00:01:32,860 Whatever solves this equation solves the equation, cosine x 33 00:01:32,860 --> 00:01:34,300 equals 3/2x. 34 00:01:34,300 --> 00:01:37,050 So let me give you a rough sketch of those two curves and 35 00:01:37,050 --> 00:01:39,290 we'll see what the intersections look like. 36 00:01:39,290 --> 00:01:41,540 So I'm going to do that right down here. 37 00:01:41,540 --> 00:01:42,870 OK. 38 00:01:42,870 --> 00:01:49,210 So let me, let me first draw, make this y equals 1. 39 00:01:49,210 --> 00:01:52,700 Make this y equals minus 1. 40 00:01:52,700 --> 00:01:55,510 And I'm going to draw cosine x first, y equals cosine x first 41 00:01:55,510 --> 00:01:57,550 because I'm most likely to have a hard time with that, 42 00:01:57,550 --> 00:02:00,070 and I'll do my x scale once I'm done. 43 00:02:00,070 --> 00:02:02,930 And so cosine x, y equals cosine x looks 44 00:02:02,930 --> 00:02:04,180 something like this. 45 00:02:04,180 --> 00:02:06,630 46 00:02:06,630 --> 00:02:09,960 Maybe not the most perfect, but again, it's kind of a 47 00:02:09,960 --> 00:02:12,150 rough sketch. 48 00:02:12,150 --> 00:02:14,680 That's pretty good. 49 00:02:14,680 --> 00:02:15,860 Something like this. 50 00:02:15,860 --> 00:02:17,550 So this is y equals cosine x. 51 00:02:17,550 --> 00:02:20,630 52 00:02:20,630 --> 00:02:24,970 And now I want to graph y equals 3x over 2. 53 00:02:24,970 --> 00:02:26,940 And that goes through the point, 0, 0. 54 00:02:26,940 --> 00:02:30,130 It also goes through the point one comma three halves. 55 00:02:30,130 --> 00:02:33,270 Well, this is pi over 2 right here. 56 00:02:33,270 --> 00:02:37,730 So 1 is about here, we'll say. 57 00:02:37,730 --> 00:02:42,740 Because pi over 2 is a little bigger than 1 and 1/2. 58 00:02:42,740 --> 00:02:46,410 So the 1 is about here, 1 and 1/2 is about here. 59 00:02:46,410 --> 00:02:49,480 Or 3/2, if you need to remind yourself. 60 00:02:49,480 --> 00:02:53,658 So the line, y equals 3/2x looks something like this. 61 00:02:53,658 --> 00:02:56,730 62 00:02:56,730 --> 00:03:01,170 So it's fairly straightforward to see that these two curves 63 00:03:01,170 --> 00:03:03,460 intersect at one spot, whenever this spot is. 64 00:03:03,460 --> 00:03:05,350 OK? 65 00:03:05,350 --> 00:03:07,850 And notice, to the left they don't intersect. 66 00:03:07,850 --> 00:03:10,670 So we are just looking for a single solution. 67 00:03:10,670 --> 00:03:12,830 And then the other thing I want to point out is, why is 68 00:03:12,830 --> 00:03:15,680 pi over six potentially a good guess to start with? 69 00:03:15,680 --> 00:03:19,790 Well, the value, this is the x value 1, and this 70 00:03:19,790 --> 00:03:21,040 is the x value 0. 71 00:03:21,040 --> 00:03:24,080 We know for a fact that we have to have this x value line 72 00:03:24,080 --> 00:03:30,430 between 0 and 1 because of where my point is at the time 73 00:03:30,430 --> 00:03:32,490 that x equal 1, I'm all the way up at y 74 00:03:32,490 --> 00:03:34,960 equals 3/2 up here. 75 00:03:34,960 --> 00:03:37,760 So at least we know we're between 0 and 1. 76 00:03:37,760 --> 00:03:40,100 And then from there you could even try some other values 77 00:03:40,100 --> 00:03:43,210 like pi over 3 and pi over 4 and put those in and see how 78 00:03:43,210 --> 00:03:44,770 they compared. 79 00:03:44,770 --> 00:03:46,990 But at least, we'll just say, at least we know x is between 80 00:03:46,990 --> 00:03:49,730 0 and 1, and pi over 6 is certainly in that region. 81 00:03:49,730 --> 00:03:51,760 So that's a good first starting point. 82 00:03:51,760 --> 00:03:53,050 Now I'm going to come over here and 83 00:03:53,050 --> 00:03:54,300 start to do some work. 84 00:03:54,300 --> 00:03:56,540 85 00:03:56,540 --> 00:04:00,640 If we want to solve the equation, 2 cosine x equals 86 00:04:00,640 --> 00:04:03,030 3x, what we're really doing is we're looking 87 00:04:03,030 --> 00:04:04,480 for 0's of this function. 88 00:04:04,480 --> 00:04:10,910 89 00:04:10,910 --> 00:04:13,760 So we find the 0's of this function, which we know 90 00:04:13,760 --> 00:04:14,840 there's only one of them. 91 00:04:14,840 --> 00:04:17,870 We find the 0 of this function, then we actually 92 00:04:17,870 --> 00:04:21,430 have solved 2 cosine x equals 3x. 93 00:04:21,430 --> 00:04:23,500 So hopefully that makes sense to you that we're actually 94 00:04:23,500 --> 00:04:25,860 going to apply Newton's Method to this function. 95 00:04:25,860 --> 00:04:28,060 And so when we apply Newton's Method, we need the function. 96 00:04:28,060 --> 00:04:29,696 We also need to the derivative. 97 00:04:29,696 --> 00:04:32,640 So let me remind you, to derivative of this is going to 98 00:04:32,640 --> 00:04:36,970 be negative 2 sine x minus 3. 99 00:04:36,970 --> 00:04:37,290 Right? 100 00:04:37,290 --> 00:04:39,430 The derivative of cosine x is negative sine x. 101 00:04:39,430 --> 00:04:41,810 And so this is exactly the derivative. 102 00:04:41,810 --> 00:04:45,870 And then let me remind you what Newton's Method says. 103 00:04:45,870 --> 00:04:49,860 It says the next x value is equal to the previous x value 104 00:04:49,860 --> 00:04:52,970 minus the fraction of the function evaluated at the 105 00:04:52,970 --> 00:04:56,160 previous value divided by the derivative evaluated at the 106 00:04:56,160 --> 00:04:56,830 previous value. 107 00:04:56,830 --> 00:04:58,920 Right? 108 00:04:58,920 --> 00:05:01,200 So this is the formula you have for Newton's Method. 109 00:05:01,200 --> 00:05:03,560 So let's see if we can get from x0 to x1 110 00:05:03,560 --> 00:05:05,530 and then x1 to x2. 111 00:05:05,530 --> 00:05:12,490 So in our case, we have x1 equals, well, x0 is pi over 6. 112 00:05:12,490 --> 00:05:15,560 And then we have minus the function evaluated at pi over 113 00:05:15,560 --> 00:05:18,750 6, and then the derivative evaluated at pi over 6. 114 00:05:18,750 --> 00:05:21,570 So the function evaluated at pi over 6-- cosine of pi over 115 00:05:21,570 --> 00:05:23,660 6 is root 3 over 2. 116 00:05:23,660 --> 00:05:25,940 So root 3 over 2 times 2-- we get a root 3. 117 00:05:25,940 --> 00:05:29,170 118 00:05:29,170 --> 00:05:30,570 Separate that out. 119 00:05:30,570 --> 00:05:34,470 And then here, pi over 6 times 3 is pi over 2. 120 00:05:34,470 --> 00:05:38,400 So we get a minus pi over 2. 121 00:05:38,400 --> 00:05:40,630 Sine pi over 6 is 1/2. 122 00:05:40,630 --> 00:05:42,400 So we get negative 2 times 1/2-- 123 00:05:42,400 --> 00:05:48,660 we get negative 1 and then a negative 3. 124 00:05:48,660 --> 00:05:52,770 And if you simplify this, you get that this is approximately 125 00:05:52,770 --> 00:05:56,080 0.564, or around that. 126 00:05:56,080 --> 00:05:57,970 OK? 127 00:05:57,970 --> 00:06:03,320 And now from here, you would then, for x2, you're going to 128 00:06:03,320 --> 00:06:09,600 take 0.564 minus these things evaluated at 0.564. 129 00:06:09,600 --> 00:06:14,400 This ratio, f of 0.564 divided by f prime at 0.564. 130 00:06:14,400 --> 00:06:17,300 But I'm not going to do that because you should get 131 00:06:17,300 --> 00:06:20,020 somewhere around, depending on how many decimal places you 132 00:06:20,020 --> 00:06:24,510 kept, you should get something around one 133 00:06:24,510 --> 00:06:26,220 of these two values. 134 00:06:26,220 --> 00:06:31,130 So you actually get, after x0, by x1, you have something that 135 00:06:31,130 --> 00:06:35,900 is at least fixed to the first two decimal places. 136 00:06:35,900 --> 00:06:39,260 And then this third decimal place, maybe it's going to be 137 00:06:39,260 --> 00:06:40,930 a 4 or a 3 in the end. 138 00:06:40,930 --> 00:06:43,050 But depending on what about you we choose here, we might 139 00:06:43,050 --> 00:06:45,830 get slightly different values here based on the rounding. 140 00:06:45,830 --> 00:06:48,750 So just suffice it to say, I got x1. 141 00:06:48,750 --> 00:06:50,320 Your x2 should be about the same. 142 00:06:50,320 --> 00:06:52,140 It should be one of these two. 143 00:06:52,140 --> 00:06:52,410 OK. 144 00:06:52,410 --> 00:06:54,850 So let me just remind you what we were doing here. 145 00:06:54,850 --> 00:06:57,220 We were trying to use Newton's Method to find a solution to 146 00:06:57,220 --> 00:07:00,270 an equation that I had written up here, this 2 cosine x 147 00:07:00,270 --> 00:07:03,830 equals 3x, and I pointed out a couple things. 148 00:07:03,830 --> 00:07:06,990 I pointed out that finding a solution to this equation is 149 00:07:06,990 --> 00:07:09,780 the same as finding a solution to the equation, cosine x 150 00:07:09,780 --> 00:07:11,640 equals 3/2 x. 151 00:07:11,640 --> 00:07:16,060 And so I did that as a graph to sort of see if I could get 152 00:07:16,060 --> 00:07:20,410 an initial idea of what kind of solution I was looking for. 153 00:07:20,410 --> 00:07:23,590 And then we just started using Newton's Method on a 154 00:07:23,590 --> 00:07:24,580 particular function. 155 00:07:24,580 --> 00:07:27,080 And that function was this side of the 156 00:07:27,080 --> 00:07:28,290 equation minus this side. 157 00:07:28,290 --> 00:07:32,310 Because if 2 cosine x minus 3x equals 0, then 2 158 00:07:32,310 --> 00:07:33,670 cosine x equals 3x. 159 00:07:33,670 --> 00:07:37,970 So we had this function over here, 2 cosine x minus 3x, and 160 00:07:37,970 --> 00:07:40,220 I said I was looking for 0's of that function. 161 00:07:40,220 --> 00:07:42,500 And that's where Newton's Method comes in. 162 00:07:42,500 --> 00:07:45,070 So I think that is where I will stop. 163 00:07:45,070 --> 00:07:45,799