# Golden section search

### From Glossary

This finds an interval, , that contains a maximum
of a unimodal function
whose domain is , such that the length of the final interval,
, satisfies: (where is specified).
The golden ratio is denoted below by
, which is approximately 0.618.

- Initially compute and , and set
the interval of uncertainty to the original endpoints,
and . In general, we
have and placed in , such
that the distances from the endpoints are the same:
g(b-a) |----------------| a------x---------y------b |----------------| g(b-a)

- Given the interval contains evaluations
and ,
with , compare: if , replace
with ; if
, replace with .
(If , this leaves the
interval , in which case evaluate
.)
One of the following cases prevail:
* * * * a------x---------y------b a------x---------y------b : drop : : drop : f(x) > f(y) f(x) < f(y) x=g(y-a) y=g(b-x) * * a------x---------y------b : drop : : drop : f(x) = f(y)

The golden ratio is the limit of successive fibonacci numbers: (. Thus, the golden section search approaches Fibonacci search as the number of functional evaluations (N) becomes large.