Small Solver Program
11-03-2019, 03:14 PM (This post was last modified: 11-07-2019 01:07 AM by Albert Chan.)
Post: #26
 Albert Chan Senior Member Posts: 2,230 Joined: Jul 2018
RE: Small Solver Program
(02-16-2019 03:58 AM)Thomas Klemm Wrote:
(02-15-2019 09:16 PM)Albert Chan Wrote:  Amazingly, my rate formula is same as Aitken extrapolation formula !

That's not really a surprise, is it?
It's essentially the same idea: geometric series

$$1\,+\,r\,+\,r^{2}\,+\,r^{3}\,+\,\cdots \;=\;{\frac {1}{1-r}}$$

Except for r=1, rate formula work even if iterations diverges (|r| > 1)

Example, solve x = f(x) = 5 - x^3, guess = 1.5

Above setup, iterations diverges: 1.5 → 1.625 → 0.708984375 → 4.643622734 ...

First 3 numbers, r = (0.708984375 - 1.625) / (1.624 - 1.5) ≈ -7.328

Iterate with x = g(x) = p(5 - x^3) + (1-p)x, with p = 1/(1-r) ≈ 12.0% :

1.5
1.515000000
1.515928095
1.515977481
1.515980083
1.515980220
1.515980227
1.515980228 ← converged

We can speed up the convergence by using r = f'(guess) = -3 * 1.5^2 = -6.75
Iterate with same g(x), but p = 1/(1-r) ≈ 12.9% :

1.5
1.516125000
1.515977551
1.515980277
1.515980227
1.515980228 ← converged
 « Next Oldest | Next Newest »

 Messages In This Thread Small Solver Program - Gamo - 02-14-2019, 05:25 AM RE: Small Solver Program - Thomas Klemm - 02-14-2019, 07:06 AM RE: Small Solver Program - Albert Chan - 02-15-2019, 12:07 AM RE: Small Solver Program - Thomas Klemm - 02-15-2019, 06:26 PM RE: Small Solver Program - Albert Chan - 02-15-2019, 09:16 PM Addendum: Small Solver Program - Thomas Klemm - 02-14-2019, 07:15 AM RE: Small Solver Program - Thomas Klemm - 02-16-2019, 03:58 AM RE: Small Solver Program - Albert Chan - 11-03-2019 03:14 PM RE: Small Solver Program - Albert Chan - 11-10-2019, 07:02 PM RE: Small Solver Program - Albert Chan - 12-01-2019, 12:13 AM RE: Small Solver Program - Csaba Tizedes - 02-16-2019, 12:24 PM RE: Small Solver Program - Thomas Klemm - 02-16-2019, 01:42 PM RE: Small Solver Program - Csaba Tizedes - 02-16-2019, 03:24 PM RE: Small Solver Program - Gamo - 02-17-2019, 02:57 AM RE: Small Solver Program - Thomas Klemm - 02-17-2019, 09:06 AM RE: Small Solver Program - Gamo - 02-17-2019, 02:33 PM RE: Small Solver Program - Thomas Klemm - 02-17-2019, 04:57 PM RE: Small Solver Program - Gamo - 02-18-2019, 03:49 AM RE: Small Solver Program - Thomas Klemm - 02-18-2019, 05:20 AM RE: Small Solver Program - Dieter - 02-18-2019, 07:46 PM RE: Small Solver Program - Thomas Klemm - 02-18-2019, 10:22 PM RE: Small Solver Program - Albert Chan - 02-19-2019, 01:10 AM RE: Small Solver Program - Csaba Tizedes - 02-19-2019, 08:39 AM RE: Small Solver Program - Thomas Klemm - 02-20-2019, 05:31 AM RE: Small Solver Program - Csaba Tizedes - 02-25-2019, 08:39 PM RE: Small Solver Program - Thomas Klemm - 02-20-2019, 07:22 AM RE: Small Solver Program - Thomas Klemm - 02-24-2019, 09:21 AM RE: Small Solver Program - Thomas Klemm - 02-25-2019, 11:00 PM RE: Small Solver Program - Albert Chan - 01-04-2020, 07:49 PM

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