# Single Variable Calculus: Newton's Method

## Newton's Method

Transcript: The following content is provided under a Creative Commons license. Your support will help MIT OpenCourseWare continue to offer high quality educational resources for free. To make a donation or to view additional materials from hundreds of MIT courses, visit MIT OpenCourseWare at ocw.mit.edu.

PROFESSOR: Today we're going to keep on going with related rates. And you may recall that last time we were in the middle of a problem with this geometry. There was a right triangle. There was a road. Which was going this way, from right to left. And the police were up here, monitoring the situation. 30 feet from the road. And you're here. And you're heading this way. Maybe it's a two lane highway, but anyway it's only going this direction. And this distance was 50 feet. So, because you're moving, this distance is varying and so we gave it a letter. And, similarly, your distance to the foot of the perpendicular with the road is also varying. At this instant it's 40, because this is a 3, 4, 5 right triangle. So this was the situation that we were in last time. And we're going to pick up where we left off.

The question is, are you speeding if the rate of change of D with respect to t is 80 feet per second. Now, technically that would be - 80, because you're going towards the policemen. Alright, so D is shrinking at a rate of - 80 feet per second. And I remind you that 95 feet per second is approximately the speed limit. Which is 65 miles per hour. So, again, this is where we were last time. And, got a little question mark there. And so let's solve this problem.

So, this is the setup. There's a right triangle. So there's a relationship between these lengths. And the relationship is that x ^2 + 30 ^2 = D ^2. So that's the first relationship that we have. And the second relationship that we have, we've already written down. Which is dx / dt - oops, sorry. dD / dt = minus 80. Now, the idea here is relatively straightforward. We just want to use differentiation. Now, you could solve for x. Alright, x is the square root of D^2 - 30 squared. That's one possibility. But this is basically a waste of time. It's a waste of your time. So it's easier, or easiest, to follow this method of implicit differentiation, which I want to encourage you to get used to. Namely, we just differentiate this equation with respect to time. Now, when you do that, you have to remember that you are not allowed to plug in a constant. Namely 40, for t. You have to keep in mind what's really going on in this problem which is that x is moving, it's changing. And D is also changing. So you have to differentiate first before you plug in the values.

So the easiest thing is to use, in this case, implicit differentiation. And if I do that, I get 2x dx / dt is equal to 2D (dD / dt). No more DDT left. We hope. Except in this blackboard. So there's our situation. Now, if I just plug in, now I can plug in. In values. so this is after taking the derivative. And, indeed, we have here 2 times the value for x which is 40 at this instant. And then we have dx / dt. And that's equal to 2 (D), which is 50. And then dD / dt is - 80. So the 80's cancel and we see that dv / dt = - 100 feet per second. And so the answer to the question is yes. Although you probably wouldn't be pulled over for this much of a violation. So that's, right, it's more than 65 miles an hour, by a little bit. So that's the end of this question. And usually in these rate of change or related rates questions, this is considered to be the answer to the question, if you like.

So that's one example. I'm going to give one more example before we go on to some other applications implicit differentiation. So my second example is going to be, you have a it is a conical tank. With top of radius 4 feet, let's say. And depth 10 feet. So that's our situation. And then it's being filled with water. So, is being filled with water. At 2 cubic feet per minute. So there is our situation. And then the question is, how fast is the water rising when it is at depth 5 feet? So if this thing is half-full in the sense, well not half-full in terms of total volume. But half-full in terms of height, what's the speed at which the water is rising.

So, how do we set up problems like this? Well, we talked about this last time. The first step is to set up a diagram and variables. And I'm just going to draw the picture. And I'm actually going to draw the picture twice. So here's the conical tank. And we have this radius, which is 4. And we have this height, which is 10. So that's just to allow me to think about this problem. Now, it turns out because we have a varying depth and so on, and this is just the top. That I'd better depict also the level at which the water actually is at present. And furthermore, it's better to do this schematically, as you'll see.

So the key point here is to draw this triangle here. Which shows me the 10 and shows me the 4, over here. And then imagine that I'm filling it partway. So maybe we'll put that water level in in another color here. So here's the water level. And the water level, I'm going to depict that horizontal distance here, as r. That's going to be my variable. That's the radius of the top of the water. So I'm taking a cross-section of this, because that geometrically the only thing I have to keep track of. At least initially.

So this is our water level. And it's really rotated around. But I'm depicting just this one half-slice of the picture. And then similarly, I have the height. Which is this dimension there. Or, if you like, the depth of the water. So the water has filled us up, up to this point here. So I set it up this way so that it's clear that we have two triangles here. And that one piece of information we can get from the geometry is the similar triangles information. Namely, that r / h = 4 / 10. So this is by far the most typical geometric fact that you'll have to glean from a picture. So that's one piece of information that we get from this picture.

Now, the second thing we have to do is set up formulas for the volume of water, and then figure out what's going on here. So the volume of water is, of a cone. So again, you have to know something about geometry to do many of these problems. So you have to know that the volume of a cone is 1/3 base times height. Now, this one is upside down. The base is on the top and it's going down but it works the same way. That doesn't affect volume. So it's 1/3 and the base is pi r^2, that's the base. And times h, which is the height. So this is the setup for this problem. And now, having our relationship, we have one relationship left that we have to remember. Because we have one more piece of information in this problem. Namely, how fast the volume is changing. It's going at 2 cubic feet per minute. It's increasing, so that means that dv / dt = 2. So I've now gotten rid of all the words and I have only formulas left. I started here with the words, I drew some pictures, and I derived some formulas. Actually, there's one thing missing. What's missing? Yeah.

STUDENT: [INAUDIBLE]

PROFESSOR: Exactly. What you want to find. What I left out is the question. So the question is, what is dh / dt when h = 5? So that's the question here. Now, we've got the whole problem and we never have to look at it again if you like. We just have to pay attention to this piece here. So let's carry it out. So what happens here. So look, you could do this by implicit differentiation. But it's so easy to express r as a function of h that that seems kind of foolish.

So let's write r as 2/5 h. That's coming from this first equation here. And then let's substitute that in. That means that v = 1/3 pi ( 2/5 h^2) h. And now I have to differentiate that. So now I will use implicit differentiation. It's very foolish at this point to take cube roots to solve for h. You just get yourself into a bunch of junk.

So there is a stage at which we're still using implicit differentiation here. I'm not going to try to solve for h as a function of v. Instead I'm just differentiating straight out from this formula, which is relatively easy to differentiate. So this is dv / dt, which of course = 2 and if I differentiate it I just get this constant, pi / 3, this other constant, (2/5)^2. And then I have to differentiate h^3. (h^2)h. So that's 3h^2 ( dh / dt). That's the chain rule.

So now let's plug in all of our numbers. Again, the other theme is, you don't plug in numbers, fixed numbers, until everything has stopped moving. At this point, we've already calculated our rates of change. So now I can put in the numbers. So, 2 = pi 3 ( 2/5)^2( 3), and then h was 5, so this is 5^2. And then I have dh / dt. There's only one unknown thing left in this problem, which is dh / dt. Everything else is a number. And if you do all the cancellations, you see that this cancels this. One of the 2's cancels - well, this cancels this. And then one of the 2's cancels that. So all-told what we have here is that dh / dt = 1 / 2 pi. And so that happens to be feet per second. This is the whole story. Questions, way back there.

STUDENT: [INAUDIBLE]

PROFESSOR: Where did I get -- the question is where did I get r = 2/5 h from. The answer was, it came from similar triangles, which is over here. I did this similar triangle thing. And I got this relationship here. r / h = 4/10, but then I canceled it, got 2/5 and brought the h over. Another question, over here.

STUDENT: [INAUDIBLE]

PROFESSOR: The question was the following. Suppose you're at this stage, can you write from here dv / dh. So, suppose you're here. And work out what this is. It's going to end up being some constant times h^2. And then also use dv / dt = dv / dh ( dh / dt). Which the chain rule. And the answer is yes. We can do that, and indeed that is what my next sentence is. That's exactly what I'm saying. So when I said this - sorry, when you said this, I did that. That's exactly what I did. This chunk is exactly dv / dh. That's just what I'm doing. OK. So, definitely, that's what I had in mind. Yeah, another question.

STUDENT: [INAUDIBLE]

PROFESSOR: You're asking me whether my arithmetic is right or not?

STUDENT: [INAUDIBLE]

PROFESSOR: Pi - per second. Oh. This should - no, OK, right. I guess it's per minute. Since the other one is per minute. Thank you. Yes. Was there another question? Probably also fixing my seconds to minutes. Way back there.

STUDENT: I don't understand, why did you have to do all that. Isn't the speed 2 cubic feet per minute?

PROFESSOR: The speed at which you're filling it is 2 cubic feet, but the water level is rising at a different rate, depending on whether you're low down or high up. It depends on how wide the pond, the surface, is. So in fact it's not. In fact, the answer wasn't 2 cubic - it wasn't. There's a rate there. That is, that's how much volume is being added. But then there's another number that we're keeping track of, which is the height. Or, if you like, the depth of the water. OK. So this is the whole point about related rates. Is you have one variable, which is v, which is volume of something. You have another variable, which is h, which is the height of the cone of water there. And you're keeping track of one variable in terms of the other. And the relationship will always be a chain rule type of relationship.

So, therefore, you'll be able to - if you know one you'll be able to figure out the other. Provided you get all of the related rates. These are what are called related rates. This is a rate of something with respect to something, etc. etc. So it's really all about the chain rule. And just fitting it to word problems. So there's a couple of examples. And I'll let you work out some more.

So now, the next thing that I want to do is to give you one more max-min problem. Which has to do with this device, which I brought with me. So this is a ring. Happens to be a napkin ring, and this is some parachute string, which I use when I go backpacking. And the question is if you have a - you think of this is a weight, it's flexible. It's allowed to move along here. And the question is, if I fix these two ends where my two hands are, where my right hand is here and where my left hand is over there.

And the question is, where does this ring settle down. Now, it's obvious, or should be maybe obvious, is that if my two hands are at equal heights, it should settle in the middle. The question that we're trying to resolve is what if one hand is a little higher than the other. What happens, or if the other way. Where does it settle down?

So in order to depict this problem properly, I need two volunteers to help me out. Can I have some help? OK. So I need one of you to hold the right side, and one of you to hold the left side. OK. And just hold it against the blackboard. We're going to trace. So stick it about here, in the middle somewhere. And now we want to make sure that this one is a little higher, alright? So we'll have to - yeah, let's get a little higher up. That's probably good enough.

So the experiment has been done. We now see where this thing is. But, so now hold on tight. This thing stretches. So we want to get it stretched so that we can see what it is properly. So this thing isn't heavy enough for this demonstration. I should've had a ten-ton brick attached there. But if I did that, than I would tax my, right, I would tax your abilities to. Right, so we're going to try to trace out what the possibilities are here.

So this is, roughly speaking, where this thing - and so now where does it settle. Well, it settles about here. So we're going to put that as x marks the spot. OK, thank you very much. Got to remember where those dots -- OK, all right. Sorry, I forgot to mark the spots.

OK, so here's the situation. We have a problem. And we've hung a string. And it went down like this and then it went like that. And we discovered where it settled. Physically. So we want to explain this mathematically, and see what's going on with this problem. So this is a real-life problem. It honestly is the problem you have to solve if you want to build a bridge. Like, a suspension bridge. This, among many problems. It's a very serious and important problem. And this is the simplest one of this type. So we've got our shape here. This should be a straight line, maybe not quite as angled as that.

The first, we've already drawn the diagram and we've more or less visualized what's going on here. But the first step after the diagram is to give letters. Is to label things appropriately. And I do not expect you to be able to do this, at this stage. Because it requires a lot of experience. But I'm going to do it for you. We're going to just do that. So the simplest thing to do is to use the coordinates of the plane. And if you do that, it's also easiest to use the origin. My favorite number is and it should be yours, too. So we're going to make this point be (0, 0). Now, there's another fixed point in this problem. And it's this point over here. And we don't know what its coordinates are. So we're just going to give them letters, a and b. But those letters are going to be fixed numbers in this problem. And we want to solve it for all possible a's and b's. Now, the interesting thing, remember, is what happens when b Is not 0. If b = 0, we already have a clue that the point should be the center point. It should be exactly that x, the middle point, which I'm going to label in a second, is halfway in between.

So now the variable point that I'm going to use is down here. I'm going to call this point (x, y). So here's my setup. I've now given labels to all the things on the diagram so far. Most of the things on the diagram. So now, what else do I have to do? Well, I have to explain to you that this is a minimization problem. What happens, actually, physically is that the weight settles to the lowest point. That's the thing that has the lowest potential energy. So we're minimizing a function. And it's this curve here. The constraint is that we're restricted to this curve. So this is a constraint curve. And we want the lowest point of this curve. So now, we need a little bit more language in order to describe what it is that we've got. And the constraint curve, we got it in a particular way. Namely, we strung some string from here to there. And what happens at all these points is that the total length of the string is the same. So one way of expressing the constraint is that the length of the string is constant. And so in order to figure out what the constraint is, what this curve is, I have to describe that analytically. And I'm going to do that by drawing in some helping lines. Namely, some right triangles to figure out what this length is. And what the other length is.

So this length is pretty easy if I draw a right triangle here. Because we go over x and we go down y. So this length is the square root of x^2 + y^2. That's the Pythagorean theorem. Similarly, over here, I'm going to get another length. Which is a little bit of a mess. It's the vertical. So I'm just going to label one half of it, so that you see. So this horizontal distance is x. And this horizontal distance from this top point with this right angle, over there. It starts at x and ends at a. The right-most point is a in the x coordinate. So the whole distance is a - x. So that's this leg of this right triangle. And, similarly, the vertical distance will be b - y. And so, the formula here, which is a little complicated for this length, is the square root of (a - x)^2 + (b - y)^2. So here are the two formulas that are going to allow me to set up my problem now. So, my goal is to set it up the way I did here, just with formulas. And not with diagrams and not with names.

So here's what I'd like to do. I claim that what's constrained, if I'm along that curve, is that the total length is constant. So that's this statement here. The square root of x^2 + y^2 + this other square root. These are the two lengths of string. Is equal to some number, L, which is constant. And this, as I said, is what I'm calling my constraint. Yeah.

STUDENT: [INAUDIBLE]

PROFESSOR: So the question is, shouldn't it be b plus y. No, and the reason is that y is a negative number. It's below 0. So it's actually the sum, - y is a positive number. Alright, so here's the formula. And then, we want to find the minimum of something. So what is it that we're finding the minimum of? This is actually the hardest part of the problem, conceptually. I tried to prepare it, but it's very hard to figure this out. We're finding the least what? It's y. We got a name for that. So we want to find the lowest y. Now, the reason why it seems a little weird is you might think of y as just being a variable. But really, y is a function. It's really y = y ( x ) is defined implicitly by the constraint equation. That's what that curve is. And notice the bottom point is exactly the place where the tangent line will be horizontal. Which is just what we want. So from the diagram, the bottom point is where y' = 0. So this is the critical point. Yeah?

STUDENT: [INAUDIBLE]

PROFESSOR: Exactly. So I'm deriving for you, so the question is, could I have just tried to find y' = to begin with. The answer is yes, absolutely. And in fact I'm leading in that direction. I'm just showing you, so I'm trying to make the following, very subtle, point. Which is in maximum-minimum problems, we always have to keep track of two things. Often the interesting point is the critical point. And that indeed turns out to be the case here. But we always have to check the ends. And so there are several ways of checking the ends. One is, we did this physical problem. We can see that it's coming up here. We can see that it's coming up here. Therefore the bottom must be at this critical point. So that's OK, so that's one way of checking it. Another way of checking it is the reasoning that I just gave. But it's really the same reasoning. I'm pointing to this thing and I'm showing you that the bottom is somewhere in the middle. So, therefore, it is a place of horizontal tangency. That's the reasoning that I'm using.

So, again, this is to avoid having to evaluate a limit of an end or to use the second derivative test, which is a total catastrophe in this case. OK, now. There's one other thing that you might know about this if you've seen this geometric construction before. With a string and chalk. Which is that this curve is an eclipse. It turns out, this is a piece of an eclipse. It's a huge ellipse. These two points turn out to be the so-called foci of the ellipse. However, that geometric fact is totally useless for solving this problem. Completely useless. If you actually write out the formulas for the ellipse, you'll discover that you have a much harder problem on your hands. And it will take you twice or ten times as long, so, it's true that it's an ellipse, but it doesn't help.

OK, so what we're going to do instead is much simpler. We're going to leave this expression along and we're just going to differentiate implicitly. So again, we use implicit differentiation on the constraint equation. So that's the equation which is directly above me there, at the top. And I have to differentiate it with respect to x. So that's a little ugly, but we've done this a few times before. When you differentiate a square root, the square root goes into the denominator. And there's a factor of 1/2, so there's a 2x which cancels. So I claim it's this. Now, because y depends on x, there's also a y y' here. So technically speaking, it's twice this with a half. 2 / 2 times that. So that's the differentiation of the first piece of this guy.

Now I'm going to do this second one, and it's also the chain rule. But you're just going to have to let me do it for you. Because it's just a little bit too long for you to pay attention to. It turns out there's a minus sign that comes out, because there's a - x and a - y there. And then the numerator, the denominator is the same massive square root. So it's (a - x)^2 ( b - y)^2. And the numerator is a - x, which is what replaces the x over here. And then another term, which is (b - y)y'. I claim that that's analogous to what I did in the first term. And you'll just have to check this on your own. Because I did it too fast for you to be able to check yourself.

Now, that's going to be equal to what on the right-hand side. What's the derivative of L with respect to x? It's 0. It's not changing in the problem. Although my parachute stuff stretches. We tried to stretch it to its fullest extent. So that we kept it fixed, that was the goal here. So now, this looks like a total mess. But, it's not. And let me show you why. It simplifies a great deal. And let me show you exactly how. So, first of all, the whole point is we're looking for the place where y' = 0. So that means that these terms go away. y' = 0. So they're gone. And now what we have is the following equation. It's x / square root of x^2 + y^2 squared is equal to, if I put it on the other side the minus sign is changed to a plus sign. a - x divided by this other massive object, (a - x)^2 + (b - y)^2. So this is what it's simplifies to. Now again, that also might look complicated to you. But I claim that this is something, this is a kind of equilibrium equation that can be interpreted geometrically, in a way that is very meaningful and important.

So first of all, let me observe for you that this x is something on our picture. And the square root of x^2 + y^2 is something on our picture. Namely, if I go over to the picture, here was x and this was a right triangle. And this hypotenuse was square root of x^2 + y^2. So, if I call this angle alpha, then this is the sine of alpha. Right? It's a right triangle, that's the opposite leg. So this guy is the sine of alpha. Similarly, the other side has an interpretation for the other right triangle. If this angle is beta, then the opposite side is a - x, and the hypotenuse is what was in the denominator over there. So this side is sine of beta. And so what this condition is telling us is that alpha = beta. Which is the hidden symmetry in the problem. I don't know if you can actually see it when I show you this thing. But, no matter how I tilt it, actually the two angles from the horizontal are the same. In the middle it's kind of obvious that that should be the case. But on the sides it's not obvious that that's what's happening.

Now, this has even, so that's a symmetry, if you like, of the situation. These two angles are equal. But there's something more to be said. If you do a forced diagram for this, what you'll discover is that the tension on the two lines is the same. Which means that when you build something which is hanging like this, it will involve the least stress. If you hang something very heavy, and one side carries twice as much load as the other, then you have twice as much chance of its falling and breaking. If they each hold the same strength, then you've distributed the load in a much more balanced way. So this is a kind of a balance condition, and it's very typical of minimization problems. And fortunately, there are nice solutions which distribute the weight reasonably well. That's certainly the principal of suspension bridges. So yeah, one more question.

STUDENT: [INAUDIBLE]

PROFESSOR: OK, so the question where it hangs, that is, what the formula for x is and what the formula for y is. And other things, like the equation for the ellipse and lots of other stuff like that. Those are things that I will answer for you in a set of notes which I will hand out. And they're just a mess. You see they're, just as in that other problem that we did last time, there's some illuminating things you can say about the problem and then there's some messy formulas. You know, you want to try to pick out the simple things that you can say. In fact, that's a property of math, you want to focus on the more comprehensible things. On the other hand, it can be done. It just takes a little bit of computation. So I didn't answer the question of what the lowest y was. But I'll do that for you.

Maybe I'll just mention one more thing about this problem. I'm using problems from a completely different point of view. If you sort of roll the ellipse around, you get the same phenomenon from each place here. So it doesn't matter where a and are. You'll get the same phenomenon. That is, the tangent line. So, this angle and that angle will be equal. So you can also read that as being the angle over here and the angle over here are equal. That is, beta, that is the complementary angles are also equal. And if you interpret this as a ray of light, and this as a mirror, then this would be saying that if you start at one focus, every ray of light will bounce and go to the other focus. So that's a property that an ellipse has. More precisely, a property that this kind of curve has.

And in fact, a few years ago there was this great piece of art at something called the DeCordova Museum, which I recommended very highly to you go sometime to visit in your four years here. There was a collection of miniature golf holes. So they had a bunch of mini golf pieces of art. And every one was completely different from the other. And one of them was called hole in one. And the tee was at one focus of the ellipse. And the hole was at the other focus of the ellipse. So, no matter how you hit the golf ball, it always goes into the hole. No matter where it bounces, it just, one bounce and it's in the hole. So that's actually a consequence of the computation that we just did.

Time to go on. We're going to now talk about something else. So our next topic is Newton's method. Which is one of the greatest applications of calculus. And I'm going to describe it here for you. And we'll illustrate it on an example, which is solving the equation x^2 = 5. We're going to find the square root of 5. Now, you can actually solve any equation this way. Any equation that you understand, you can solve this way, essentially. So even though I'm doing it for the square root of 5, which is something that you can figure out on your calculator, in fact this is really at the heart of many of the ways in which calculators work. So, the first thing is to make this problem a little bit more abstract. We're going to set f ( x ) = x^2 - 5. And then we're going to solve f (x) = 0. So this is the sort of standard form for solving such a. So you take some either complicated or simple function of x, linear functions are boring, quadratic functions are already interesting. And cubic functions, as I've said a few times, you don't even have formulas for solving. So this would be the only method you have for solving them numerically. So here's how it works.

So the idea, I'll plot this function. Here's the function, it's a parabola, y = x^2 - 5. It dips below 0, sorry, it should be centered, but anyway. And now the idea here is to start with a guess. And square root of 5 is pretty close to the square root of 4, which is 2. So my first guess is going to be 2, here. So start with initial guess. So that's our first guess. And now, what we're going to do is we're going to pretend that the function is linear. That's all we're going to do. And then if the function were linear, we're going to try to find where the is. So if the function is linear, what we'll use is we'll plot the point where 2 is on, that is, the point (2, f ( 2 )), and then we're going to draw the tangent line here. And this is going to be our new guess. x = x, which I'll call x1.

So the idea here is that this point may be somewhat far from where it crosses, but this point will be a little closer. And now we're going to do this over and over again. And see how fast it gets to the place we're aiming for. So we have to work out what the formulas are. And that's the strategy. So now, the first step here is, we have our guess, we have our tangent line. Which has the formula y - y0 = m(x - x0). So that's the general form for a tangent line. And now, I have to tell you what x1 is. In terms of this tangent line. x1 is the x intercept. The tangent line, if you look over here at the diagram, the tangent line is the orange line. Where that crosses the axis, that's where I want to put x1. So that's the x intercept. Now, how do you find the x intercept? You find it by setting y = 0. That horizontal line is y = 0. So I set y = 0, and I get - y0 = m (x1 - x0). So I changed two things in this equation. I plugged in here, for y. And I said that the place where that happens is going to be where x is x1.

So now let's solve. And what we get here is - y divided by - sorry, -y0 / m = x1 - x0. And now I can get a formula for x1. So x1 = x0 - (y0 / m). I now need to tell you what this formula means, in terms of the function f. So first of all, x0 is x0, whatever x0 is. And y0, I claim, is f (x0). And m is the slope at that same place. So it's f' (x0). And this is the whole story. This is the formula which will enable us to calculate basically any root.

I'm going to repeat this formula, so I'm going to tell you again what Newton's method is, and put a little more colorful box around it. So Newton's method involves the following formula. In order to get the n + 1st point, that's our better and better guess, I'm going to take the nth one and then I'm going to plug in this formula. So f ( xn ) / f' ( xn ). So this is the basic formula, and if you like, this is the idea of just repeating what I had before. Now, we've gone from geometry, from just pictures, to an honest to goodness formula which is completely implementable and very easy to implement in any case. So let's see how it works in the case that we've got.

Which is x0 = 2. f(x) = x^2 - 5. Let's see how to implement this formula. So first of all, I have to calculate for you, f' (x). That's 2x. And so, x1 = x0 -, so f' , sorry, f ( x ) would be x0^2 - 5. That's what's in the numerator. And in the denominator I have the derivative, so that's 2 x0. And so all told, well, let's work it out in two steps here. This is - 1/2 x0 for the first term, and then + (5/2 / x0) for the second term. And these two terms combine, so we have here 1/2 x0 + 5/2 with an x0 in the denominator. So here's the formula for x1. in this case.

Now I'd like to show you how well this works. So first of all, we have x1 = 1/2 ( 2), if I plug in x1, + 5/4, which is 9/4. And x2, I have 1/2 ( 9/4) + 5/2 ( 4/9). That's the next one. And if you work this out, it's 161/72. And then x3 is kind of long. But I will just write down what it is, so that you can see it's 1/2 ( 161/72) + 5/2 and then I do the reciprocal of that. So 72/161. So let's see how good these are. I carefully calculated how far off they are. Somewhere on my notes. So I'll just take a look and see what I said. Oh yeah, I did do it. So, what's the square root of 5 minus - so here's n, here's the square root of 5 - xn, if you like. Or the other way around. The size of this. You'll have to decide on your homework whether it comes out positive or negative, to the right or to the left of the answer. But let's do this.

So when n = 0, the guess was 2. And we're off by about 2 ( 10 ^ - 1). And if n = 1, so that's this 9/4, that's off by about 10 ^ - 2. And then n = 2, that's this number here, right? And that's off by about 4 ( 10 ^ - 5). That's already as good an approximation to the square root of 5 as you'll ever need in your life. If you do 3, this number here turns out to be accurate to 10 ^ - 10 or so. This goes right off to the edge of my calculator, this one here. So already, with the third iterate. you're of way past the accuracy that you need for most things. Yep, question.

STUDENT: [INAUDIBLE]

PROFESSOR: How come the x0 disappears?

STUDENT: [INAUDIBLE]

PROFESSOR: So, from here to here [INAUDIBLE]

STUDENT: [INAUDIBLE]

PROFESSOR: Hang on, folks, we have a question. Let's just answer it. So here we have an x0, and here we have - 1/2, there's an x0^2 and an x which cancel. And here we have a minus, and a - 5/2 x0. So I combine the 1 - 1/2, I got + 1/2, that's all. OK? Alright, thanks. We'll have to ask other questions after class.