Documente Academic
Documente Profesional
Documente Cultură
Use
x2 = x1 f (x1)(x1 x0)/(f (x1) f (x0)).
Basic Secant Method Algorithm: starting with
approximation x0, tolerance and maximum steps N
1. Initialize with x0, x1 and i = 1;
2. Set xi+1 = xi f (xi)(xi xi1)/(f (xi) f (xi1));
3. If |xi+1 xi| > and i < N ,
set i = i + 1 and go to step 2;
4. Stop with x = xi+1.
Notes:
i) only one new f value per step;
ii) do NOT use equivalent
x2 = (f (x1)x0 f (x0)x1)/(f (x1) f (x0)).
Superlinear convergence:
if a sequence {xn} converges to r with
lim =
|en+1|
= M,
|en|
Algorithm
Initialize: find a1, b1, with f (a1)f (b1) < 0;
For i = 1 : N
compute c = bi f (bi)(bi ai)/(f (bi) f (ai));
if f (ai)f (c) < 0, set bi+1 = c, ai+1 = ai;
otherwise, set ai+1 = c, bi+1 = bi;
EndFor
Set r c.
Example with
f (x) = x2 sin(x) 0.5, x0 = 0, x1 = 2, x2 = .5:
% i
3
4
5
6
7
8
x_i
1.18893279136691
1.19606169851046
1.19608203426444
1.19608203329713
1.19608203329713
NaN
f(x_i)
-0.0144
-4.12e-05
1.96e-09
2.22e-16
2.22e-16
NaN
New x value is
aBC
AbC
ABc
P (0) =
+
+
;
(A B)(A C) (B A)(B C) (C A)(C B)
rewritten in corrected form
r(r q)(c b) + (1 r)s(c a)
xi+1 = c
(q 1)(r 1)s 1)
with q = A/B, r = C/B, s = C/A.
Can show ei+1 eiei1ei2K e1.84
i M.
Convergence is superlinear with = 1.84.
7