Loading
Golden section search shrinks [a, b] around the minimum of a unimodal f by the golden ratio each step, reusing one old point — no derivatives needed.
Minimise on [0, 5], until the interval is narrower than 0.001.
, so the minimum is not to the right of : keep .
Now , so keep . Only one new f value was needed.
| k | [a, b] | x₁, x₂ | f(x₁), f(x₂) | Keep |
|---|---|---|---|---|
| 1 | [0, 5] | 1.90983, 3.09017 | 1.008131, 2.188471 | [a, x₂] |
| 2 | [0, 3.09017] | 1.18034, 1.90983 | 1.671843, 1.008131 | [x₁, b] |
| 3 | [1.18034, 3.09017] | 1.90983, 2.36068 | 1.008131, 1.130090 | [a, x₂] |
| 4 | [1.18034, 2.36068] | 1.63119, 1.90983 | 1.136021, 1.008131 | [x₁, b] |
| 5 | [1.63119, 2.36068] | 1.90983, 2.08204 | 1.008131, 1.006730 | [x₁, b] |
| … | ||||
| 18 | [1.999333, 2.000198] | width < 0.001 |
Each step multiplies the width by 0.618: , so 18 steps.
The exact minimum is at x = 2 (from f′(x) = 2x − 4 = 0). The calculator below opens on this function.
Cutting off the wrong end.
Working out both points again every step.
Using 0.5 instead of 0.618.
Using it on a function with several dips in [a, b].
Giving x₁ or x₂ as the answer.
Writing only the final answer.
f should have a single minimum (or maximum) between a and b.
Add this calculator to a new note, next to your own working. It stays live: change the numbers there any time.