Post Reply 
Newton Method
05-14-2016, 10:23 PM (This post was last modified: 05-14-2016 10:33 PM by Dieter.)
Post: #9
RE: Newton Method
(05-14-2016 07:49 PM)bshoring Wrote:  Namir, I plugged your formula into the above program. Using the example equation given above, with guesses of 0 & -1, it reached the same result with the same number of iterations (5). However with a guess of 1, yours converged faster, cutting the number of iterations from 25 to 18. Interesting!

At x=1 the function in the example has a local mininum, i.e. at that point the derivative f'(x) is zero. If f'(x) was calculated exactly the Newton method would cause a division by zero and the iteration would stop with an error.

In our case f'(x) is approximated by a small value: h=0,002 yields f'=0,004... and h=0,0001 leads to f' = 0,0002. Dividing f(1) by such small values results in a first approximation that is waaaayyyy off: ~125 with h=0,002 resp. ~2500 with h=0,0001 ...and +infinity with an exact derivative. ;-)

In other words: starting with x=1 should throw an error due to division by zero. Since the derivative is not exact, the algorithm continues with a very large value. Which is why so many iterations are required.

Dieter
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Newton Method - bshoring - 05-11-2016, 07:54 PM
RE: Newton Method - Dieter - 05-11-2016, 08:40 PM
RE: Newton Method - Namir - 05-12-2016, 08:47 PM
RE: Newton Method - Dieter - 05-12-2016, 09:17 PM
RE: Newton Method - Namir - 05-13-2016, 01:59 PM
RE: Newton Method - bshoring - 05-14-2016, 07:49 PM
RE: Newton Method - Dieter - 05-14-2016 10:23 PM
RE: Newton Method - Namir - 05-15-2016, 02:00 AM
RE: Newton Method - Dieter - 05-15-2016, 01:11 PM
RE: Newton Method - Namir - 05-15-2016, 01:57 PM
RE: Newton Method - bshoring - 05-12-2016, 12:10 AM
RE: Newton Method - bshoring - 05-14-2016, 06:36 AM
RE: Newton Method - SlideRule - 08-24-2016, 12:08 PM
RE: Newton Method - Pekis - 08-24-2016, 12:20 PM
RE: Newton Method - Csaba Tizedes - 08-24-2016, 08:37 PM
RE: Newton Method - Duane Hess - 08-25-2016, 04:47 AM
RE: Newton Method - Namir - 08-25-2016, 05:00 AM
RE: Newton Method - rprosperi - 08-25-2016, 04:19 PM
RE: Newton Method - bshoring - 08-27-2016, 03:09 AM
RE: Newton Method - Duane Hess - 08-27-2016, 06:31 AM
RE: Newton Method - SlideRule - 08-28-2016, 02:57 AM
RE: Newton Method - rprosperi - 08-29-2016, 12:46 AM



User(s) browsing this thread: 1 Guest(s)