Develop an M-file to implement parabolic interpolation to locate a minimum. Test your program with the same problem as Example 13.2. The function 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 function 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
• Use a bracketing approach (as in Example 13.2) to replace old values with new values.
Want to see the full answer?
Check out a sample textbook solutionChapter 15 Solutions
Numerical Methods for Engineers
Additional Math Textbook Solutions
Advanced Engineering Mathematics
Basic Technical Mathematics
Fundamentals of Differential Equations (9th Edition)
- Suppose we seek to minimizef(x)= 1/2 (x^T)Hx+ (c^T)x + 13 where H = 10 −9 −9 10 and c = 4 −15 Implement the steepest descent algorithm on this problem, using the starting point x0 = (11,0 )^T.arrow_forwardDraw a network showing the quantities obtained in the final iteration and the optimal value of z.arrow_forwardfind the mximum possible order of S5arrow_forward
- Consider a maximization problem with the optimal tableauin the following table.z x1 x2 x3 x4 rhs1 2 1 0 0 100 3 2 1 0 30 4 3 0 1 5The optimal solution is obvious here, please determine the second best BFS to this LP.arrow_forwardFor (c): optons are: saddle point, relative maximum, relative minimum, and inconclusivearrow_forwardFind the minimum of the following function using the Nelder-Mead method with initial working simplex of (-2,-2), (0,0) and (0.2,0.2). Perform three (3) iterations only. Round off to four (4) decimal places.arrow_forward
- Use the Lagrange multiplier method to determine the extreme values of the following functions subject to the given conditions:arrow_forwardUse the Lagrange multiplier method to determine the extreme values of the following functions subject to the given conditions:arrow_forwardUse the Runge-Kutta Fehlberg Algorithm to approximate the solution to the following initial-value problems. This is a numerical analysis problemarrow_forward
- Linear Algebra: A Modern IntroductionAlgebraISBN:9781285463247Author:David PoolePublisher:Cengage LearningCollege AlgebraAlgebraISBN:9781305115545Author:James Stewart, Lothar Redlin, Saleem WatsonPublisher:Cengage Learning