Write a computer code to perform the gradient method of steepest ascent algorithm using the Golden Section

Question:

Write a computer code to perform the gradient method of steepest ascent algorithm
using the Golden Section Search Method (presented in Section 7.6) to maximize the
function:

g (2) = f(xk + XVf(xk))

to obtain  λ=λk at each step determining the next point (xk+1, yk+1) in Equations (13.4).
Use your code to solve Problems 6 and 7 of this section.

Equation 13.4

X+1 =X +2 yk+1 =yk +2 af ax af  (3) (X,Y)

Data from problem 6

If x and y are the amounts of labor and capital, respectively, to produce:

Q(x, y) =0.54x -0.02x +1.89y - 0.09y units of output for manufacturing a product, find the values of x and y

Data from problem 7

The total cost to manufacture one unit of product A is $3, and for one unit of product B it is $2. If x and y are the retail prices per unit of A and B, respectively, then marketing research has established that:

and QA = 2750-700x + 200y = 2400 + 150x - 800y QB = are the quantities of each product that will be sold each

Data from section 7.6

The Golden Section Search Method is a procedure that uses the golden ratio. To better understand the golden

Figure 7.24

0 Figure 7.24 r (1-r)

Solving this last equation gives the two roots r = (5-1)/2 and 2 = (-5-1)/2

Only the positive root r lies in the given interval [0, 1]. The numerical value of ris approximately 0.618

f(x) f(x) f(x) a x = a + 0.382 (b-a) X=a+0.618 (b-a) b X

Table 7.3 Golden Section Search Method to maximize f(x) over the interval axb STEP 1 STEP 2 Initialize:

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question

A First Course In Mathematical Modeling

ISBN: 9781285050904

5th Edition

Authors: Frank R. Giordano, William P. Fox, Steven B. Horton

Question Posted: