11 write a program that will find the maxima of the


Problem-1

1.1. Write a program that will find the maxima of the following function using Golden section search algorithm starting from xl = -4 and xu = 1. Your function should take xl , xu, and number of iterations as input parameters. Also plot the graph estimated maxima Vs. iteration number and true error Vs. iteration number.

f(x) = x3 - 10 * x

1.2. Develop a bracketing algorithm to find the maxima of the above function that will generate two random candidate points x1 and x2 with in the bound xl and xu, such that x1 is in the upper half of the bound and x2 is in the lower half of the bound. Then after the algorithm will choose new bounds (xlower and xupper) exactly like in Golden search. Then again two new random candidate points will be generated with in the bound new xl and new xu and the process keeps going till a defined number of iterations.Your function should take xl , xu, and number of iterations as input parameters. Plot the graph estimated maxima Vs. iteration number and true error Vs. iteration number. Also state for this problem was Golden search better or the random bracket search better?

2a. Steepest ascent

Write a Mathematica code to find the maxima of the following multidimensional function using optimal steepest ascent technique. Your function should take the initial starting point and number of iterations as input parameters. Plot the function and the search path on a same graph. [Hint use ContourPlot to plot the function ListLinePlot to draw the search path over the contour]?

f(x, y) = 2xy + 2x - x2 - 2y2

2b. Randomized Steepest ascent

Now repeat the above exercise by moving in the steepest ascent direction with a step size h, which will be user defined. Again plot the function and the search path on a same graph. Which technique you think converges faster to the maxima for this given problem?.

Extra credit

Given a sphere of radius 10 units with 3 particles that interact with each other with in the sphere. The energy of the system for a given configuration of these particles is given by

1190_sphere of radius.jpg

where rij represents the distance between the particles i and j.

Use Mathematica in-built optimization library NMinimize to find out the minimum energy configuration state of this system. Note the particles cannot go outside the sphere neither two particles can occupy the same position with in the sphere. Can you think of a practical application of this simple demonstration.

Solution Preview :

Prepared by a verified Expert
Engineering Mathematics: 11 write a program that will find the maxima of the
Reference No:- TGS01153054

Now Priced at $30 (50% Discount)

Recommended (92%)

Rated (4.4/5)