Golden Section Search Method Major: All Engineering Majors Authors: Autar Kaw, Ali Yalcin http://nm.mathforcollege.com Transforming Numerical Methods Education for STEM Undergraduates 4/7/2015 http://nm.mathforcollege.com 1 Golden Section Search Method http://nm.mathforcollege.com Equal Interval Search Method •Choose an interval [a, b] over which the optima occurs •Compute ab f 2 2 and ab f 2 2 f(x) ab ab f f 2 2 2 2 •If then the interval in which the maximum a b occurs is 2 2 , b otherwise it occurs in ab a, 2 2 2 a 2 (a+b)/2 b Figure 1 Equal interval search method. 3 http://nm.mathforcollege.com x Golden Section Search Method The Equal Interval method is inefficient when is small. The Golden Section Search method divides the search more efficiently closing in on the optima in fewer iterations. f f 2 1 fu fl Xl X2 X1 Xu Figure 2. Golden Section Search method 4 http://nm.mathforcollege.com Golden Section Search MethodSelecting the Intermediate Points f2 f1 fl fu f1 fl fu a-b b Xl Xu X1 a b Xl X2 a X1 Xu Determining the first intermediate point Determining the second intermediate point a b ab a b ab a b b Golden Ratio=> 0.618 ... a 5 http://nm.mathforcollege.com Golden Section SearchDetermining the new search region f2 f1 fl Xl 6 fu X2 X1 Xu If f ( x ) f ( x ) then the new interval is [ xl , x2 , x1 ] If f ( x ) f ( x ) then the new interval is [ x2 , x1, xu ] All that is left to do is to determine the location of the second intermediate point. 2 1 2 1 http://nm.mathforcollege.com Example . 2 2 2 The cross-sectional area A of a gutter with equal base and edge length of 2 is given by A 4 sin (1 cos ) Find the angle which maximizes the cross-sectional area of the gutter. Using an initial interval of [0, / 2] find the solution after 2 iterations. Use an initial 0.05 . 7 http://nm.mathforcollege.com Solution The function to be maximized is f ( ) 4 sin (1 cos ) Iteration 1: Given the values for the boundaries of xl 0 and xu / 2 we can calculate the initial intermediate points as follows: 5 1 5 1 ( xu xl ) 0 (1.5708) 0.97080 f (0.97080) 5.1654 2 2 5 1 5 1 x2 xu ( xu xl ) 1.5708 (1.5708) 0.60000 f (0.60000) 4.1227 2 2 x1 xl f2 f1 X1=? Xl 8 X2 X1 Xl=X2 Xu X2=X1 Xu http://nm.mathforcollege.com Solution Cont x1 xl 5 1 5 1 ( xu xl ) 0.60000 (1.5708 0.60000) 1.2000 2 2 To check the stopping criteria the difference between xu and xl is calculated to be xu xl 1.5708 0.60000 0.97080 9 http://nm.mathforcollege.com Solution Cont Iteration 2 xl 0.60000 xu 1.5708 f ( x1 ) f ( x2 ) x1 1.2000 f (1.2000) 5.0791 x2 0.97080 f (0.97080) 5.1654 xl 0.60000 xu 1.2000 x1 0.97080 x2 xu Xl 10 X2 X 1 Xu 5 1 5 1 ( xu xl ) 1.2000 (1.2000 0.6000) 0.82918 2 2 xu xl 1.2000 0.6000 0.9000 2 http://nm.mathforcollege.com Theoretical Solution and Convergence Iteration 1 2 3 4 5 6 7 8 9 xl 0.0000 0.6002 0.6002 0.8295 0.9712 0.9712 1.0253 1.0253 1.0253 xu 1.5714 1.5714 1.2005 1.2005 1.2005 1.1129 1.1129 1.0794 1.0588 x1 0.9712 1.2005 0.9712 1.0588 1.1129 1.0588 1.0794 1.0588 1.0460 x2 0.6002 0.9712 0.8295 0.9712 1.0588 1.0253 1.0588 1.0460 1.0381 xu xl 1.0253 1.0588 1.0420 2 2 f(x1) 5.1657 5.0784 5.1657 5.1955 5.1740 5.1955 5.1908 5.1955 5.1961 f(x2) 4.1238 5.1657 4.9426 5.1657 5.1955 5.1937 5.1955 5.1961 5.1957 1.5714 0.9712 0.6002 0.3710 0.2293 0.1417 0.0876 0.0541 0.0334 f (1.0420) 5.1960 The theoretically optimal solution to the problem happens at exactly 60 degrees which is 1.0472 radians and gives a maximum cross-sectional area of 5.1962. 11 http://nm.mathforcollege.com Additional Resources For all resources on this topic such as digital audiovisual lectures, primers, textbook chapters, multiple-choice tests, worksheets in MATLAB, MATHEMATICA, MathCad and MAPLE, blogs, related physical problems, please visit http://nm.mathforcollege.com/topics/opt_golden_section_search.html THE END http://nm.mathforcollege.com