Newton's method.
- To: mathgroup at smc.vnet.net
- Subject: [mg5204] Newton's method.
- From: Gandalf <Gandalf at Empire.Net>
- Date: Thu, 14 Nov 1996 02:02:08 -0500
- Organization: Middle Earth
- Sender: owner-wri-mathgroup at wolfram.com
Can someone provide a little help on this problem?:
Suppose I wanted to write a sequence to perform the Newton inversion of
a polynomial which inverts a series 1 + a(1)x + a(2)x^2+... through a
particular degree. The sequence would look like the following:
(* Newton's inversion of a polynomial *)
guess = 1;
precision = 1;
While[precision < degree,
precision *=2;
If[precision > degree, precision = degree];
temp = iterate[poly, precision - 1];
guess = guess + guess*(1 - temp*guess); (*The Newton iteration*)
guess = iterate[guess, precision -1];
];
(* Now guess is 1 / poly through degree of 'degree' *)
----------------
iterate would be a function, iterate[f, n] that returns a polynomial f
taken through degree n. This sequence effectively doubles the precision
each pass through it. I'm a little stumped on how to implement the
iterate funtion. Any help greatly appreciated. Thanks.