Transcript
The following content is provided under a Creative Common license. Your support will help MIT Open Courseware continue to offer highquality educational resources for free. To make a donation or to view additional materials from hundreds of MIT courses, visit MIT Open Courseware at ocw.mmit.edu. 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 uh of a problem with this geometry. There was a right triangle. There was a road which is going this way from right to left and the police were up here monitoring the situation 30 ft from the road and you're here and you're heading this way.
It's a uh maybe it's a two-lane highway, but anyway, it's only going this direction. And this distance was 50 feet. So uh 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 345 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 f feet per second. Now technically that would be minus 80 because you're coming you're going towards the the policeman.
All right. So d is shrinking at a rate of minus 80 feet per second. And I remind you that 95 ft per second is approximately the speed limit, which is 65 miles hour. So again, this is where we were last time. And put a little question mark there. And so let's uh solve this quest, this problem. All right. 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 is equal to d^2. So that's the the first relationship that we have. And the second relationship that we have we've already written down which is dxdt oops sorry ddt is equal to minus 80.
All right. Now, the idea here is relatively straightforward. We just want to use uh differentiation. Now, you could you could solve for x. All right, x is the square root of d ^2us 30^2. All right, that's one possibility. But this is this is basically a waste of time. it's a waste of your time. So, 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 is changing and d is also changing.
So you can't 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 dxdt is equal to 2d dt. No more ddt left, we hope, but except in this blackboard. All right. So there's our situation. Now if I just plug in now I can plug 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 dxdt and that's equal to 2 * d which is 50 and then dddt is minus 80. All right, so the 80s cancel and we see that dxdt is equal to minus 100 ft 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. All right, so that's right. It's more than than 65 miles an hour by a little bit. Okay, 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. All right, so that's one example. I'm going to give one more example before we go on to some other uh applications of uh of uh implicit differentiation. So my second example is going to be you have a uh is a a conicle tank. Okay. With top of radius 4 feet, let's say, and depth 10t.
Okay. So that's our situation. And then um it's being filled with water. So is being filled with water at 2 cubic feet per minute. All right. So there's our our situation. And then the question is um how fast is the water rising when it is at depth um five feet. So if this thing is half full in the sense well not not half full in terms of total volume but half full in terms of height uh what's the um what's the speed at which the water is rising? Okay. So how do we set up problems like this? Well we talked about this last time. The first step is 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 conicle tank. And we have this radius which is four 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 a varying depth and so on and and and this is just the top that I 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 four over here. And then imagine that I'm filling it part way.
So we'll maybe we'll put that water level in in another color here. So here's the 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's geometrically the only thing I have to keep track of uh at least initially. All right. So this is this is a water level and it's really uh uh uh rotated around but I'm depicting just this one half slice of the of the picture. And then similarly I have the height which is this uh dimension there that that 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 is equal to 4 / 10. Okay. So, this is by far the most uh typical geometric fact that you'll have to glean from a picture. Okay. So, that's that's one 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 the and it's going down, but it's works the same way. That doesn't affect volume. So it's 1/3 and the base is pi r. That's the base. and times h which is which is the height. All right. So this is the setup for this problem. And now having our relationship we have one 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 DVDT is two. All right. So I've now gotten rid of all the words and I have only formulas left. All right. I started here with the words. I drew some pictures and I dived some formulas. Actually, there's one thing missing. What What's missing? Yeah. find uh the exact exactly what you want to find what I left out is the question. So the question is what is dh dt when h is equal to 5. All right so that's that's the question here. All right. 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 the uh to to to this piece here.
All right. 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 like write R is twoths H. All right, that's coming from this first equation here. And then let's substitute that in. That means that v is equal to a3 pi * 2 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 and 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 of V. Instead, I'm just differentiating straight out from this formula, which is relatively easy to differentiate. So this is dvdt, which of course is 2 is equal to, and if I differentiate it, I just get this constant pi over 3, this other constant 2s^ squared, and then I have to differentiate h cubed, right? h^2 * h. So that's 3 h^2 * dhdt. All right, that's the chain rule. All right, so now let's plug in all of our numbers. Again, the other theme is you don't plug in numbers uh uh 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 is equal to<unk> over 3 * 2s^ 2 * 3 and then h was five. So this is 5^ squared and then I have dhdt. There's only one unknown thing left in this problem which is dhdt. Everything else is a number. And if you do all the cancellations you see that this cancels this. One of the twos cancels well this cancels this and then one of the twos cancels that. So all told what we have here is that um dh dt is equal to 1 over 2 pi. All right. And so that happens to be feet per second. And this is the the whole story. All right. Question way back there. Where did you get that R= H from?
Uh where did I get the question is where did I get R= 25th 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 is equal to 410 but then I cancelled the got two fifths. So so and brought the H over. Uh another question over here. volume. The question was the following. Suppose you're at this stage. Can you write from here DVDH? So suppose you're here and work out what this is, which is it's going to end up to being some constant times time h and then also use dvdt is equal to dvdh* dhdt which is the chain rule.
Okay. 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, so 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. Okay. So definitely that's that's what I what I had in mind. Yeah. Another question. Uh, you're asking me whether my arithmetic is right or not. What? Pi per second. Oh, this should No. Okay. Right. I guess it's per minute since the other one is per minute. Thank you. Yes. There. Was there another question? probably also fixing my seconds to minutes here way back.
Um I don't understand why did you have to do all that? Isn't the speed 2 cubic feet per minute? Uh 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 the surface is. So in fact, it's not. In fact, the answer wasn't two cubic feet. it wasn't that there is 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 okay 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 ship.
So therefore you'll be able 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 uh to uh word problems. All right. So there's uh a couple of examples and uh I'll let you work out some more. All right. So now the next thing that I want to do is to give you one more max min problem which is has to do with this uh device which I brought with me. So this is a ring happens to be a napkin ring.
And this is some parachute string I use when I go backpacking. And the question is if you have a you think of this as a weight, it's 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 then 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. All right. The question that we're trying to resolve is what if one hand is a little higher than the other. All right.
what happens or of the other way. Where does it settle down? All right. So, in order to depict this problem appropriately, I need two volunteers to help me out. Can I have some help? Okay. So, I need one of you to hold the right side and one of you to hold the left side. Okay? And uh just just hold against the blackboard. We're going to trace. So, stick it about here. Okay? In the middle somewhere. All right. And now we want to make sure that this one is a little higher. All right. So I'll have to Yeah, let's get it a little higher up. All right, that's probably good enough. All right, so the experiment has been done.
We now see where this thing is, but uh so now hold on tight. This thing stretches. So we want to get it stretched so that we can see what it is properly when it's when there's So this thing isn't heavy enough for this demonstration. I should have had a 10 ton brick attached there. But if I did that, then I would tax my uh right, I would tax your abilities to All right. So, we're going to we're going to try to trace out what the possibilities are here. All right. So, this is roughly speaking where this thing and so now where does it settle? Well, it settles it settles about here. All right. So, we're gonna put that as X marks the spot.
Okay. Thank you very much. Oh, oh, oh, oh. Gotta got to remember where where those dots were. Okay. All right. Okay. Sorry, I forgot to mark the spots. Okay. So, here's the situation. We have a problem and we we've hung a string, right? And it went down like this and then it went like that. All right. and we discovered where it's 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. All right. So we've got our our our shape here. This should be a straight line. Maybe not quite as angled as that. All right. So now 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 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. All right? 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 zero. And it should be yours, too. So we're going to make this point be 0 0. All right. 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. that those letters are going to be fixed numbers in this problem. All right? 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 zero. If B is equal to zero, 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, comma Y. All right. So here's my setup. I've now given labels to all the things on the diagram so far or most of the things on the diagram. All right. So now what 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 uh uh uh language in order to describe what it is that we've got and the constraint curve we accomp 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. All right. So, one way of expressing the constraint is that the length of this 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 roo<unk> of x^2 + y^2. All right, 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 it's the vertical. So let me just 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.
All right the the rightmost point is a in the x coordinate. So the whole distance is a minus x. All right. So that's that's this leg of this right triangle. And similarly the vertical distance will be b minus 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. All right. So here are the 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 just with formulas and not with diagrams and not with names. Okay. So here's here's what I'd like to do. I claim that what's 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 plus 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. Uh so the question is shouldn't it be B plus Y? Uh uh no. Uh and the reason is that Y is a negative number. It's below zero. So it's actually the sum minus y is is a positive number. All right. So here's 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've tried to prepare it, but it's very hard to figure this out. We're finding the least what? It's y. We just 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 ofx is defined implicitly by the by the by the constraint equation. All right, 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 we from the diagram bottom point is where y prime is equal to zero.
So this is the critical point. Yeah. Remark that the slope is horizontal there. You can still have uh differentiated that huge thing y prime z exactly so I'm deriving for you so the the the question is could I have just tried to find y prime equals 0 to begin with the answer is yes absolutely and in fact I'm leading in that direction I'm just showing you uh so so I'm trying to make the following very subtle point which is when 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 this the bottom must be at this at this critical point. So that's okay. So that's one way of checking it. Another way of checking it is the is the 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 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.
All right. Okay. Now, there's one other thing that you might know about this if you've seen this geometric construction before with a with a string and chalk, which is that this curve is an ellipse. It turns out this is a piece of an ellipse. It's a huge ellipse. These two points turn out to be the so-called fosi 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 10 times as long. So it's true that it's an ellipse, but it doesn't help.
Okay, so what we're going to do instead is much simpler. We're going to leave this expression alone and we're just going to differentiate implicitly. So again, we use implicit differentiation. on the constraint equation. All right. 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 when you differentiate a square root, you the square root goes into the denominator and there's a factor of a half. 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 prime here.
So technically speaking, it's twice this with a half. 2 over two times that. All right. So that's the differentiation of the first piece of this guy. Now I'm going to do the second one. And it's also the chain rule, but I'm just going to you're just going to have to let me uh uh do it for you because it's just a little bit too long for you to uh pay attention to. It turns out there's a minus sign that comes out because there's a minus x and a minus 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 um a minus x which is what replaces the x over here and then another term which is b minus y * y prime.
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. All right? 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 zero. It's not changing in the problem. Although my my parachute stuff stretches. Um we tried to stretch it to its fullest extent so that we kept it fixed. That was the goal here. All right. 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 prime is zero. So that means that these terms go away. y prime is equal to zero. All right? So they're gone. And now what we have is the following equation. It's x / square<unk> of x^2 + y^2 is equal to if I put it on the other side it's the minus sign is changed to a plus sign a - x / this other massive object a - x^2 + b - y^2 All right. So this is what it 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 and important.
So first of all let me observe for you that this x is something on our picture and this square root of x^2 + y^2 is something on our picture. Namely, if I go over to the picture here and this was a right triangle and this hypotenuse the sign of alpha. All right, it's a right triangle. That's the opposite leg. So this guy is the sign 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 minus x and the hypotenuse is what was in the denominator over there. So this side is s of beta. And so what this condition is telling us is that alpha is equal to beta which is the hidden symmetry in the in the in the problem.
I don't know if you can actually see it when I when I show you these these these this this thing, but no matter how I tilt it, actually the the two angles from the horizontal are the same. All right. 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. All right. Now, this has even. So, that's a 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 force 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 it falling and breaking. If they all 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 balanced condition and it's very typical of minimization problems and fortunately there are nice solutions which distribute the weight reasonably well and that's certainly the principle of suspension bridges. All right. So yeah one more question. Okay. So then 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.
Um those are things that uh I will answer for you in a set of notes which I will hand out and it's they're they're just a mess. They're they're you see there just as in that other problem that we did last time. There are some illuminating things you can say about the problem and then there's some messy formulas. you you you know you want to try to to pick out the simple things that you can say. In fact, that's a property of 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. All right. So, I didn't answer the question of what the lowest y was, but I I'll do that for you.
Okay. Maybe maybe I'll just mention one more thing about this problem. So this is a very amusing problem from a completely different point of view. If you sort of roll the ellipse around um you get the same phenomenon from each uh place here. So it doesn't matter where a and 00 are you'll get the same phenomenon that is the the tangent line. So the the this angle and that angle will be equal. So you can also read that as being that the angle over here and the angle over here are equal. That is that is beta that is the complimentary angles are also equal. And if you interpret this as a ray of light and this is 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. uh more precisely property that this kind of curve has. And in fact uh a few years ago there was this great um piece of art uh at the something called the decort of a museum which I recommend very highly to you. You go sometime to visit when you're uh in your four years here. Um there was a uh a collection of miniature golf holes. So they had a bunch of mini golf art pieces of art and every one was completely different for the other. One of them was called hole-in-one and the T 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. Just bounce. No matter where it bounces, it just one bounce and it's in the hole. So that's that's kind of that's actually a consequence of the of the computation that we just did. Okay. So time to time to go on. We're going to now talk about something else. All right. All right. Okay. So our next topic 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 uh we'll illustrate it on an example which is solving the equation x^2= 5. Okay, we're going to find the the square root of five.
Now you can actually solve any equation this way. Okay, any equation that you understand, you can solve this way essentially. So, so even though I'm doing it for the square root of five, which is something that you can figure out on your calculator, uh, 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 ofx= to x^2 - 5. Okay? And then we're going to solve f ofx equals zero. 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 I'll plot this function. Here's the function. It's a parabola y is equal to x^2 - 5. It dips below zero. Sorry, it should be centered, but anyway. Okay. And now the idea here is to start with a guess. and um square root of five is pretty close to the square root of four which is two. So my first guess is going to be two here.
So start with uh initial guess. All right. 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 if the function were linear, we're going to try to find where the zero is. So if the function is linear, what we'll use is we'll plot the point uh where two uh is on the uh that is the point x uh 2 f of two 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. All right. 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 the place we're aiming for. All right. So, we have to work out what the formulas are. And that's the strategy. All right. So now the first step here is we have our guess uh we have our tangent line which has the formula y - y0 is equal to m x - x0. All right. 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 is the orange line. Where that crosses the axis, that's where I want to put X1.
All right, so that's the x intercept. Now, how do you find the x intercept? You find it by setting y equal to zero. That horizontal line is y = 0. So I set y equ= 0 and I get 0 - y 0 is equal to m * x1 - x0. So I changed two things in this equation. I plugged in zero here for y and I said that the place where that happens is going to be where x is x1. All right. So now let's solve. And what we get here is - y / sorry y 0 / m is equal to um x1 - x0. And now I can get a formula for x1. Right? So x1 is equal to x0 - y 0 / m. All right. Now I now need to tell you what this formula means uh in terms of the function f.
So first of all x0 is x0 whatever x0 is and y0 I claim is f of x0. All right and m is the slope at that same place. So it's f prime of x0 and this is this is the whole story. This is the formula which will enable us to calculate basically any root. Okay, 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 + point, that's our a better and better guess. I'm going to take the nth one and then I'm going to plug in this formula. So f of xn / frime of xn.
So this is the the basic formula and this is 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. All right. So let's see how it works in the case that we've got which is uh x0 is equal to 2 f ofx is equal to x^2 - 5. So let's see how to implement this this formula. So first of all I have to calculate for you frime of x that's 2x and so x1 is equal to x0 minus so f prime uh sorry f ofx would be x0^2 - 5 that's what's in the numerator and in the denominator I have the derivative so that's 2x zero.
All right. And so all told, well, let's work it out uh in two steps here. This is minus a half x0 for the first term and then plus five halves uh over x0 for the second term. And these two terms combine. So we have here a half x0 plus 5 halves uh with x0 in the denominator. All right. Right. So here's the formula for X1 in this case. All right. So now I'd like to show you how well this works. Uh so first of all we have x1 is a half * 2 if I plug in x0 uh + 5 uh fourths right which is 9/4s. Okay. And x2 I have a half * 9/4s plus 5* 4 9ths. Right? That's the the next one. And if you work this out, it's 161 over 72.
All right. And then x3 is kind of long, but I will just write down what it is so that you can see. It's a half of 161 over 72 + 5 halves. And then I do the reciprocal of that. So 72 over 161. All right. So let's see how good these are. All right. I I carefully calculated how far off they are somewhere on my notes. So, I'll just take a look. See what I said. Oh, yeah. I did do it. Okay. So, what's the square root of 5 minus? So, here here's n here's the square root of five minus 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 let's do this. So when n is equal to zero, the guess was two and we're off by about 2 * 10us1. And if n is one, so that's this 9/4s. That's off by about 10us2. And then n is equal to two. That's this number here. All right. And that's off by about 4* 10 the minus 5th. That's already as good an approximation to the square root of 5 as you'll ever need in your life. Okay. If you do three, this number here, uh, it turns out to be accurate to 10 the minus 10th or so. This goes right off to the edge of my calculator. This one here. So already with the third iterate you're you're uh way past the accuracy that you need for most things.
Yeah. Question. How come the x disappears? So from here to here is that there hang on folks we have a question. Well let's just answer it. So here we have an x0 and here we have minus a half. There's an x0^ squar and an x which cancel and here we have a minus and a minus 5 halves x0. So I combined the one minus a half I got plus a half. That's all. Okay. All right. Thanks. We'll have to ask other questions after class.