 Well, we're going to switch over to section 4.8 now and James Stewart's calculus textbook entitled Newton's method. I see my apostrophe is in the wrong location there. Sorry, Newton is not a plural person. For all I know, he's just one person. Anyways, what we're going to develop now is another approximation method that uses the x intercepts of functions. So consider the picture you see in front of you. Consider we have a function f that's given, and we're desiring to find an x intercept for this function f. And let's call it r, r for root of the function. So we want to find this and be aware that what we're trying to say is that f of r is going to equal zero since it's an x intercept. Although we don't know what r is, we can make a guess, right? When we draw this thing, the image you see in front of you is a computer generated picture. So it is actually fairly accurate. But we could draw by hand and get a pretty good estimate. Admittedly, I haven't drawn the scale on the x or y axis whatsoever here. But if we did, we could get an estimate like, oh, maybe r is close to one or close to two or maybe it's close to one and a half or something. And suppose our first estimate is x one, right? What you see on the screen right here. I want to mention to you that other textbooks when we talk about Newton's method, sometimes their first guess, they'll call x zero. Some people, when they start counting on their fingers and toes, they start with the number zero instead of one. We'll start with one right here. So this is going to be our first guess. And at this picture, it might not look like a very good guess. It's like, holy cow, there's a huge gap between r and x one there. But there's two reasons why we choose x one. x one might be like the nearest integer to r. And also, I'm not showing you the scale, right? If you were to zoom in, everything looks like they're far apart. But if you zoom out, they almost look identical. So in terms of good or bad, you always talk about a scale of some kind. And so don't really worry about too much about it here. X one, just consider that to be a first guess, whether it's a good guess or a bad guess, don't worry about it too much. And so with this first guess x one, what we're going to do is we're going to form the tangent line to the function f with respect to this first value x one. So we look at the point of tangency, and then we construct the tangent line, which was here in green. This will come down and this tangent line will somewhere intersect the x axis. That point of intersection we're going to call x two. Now it doesn't necessarily have to hit the x axis. If you had a horizontal line, a horizontal tangent line, it would never hit the x axis. But basically that just means we don't want to take our first guess at a local extremum. Pick something else than that. So we take the tangent line, then we get a new x intercept x two right here. Now as you can see in the picture, the second guess, the second point actually seems a little bit better than the first one. It got closer to r. And so Newton's methods can be based upon iterating this process. Can we do it over and over and over again? But before we talk about that, I want to figure out if we know x one and we know the function f, how do we find x two right here? Well, this green line is none other than the linearization we were talking about in section 3.10. So L of x, the line, the green line there L, it's f prime at x one times x minus x one plus f of x one like so. And if we're looking for the x intercept, we're trying to look out for when the line, when the line hits the x axis, that's when the y coordinate L of x equals zero. So we get zero equals f prime of x one times, well, when does the y coordinate become zero? Well that happens at the x coordinate x two. That's the point we're looking for right here. And so using this equation, we're going to solve it for x two here. So first we're going to subtract f of x one from both sides. So minus f of x one minus f of x one so that they cancel on the left hand side. So this gives us that now that f prime of x one times x two minus x one, this will equal negative f of x one. And so then we're going to divide both sides of the equation by f prime of x one, f prime of x one. Let me move it down for a little bit more space. Well then the left hand side, those divisors cancel out. We end up with x two minus x one equals negative f of x one over f of x two. And then the last thing to do is going to be add x one to both sides of the equation. And we get that x two equals x one minus f of x one over f prime of x one. There you go. And so this right here shows us how we can compute this number x two, this x coordinate using x one. So using tangent lines, the linearization from section 3.10, we get this new point x two. Well, Newton's method is based upon iterating this process. So taking our picture here again, we had our first initial guess x one, we come up down, we come up here, we find the function, we form the tangent line, we come back down, we then find the point x two, then we do this process again. Let's form the tangent line associated to x two, bring that back down, that'll then give us an x coordinate x three. And we do this again to get us x four, then we do this again to do x five. And then we keep on doing this, getting closer and closer and closer to this root R. And that's the basis of Newton's method. You do this process over and over and over again. All right. And so the first guess then gives us a second guess, the second guess then gives us the third guess. And so we get this formula sequence of numbers, which we'll call x in here. So if we know the nth number of the sequence, we can compute the impulse first term, the next term. So like when we have the third term, we can then calculate the fourth term. And we have the fifth term, we can calculate the sixth term. And then if we have the one millionth term, we could find the one millionth and first term. And the success of Newton's method comes from the fact that this limit will equal R. That is, if we take the limit as these numbers x in go towards and as n goes to infinity, the x ends will approach the root of the function R. And this is actually a pretty slick calculation. I want to kind of show you how that might work. So let's say we want to look for a solution to the equation x cube minus two x minus five. Well, to begin with, Newton's method is useful for finding x intercepts of a function. So what we have to do is just take a function and recognize we're looking for an x intercept. Newton's method is going to involve the derivative. So we calculate that, we get 3x squared minus two. And then remember x in plus one will equal x to the n minus f of x in over f prime of x in. So if we have the initial value of x equals one equals two, what we're going to do is, okay, x one, make a table, x one is equal to two. What's x two going to be? Well, to find x two, we're going to take x one minus f of x one over f prime of x one. And so we plug in specific values. Two was our x one. So we have to take two minus f of two over f prime at two. And so based upon what we had before, we have two. Remember the function was x cube minus two x minus five, which we saw. If we plug in two, that's going to become a negative one. I'll let you double check the details there. And the derivative we can still see, if we evaluate the derivative at two, we get two square root of four times three, which is 12 minus two, which is 10. So you end up with two plus a tenth, aka 2.1. So that's the second estimate we would have there. And then to find x three, what we would do is we would compute x three by taking x two minus f of x two over f prime of x two. And so that requires that we take 2.1 minus next, we're going to take f of 2.1. And then this sits above f prime of 2.1. And all 2.1, I mean, 2.1 is a little bit more difficult to do. It's certainly not impossible. The thing you see here is that if you plug in 2.1 into the polynomial, it only requires addition multiplication and subtraction to compute f of 2.1. If you do that, you're going to end up with 0.061. And then with the derivative, which is also a polynomial, you'll have to add, multiply and subtract. But f prime of 2.1 should turn out to be 11.23. And so now you have to add, subtract, multiply, divide with decimals. But this four function arithmetic we can actually do, this will turn out to be in the end, you get approximately 2.0946. And so that's what we would say here for 2.3, x three I should say, 2.0946. And so you know, these numbers are kind of close and they're going to, every time you do this process, you're going to get one step closer, one step closer, one step closer to computing the solution to this equation. So what I actually want to do right now is actually switch over to a web browser really quick. This is actually a Newton calculator that's available by desmos.com. You can find a link for this inside of the description for this lecture right here. What we're going to do is we're going to type in the original function we had. What did we have before? We had the function x cubed minus 2x minus five. And we want to know this when this thing equals zero. Our initial guess was two. You can slide this over to two. If you want to see the function, this is what it looks like. It's a polynomial function right there. And one thing I like about this desmos calculator is it will give you the answer. So it goes up to x5. x5 you get as 2.094551481554, which was pretty close to what we had before. But you can also see visually what's happening here. So as we zoom in a little bit on the function, if x1 was equal to 2, you can see the vertical line and the tangent line that goes about the tangent line is going to be a good estimate of the function. You can also look at the next iteration here in orange. All right, you might have to zoom in a little bit to see it at a better scale. And then like this, you can also see in green x3, which just so you're aware if we expand this down x3 was 2.095455. This was the estimate we had before, wasn't it? Yeah, we had rounded to four decimal places, but that's accurate right there. We can see the fourth iteration and the fifth iteration if we wanted to. And so one thing I like about this desmos calculator is it will calculate up to x5, but it also shows you step by step what exactly the tangent lines are. You can find this link in the video description below. Also, there's another link that I want to share with you. This one's from planetcalc.com. The link is below as well, for which you can calculate a solution in xintercept using this calculator to Newton's method. So we'll type in again x cubed minus 2x minus 5. We'll take an initial value of 2. We can determine how precise we want to be. So let's do a little bit of, let's have it 1, 2, 3, 4, 5, 6 places of decimal accuracy. We probably should also put this down. So you can change how many decimals it'll display. You can hit the calculate button, but it seems to be doing it automatically. I apologize that the screen, the font, looks a little small right here. It's got some issues here. Anyways, x cubed minus 2, why is it forgetting something? Probably because you need to have a, probably a multiplication between the 2 and the x there so we can recognize it. Still not. All right, let's try calculating and see if it gets it. Okay, I got the right function this time. You have to hit recalculate to make sure it's graphing the right thing. And so what it does is it provides to us accurate to six decimal places, the approximation, but it also shows the steps, which I like about that. It shows you x1, x2, x3, x4. It stopped at x4 because by x4 it got six places of accuracy. If we wanted to do eight decimal places of accuracy, we could add a few more decimals in there, hit recalculate. You'll get this answer right here. And it looks like it was already accurate to eight decimal places. That's sweet. This thing can actually converge really, really quickly. And feel free to use these calculators as you work through these Newton type problems. No one should ever have to, should ever have to do this by hand. We could though, we actually could, but the computer helps us with these tedious calculations. So I want to show you really quick how could one use Newton's method to approximate, say, the sixth root of two. Well, the idea here is to find the sixth root of two, we have to find a function for which the sixth root of two is an x intercept four. So if you're like, oh, I want x to equal the sixth root of two, well, take the sixth power of both sides, you get x to the sixth equals two, set the right hand side equal to zero, you get x to the sixth minus two equals zero. And so this is the function we care about f of x equals x to the sixth minus two. And for Newton's method, we do need to know the derivative, we're going to get six x to the fifth. And so Newton's formula would then say that in x n plus one will equal x to the n minus x to the sixth minus two over six x to the fifth. For which case, if we want to do, like, say, x equals two, x two, I should say, then we take x one minus x one to the sixth minus two over six x one to the fifth, we'll need some initial guess of what that is. Now the sixth or two, let's see, it's somewhere between one and two to the sixth, which was at 64. So I'm going to say it's probably close to one, we'll take x one to be one. And so then you can work with that estimate x two will equal one minus one to the sixth minus two over six times one to the fifth. Any one to any power is going to be one. So we get one minus negative one over six. So we get one plus a sixth as an answer. And we can estimate that if we wanted to. What is a sixth after all, it's half of a third third is 0.3333. So if you give one and a sixth, we're looking at just a approximately 1.16. And then six will just repeat after that forever ever after that. So stop after a while that gives us the first estimate. If I was going past that, I would want to use a calculator. So if we tried that here on the planet calculator, x to the sixth, use a character for exponents x to the sixth minus two, we'll have the initial estimate of one. And let's go with the crazy estimates we need we had before calculate. Double check to see the math right here is typed correctly. So you know you had it, it'll give you the derivative. And he gives us the estimate of 1.12246205. That wasn't quite as good. I mean, that's better than the 1.16666 we had before, but that was just the first guess. I guess it was the second guess. This right here, the 1.1222, it got there, took five steps to get that level of accuracy, accurate to eight decimal places. But it works out really nicely. And so that's what I wanted to kind of say here. This kind of gives you a little bit of under the hood of how one could estimate some of these approximations like radicals. How does a calculator do them? Newton's method, it's a very, very nice algorithm for doing that that uses derivatives and tangent lines. And that brings us to the video today. Thanks for watching. If you liked what you saw, please like this video, subscribe if you want to see more content and more updates in the future. And also feel free to post any comments. If you have any questions, I will be glad to answer them in the future. Until next time, keep on calculating. Bye.