







Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!








-^
-^
− k
k^
k-
k-
-^
-^
-^
φk
-^
½
For iterative algorithms, we want to know how the error decreasesafter each iteration
-^
We also want to check how much each iteration costs
-^
Optimal algorithm is the one that achieves a given error for a givencost
-^
Algorithm
convergence
function evaluations per step
Bisection
Linear
One
Secant
Superlinear
One
Newton
Quadratic
Two
Which method is better?
-^
Define better:
-^
Bisection guaranteed to converge, but slow
-^
Secant one evaluation per step Newton: two
-^
Newton quadratic convergence Secant super linear
-^
Newton needs derivative, which may be unavailable
-^
-^
-^
2n 0
-^
1.62s 0
-^
-^
-^
0
-^
-^
-^
Newton
Secant
-^
-^
Secant method fits a straight line topredict zero from two previous values
-^
We could instead fit a parabola to predictthe zero from three values!
-^
However parabola may not intersect x axis(straight line will always)–
In this case roots will be complex
-^
Idea of inverse quadratic interpolation–
Fit a parabola x=f(y
2 ) instead of a parabola
y=f(x
2 )
-^
Evaluate it at 0
-^
Problem: polynomial interpolation needsthe points (here function values) to bedistinct
-^
Cannot guarantee this!
-^
So method may not converge
-^
However near solution it converges veryrapidly
k = 0;fa=f(a)fb=f(b)fc=f(c)while abs(c-b) > eps*abs(c)
x = polyinterp([fa,fb,fc],[a,b,c],0)a = b;fa=fb;b = c;fb=fc;c = x;fc=f(x);k = k + 1; end
-^
-^
-^
ε^
a
,^ b
, and
c
so that
-^
f ( a
) and
f (
b ) have opposite signs.
f ( b
) | < |f
( a
) |
-^
c^
is the previous value of
b
.
-^
-^
-^
-^
Let [0,2/3] be the reduced domain
-^
At next step we cannot reuse our function evalution at 1/3 (whichis the mid-point of our interval)
-^
Instead we must evaluate the function at 2/9 and 4/9.
-^
Thus each iteration requires two function evaluations.
-^
Can we instead choose points (not at 1/3 and 2/3) but at some otherpoints
ρ
and 1-
ρ,
so that the point can be reused in the next step
So
ρ
ρ
ρ)/
ρ^
(^2) ρ
ρ
(^2) ρ
ρ
ρ=(
ρ= 1+(1-
φ=0.382..
Length of interval is reduced by a factor of
φ
0.618 each step
-^
So to converge to machine epsilon we require 52/0.
'
75 steps
As the search proceeds, we will have three points in the intervalwith the minimum
-^
Fit a parabola and find the minimum
-^
If the minimum is within the interval, we can choose it as the nextpoint
-^
To stop: recall near a minimum derivative vanishes
-^
So
f(x)=f(x
)+b(x-x*
2
Let
x-x
and
f(x
)=a*
f(x)=a+b
If the interval
is as small as machine
ε
, then the change in the
value of f will of the order of machine
ε
SO it is not computable
-^
Rather change can at most be about the square root of machine
ε
This is employed in Matlab function
fminbd
and in the book
software function
fmintx
f^1
( x
)=f
(x 1
, x 1
, …, x 2
f^2
( x
)=f
(x 2
, x 1
, …, x 2
fM
( x
)=f
M^
(x
, x 1
, …, x 2
f^1
( x
)=f
(x 1
, x 1
, …, x 2
f^1
fM
( x
h )=f
(x 1
, x 1
, …, x 2
fM
f^1
f^1
x
1
f^1
x
f^1
x
N^
fM
fM
x
1
fM
x
fM
x
N^
f (
x +
h )=
f (
x )+
Jh
Solve
Jh=-f
to find the step
x^ k+
=x
+hk