00:01
Here i'll go over newton's method for finding a root of a function.
00:05
And then we'll take a look at an example.
00:08
But newton's method is known to converge very rapidly with a high amount of accuracy.
00:16
But anyway, we'll take a look at a function, just a general function, just sketch it out.
00:24
And we'll make it kind of monotonic.
00:29
And what we're after is the root of this function, which means the place where f of we'll call it x r is equal to zero.
00:46
And we're going to assume that we have a guess that is at least near enough to draw it.
00:57
So x not is a guess, initial guess, and we're going to come up with an iterative procedure.
01:06
And the idea is to look at the slope of the tangent to function f of x.
01:14
So f prime at x0 is equal to the slope of the tangent line at that guess.
01:29
And that is essentially f at x0 minus zero because you have a root down at the bottom divided by x0 minus x0 minus x of the root.
01:41
And so what we're going to be doing is solving this equation.
01:50
Sorry, not x root.
01:55
You can see that where that crosses the x -axis is slightly closer to the root.
02:01
And we'll call that x -1.
02:04
So what we're after is to come up with an iterative procedure where we use the initial guess to figure out x -1, and then we use x -1 to figure out the next guess, et cetera.
02:16
Getting closer, closer to the root as we progress.
02:22
So we're going to solve for x1, and that will give us an iterative equation.
02:31
So let's cross -multiply.
02:33
X -0 minus x -1 is equal to f of x -0 over the derivative at that same point.
02:43
And if we solve then for x -1, we get x -0.
02:52
Minus f of x0 over f prime of x0.
02:58
So the iteration, what you need for it is you need the function, f, you need to take its derivative f prime, and you need an initial guess, and then you can just simply iterate this.
03:16
So as an example, we're going to choose the function f of x equals x, x squared minus 13.
03:28
We can find the first derivative is 2x, and we'll choose an initial guess, x0 equals 4.
03:39
And just check this out.
03:41
Now, we can find the root exactly.
03:55
So just setting up the equation, we see that the root is the square root of 13, which comes out to be 3 .605...