We want to find the roots of the equation f(x) = 0 using a ritual called Newton's Method.
To do this we start ...
First we guess at a root, say x0. That gives us a point on the curve y = f(x), namely: ( x0,f(x0) ).
Then we move along the tangent to the curve at that point ... until we reach the x-axis at, say x1.
The relationship between x0 and x1 is: x1 = x0 - f(x0) / f '(x0)
You can see that by staring intently at the figure:
As you can see, x1 is closer to the root than our guess of x0. Neat, eh?
>Is that always the case?
Uh ... no, not always. You gotta make a reasonable guess.
Anyway, we now assume that x1 is our next guess and repeat ... moving along the tangent to the next guess, x2 = x1 - f(x1) / f '(x1)
Then repeat the same ritual to get x3 = x2 - f(x2) / f '(x2). Then repeat to get ...
>Yeah, I get it. And if you're lucky you get closer and closer to the actual root, eh?
Yes, like so: click for an example where we're finding a root of f(x) = sin(x) = 0 starting with a guess: x0 = 2.
The various Newton iterates, them's x1, x2, x3 etc., converge to π = 3.14159...
| |
After downloading, try a lousy initial guess. That's great fun!