Develop a program using a programming or macro language to implement the golden-section search algorithm. Design the

Question:

Develop a program using a programming or macro language to implement the golden-section search algorithm. Design the program so that it is expressly designed to locate a maximum. The subroutine should have the following features:
Iterate until the relative error falls below a stopping criterion or exceeds a maximum number of iterations.
Return both the optimal x and ƒ(x).
Minimize the number of function evaluations.
Test your program with the same problem as Example 13.1.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question

Numerical Methods For Engineers

ISBN: 9780071244299

5th Edition

Authors: Steven C. Chapra, Raymond P. Canale

Question Posted: