Develop a program using a programming or macro language to implement the parabolic interpolation algorithm. Design the program so that it is expressly designed to locate a maximum and selects new points as in Example 13.2. 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 message.
• Iterate until the relative error falls below a stopping criterion or exceeds a maximum number of iterations.
• Return both the optimal x and
• Minimize the number of function evaluations.
Test your program with the same problem as Example 13.2.
Want to see the full answer?
Check out a sample textbook solutionChapter 13 Solutions
Numerical Methods for Engineers
- find the mximum possible order of S5arrow_forwardConsider the given graph below. The weights represent the time, in minutes of reaching one destination from another destination. Using the Brute Force Method in this complete weighted graph, determine all the Hamilton circuits starting at L and its optimal solution.arrow_forwardSolve the following mixed integer programming problem by using Branch and Bound algorithm. Maximize Z = x1 +x2 Subjected to 2x1 + 5x2 ≤ 1 6x1+ 5x2 ≤ 30 x2 ≥ 0 x1 ≥ 0 and integers.arrow_forward
- Prove that Euclid’s algorithm always stops and producesgcd(a, b).arrow_forwardAn account on server A is more expensive than an account on server B. However, server A is faster. To see if it’soptimal to go with the faster but more expensive server, a manager needs to know how much faster it is. A certaincomputer algorithm is executed 30 times on server A and 20 times on server B with the following results:T-Value = -3.12 P-Value = 0.002 DF = 48Is server A really faster? How strong is the evidence? Formulate the suitable hypothesis and alternative and conclude at5% level of significance.arrow_forward
- Advanced Engineering MathematicsAdvanced MathISBN:9780470458365Author:Erwin KreyszigPublisher:Wiley, John & Sons, IncorporatedNumerical Methods for EngineersAdvanced MathISBN:9780073397924Author:Steven C. Chapra Dr., Raymond P. CanalePublisher:McGraw-Hill EducationIntroductory Mathematics for Engineering Applicat...Advanced MathISBN:9781118141809Author:Nathan KlingbeilPublisher:WILEY
- Mathematics For Machine TechnologyAdvanced MathISBN:9781337798310Author:Peterson, John.Publisher:Cengage Learning,