Up to Main Lab Page | Next Lesson - Procedures | Previous Lesson - Newton's Method |
If g(x) and g'(x) are continuous on an interval containing a root of the equation g(x) = x, and if |g'(x)| < 1 for all x in the interval then the series xn+1 = g(xn) will converge to the root.In Newton's method we take g(x) = x - f (x)/f '(x). In this case f (x) = 0 is equivalent to g (x) = x.
However we are not restiricted to this choice of g.
If c is a root of f, then
f (c) = 0. We can manipulate f
algebraicaly to produce a function g such that
g(c) = c (c is a fixed point of
g).
For example if f (x) = x2 - x - 2, then by solving f (x) = 0 in different ways, the following are all possible choices for g(x):
Provided that |g'(x)| < 1 the sequence generated by
Repeat | |
a := g(a) | |
Return a |
The condition that |g'(x)| < 1 can be difficult to
show, and even more difficult to automate.
A much more useful technique is to check if the difference of successive
approximations is converging.
Thus we test |an+1 -
an| on each iteration.
If |a3 - a2| >
|a2 - a1| we should abort the
iteration.
Up to Main Lab Page | Next Lesson - Procedures | Previous Lesson - Newton's Method | Top of this Lesson |