Program on Optimisation – Steepest Descent
Write a program, in M-file or another language you know, to perform optimization of a 2D polynomial function f(x, y) using the method of steepest descent or ascent.
The algorithm is given in the text book but not in the form of pseudo-code. So write it down in pseudo-code first. Use the method of Golden Section for the optimization problem in 1D that is produced as a step in the solution. You will also need to have a function that takes partial differentials of f(x, y) with respect to x and y. But before all that, you will have to devise a method to represent a general polynomial in 2 variables.
Test your program using this function:
f(x, y) = 2xy + 2x – x2 -2y2,
with the initial point at (-1, 1). Plot the function as a 3D surface and then mark on it the optimum point with a marker, showing also the path from the initial point to the final point.
Then test it again using two different tests of your own choice. Again you should show the plot of the 3D surface and the path from the initial point to the final point.