Develop a program using a programming or macro language to implement the quadratic interpolation algorithm. Design the

Question:

Develop a program using a programming or macro language to implement the quadratic interpolation algorithm. Design the program so that it is expressly designed to locate a maximum. The subroutine should have the following features:

Base it on two initial guesses, and have the program generate the third initial value at the midpoint of the interval.

Check whether the guesses bracket a maximum. If not, the subroutine should not implement the algorithm, but should return an error massage.

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.2


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: