numerical methods golden section search method - theory nm.mathforcollege

31
Numerical Methods Golden Section Search Method - Theory http://nm.mathforcollege.com

Upload: miyoko

Post on 23-Feb-2016

47 views

Category:

Documents


0 download

DESCRIPTION

Numerical Methods Golden Section Search Method - Theory http://nm.mathforcollege.com. For more details on this topic Go to http://nm.mathforcollege.com Click on Keyword Click on Golden Section Search Method . You are free. to Share – to copy, distribute, display and perform the work - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Numerical Methods Golden Section Search Method - Theory nm.mathforcollege

Numerical Methods Golden Section Search Method - Theoryhttp://nm.mathforcollege.com

Page 2: Numerical Methods Golden Section Search Method - Theory nm.mathforcollege

For more details on this topic

Go to http://nm.mathforcollege.com Click on Keyword Click on Golden Section Search Method

Page 3: Numerical Methods Golden Section Search Method - Theory nm.mathforcollege

You are free to Share – to copy, distribute,

display and perform the work to Remix – to make derivative works

Page 4: Numerical Methods Golden Section Search Method - Theory nm.mathforcollege

Under the following conditions Attribution — You must attribute the

work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work).

Noncommercial — You may not use this work for commercial purposes.

Share Alike — If you alter, transform, or build upon this work, you may distribute the resulting work only under the same or similar license to this one.

Page 5: Numerical Methods Golden Section Search Method - Theory nm.mathforcollege

http://nm.mathforcollege.com5

Equal Interval Search Method

Figure 1 Equal interval search method.

x

f(x)

a b

2

2

Choose an interval [a, b] over which the optima occurs.

Compute and

22baf

If then the interval in which the maximum occurs is otherwise it occurs in

22baf

2222 bafbaf

bba ,

22

22

, baa

.Opt

2ba

2ba

Page 6: Numerical Methods Golden Section Search Method - Theory nm.mathforcollege

6

Golden Section Search Method

The Equal Interval method is inefficient when is small. Also, we need to compute 2 interior points !

The Golden Section Search method divides the search more efficiently closing in on the optima in fewer iterations.

X2XL X1 Xu

fu

f2 f1

fL

Figure 2. Golden Section Search method

http://nm.mathforcollege.com

Page 7: Numerical Methods Golden Section Search Method - Theory nm.mathforcollege

7

Golden Section Search Method-Selecting the Intermediate Points

a bXL X1 Xu

fu

f1

fL

Determining the first intermediate point

a-b

b

X2

a

XL X1 Xu

fu

f2f1

fL

Determining the second intermediate point

)(*382.0),(*618.0

?);(618.0)(

lulu

lu

XXbandXXa

hencewhyab

XXbaa

bXaXX lu 2

Golden Ratio=> ...618.0ab

)(382.0 Lu xxb

ab

aba

ba

1

Let ,hence abR

)(618.0 Lu xxa

b

61803.02

)15(0111 2

RRRRRR

abXaXX ul 1

http://nm.mathforcollege.com

Page 8: Numerical Methods Golden Section Search Method - Theory nm.mathforcollege

Golden Section Search Method

8

3

2

1X2X

)(f

0]1cos2[4cos4

0)2cos(4cos4)()2sin(2sin4)(

)cos1(sin4)(

2

fff

Hence, after solving quadratic equation, with initial guess = (0, 1.5708 rad)

3. Opt

=Initial Iteration Second Iteration st1

3

Only 1 new inserted location need to be completed!

http://nm.mathforcollege.com

Page 9: Numerical Methods Golden Section Search Method - Theory nm.mathforcollege

Golden Section Search-Determining the new search region

Case1:If then the new interval is Case2:If then the new interval is

9

X2XL X1 Xu

fu

f2f1

fL

],,[ 12 xxxL

],,[ 12 uxxx

)()( 12 xfxf

)()( 12 xfxf

X2XL X1 Xu

fu

f2f1

fL

Case 2 Case 1

http://nm.mathforcollege.com

Page 10: Numerical Methods Golden Section Search Method - Theory nm.mathforcollege

At each new interval ,one needs to determine only 1(not 2) new inserted location (either compute the new ,or new )

Max. Min. It is desirable to have automated

procedure to compute and initially.

10

Golden Section Search-Determining the new search region

1x 2x )cos1(sin4)( f )cos1(sin4)( f

Lx ux

http://nm.mathforcollege.com

Page 11: Numerical Methods Golden Section Search Method - Theory nm.mathforcollege

11

0

δ

2.618δ 5.232δ 9.468δδ

1.618δ

1.6182δ

Min.g(α)=Max.[-g(α)]

α

jth

j-1thj-2th

αL = Σδ(1.618)vV = 0

j - 2

αU = Σδ(1.618)vV = 0

j • •

• •

αL αa αb αU

0.382(αU - αl)

1st

2nd

αa = αL + 0.382(αU – αl) = Σδ(1.618)v + 0.382δ(1.618)j-1(1+1.618)V = 0

j - 2

3rd

αa = Σδ(1.618)v + 1δ(1.618)j-1 = Σδ(1.618)v = already known ! V = 0

j - 2

V = 0

j - 1

4th

Figure 2.4 Bracketing the minimum point.

Figure 2.5 Golden section partition.= αL

_

Golden Section Search-(1-D) Line Search Method

http://nm.mathforcollege.com

Page 12: Numerical Methods Golden Section Search Method - Theory nm.mathforcollege

12

If , Then the minimum will be between αa & αb.

If as shown in Figure 2.5, Then the minimum will be between & and .

Notice that: And

Thus αb (wrt αU & αL ) plays same role as αa(wrt αU &

αL ) !!

_ _

Golden Section Search-(1-D) Line Search Method

jaULU )618.1(

)()( ba gg

)()( ba gg

a aLU UU

)(382.0]618.1[()382.0(618.1618.1)]618.1[(618.0])618.11[]618.1[)(236.0(

)]618.1[]618.1[)(236.0())(382.021(

11

1

LUj

Lb

jj

jjLUabLb

http://nm.mathforcollege.com

Page 13: Numerical Methods Golden Section Search Method - Theory nm.mathforcollege

13

Step 1 : For a chosen small step size δ in α,say ,let j be the smallest integer such that.

The upper and lower bound on αi are and .

Step 2: Compute g(αb) ,where αa= αL+ 0.382(αU- αL) ,and αb = αL+ 0.618(αU- αL).

Note that , so g(αa) is already known.

Step 3: Compare g(αa) and g(αb) and go to Step 4,5, or 6.

Step 4: If g(αa)<g(αb),then αL ≤ αi ≤ αb. By the choice of αa and αb, the new points and have .

Compute , where and go to Step 7.

Golden Section Search-(1-D) Line Search Method

12 1010

j

V

j

VVV gg

0

1

0))618.1(())618.1((

J

V

VU

0

)618.1(

2

0

)618.1(j

V

VL

1

0

)618.1(j

V

Va

LL bu ab )( ag )(382.0 LuLa

http://nm.mathforcollege.com

Page 14: Numerical Methods Golden Section Search Method - Theory nm.mathforcollege

Step 5: If g(αa) > g(αb), then αa ≤ αi ≤ αU. Similar to the procedure in Step 4, put and .

Compute ,where and go to Step 7.

Step 6: If g(αa) = g(αb) put αL = αa and αu = αb and return to Step 2.

Step 7: If is suitably small, put and stop. Otherwise, delete the bar symbols on ,and and

return to Step 3.

14

Golden Section Search-(1-D) Line Search Method

aL )(618.0 LuLb

uu )( bg

Lu )(21

Lui

baL ,, u

http://nm.mathforcollege.com

Page 15: Numerical Methods Golden Section Search Method - Theory nm.mathforcollege

THE END

http://nm.mathforcollege.com

Page 16: Numerical Methods Golden Section Search Method - Theory nm.mathforcollege

This instructional power point brought to you byNumerical Methods for STEM undergraduatehttp://nm.mathforcollege.comCommitted to bringing numerical methods to the undergraduate

Acknowledgement

Page 17: Numerical Methods Golden Section Search Method - Theory nm.mathforcollege

For instructional videos on other topics, go to

http://nm.mathforcollege.com

This material is based upon work supported by the National Science Foundation under Grant # 0717624. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the National Science Foundation.

Page 18: Numerical Methods Golden Section Search Method - Theory nm.mathforcollege

The End - Really

Page 19: Numerical Methods Golden Section Search Method - Theory nm.mathforcollege

Numerical Methods Golden Section Search Method - Examplehttp://nm.mathforcollege.com

Page 20: Numerical Methods Golden Section Search Method - Theory nm.mathforcollege

For more details on this topic

Go to http://nm.mathforcollege.com Click on Keyword Click on Golden Section Search Method

Page 21: Numerical Methods Golden Section Search Method - Theory nm.mathforcollege

You are free to Share – to copy, distribute,

display and perform the work to Remix – to make derivative works

Page 22: Numerical Methods Golden Section Search Method - Theory nm.mathforcollege

Under the following conditions Attribution — You must attribute the

work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work).

Noncommercial — You may not use this work for commercial purposes.

Share Alike — If you alter, transform, or build upon this work, you may distribute the resulting work only under the same or similar license to this one.

Page 23: Numerical Methods Golden Section Search Method - Theory nm.mathforcollege

23

Example

The cross-sectional area A of a gutter with equal base and edge length of 2 is given by (trapezoidal area):

)2sin(2sin4)cos1(sin4)(. AfMax

05.0

.

Find the angle which maximizes the cross-sectional area of the gutter. Using an initial interval of find the solution after 2 iterations.Convergence achieved if “ interval length ” is within

]2

,0[

2

2

2

http://nm.mathforcollege.com

Page 24: Numerical Methods Golden Section Search Method - Theory nm.mathforcollege

24

Solution)cos1(sin4)( f

60000.0)5708.1(2

155708.1)(2

15

97080.0)5708.1(2

150)(2

15

2

1

Luu

LuL

xxxx

xxxx

The function to be maximized is

Iteration 1: Given the values for the boundaries of we can calculate the initial intermediate points as follows:

2/ 0 uL xandx

1654.5)97080.0( f

1227.4)60000.0( f

X2XLX1 Xu

f2f1

XL=X2X2=X1 Xu

X1=?

http://nm.mathforcollege.com

Page 25: Numerical Methods Golden Section Search Method - Theory nm.mathforcollege

25

Solution Cont2000.1)60000.05708.1(

21560000.0)(

215

1

LuL xxxx

To check the stopping criteria the difference between and is calculated to be

uxLx

97080.060000.05708.1 Lu xx

http://nm.mathforcollege.com

Page 26: Numerical Methods Golden Section Search Method - Theory nm.mathforcollege

26

Solution ContIteration 2

97080.02000.15708.160000.0

2

1

xxxx

u

L

0791.5)2000.1( f

1654.5)97080.0( f

)()( 21 xfxf

82918.0)6000.02000.1(2

152000.1)(2

152

Luu xxxx

XLX2 XuX1

97080.02000.160000.0

1

xxx

u

L

9000.06000.02000.12

Lu xx

http://nm.mathforcollege.com

Page 27: Numerical Methods Golden Section Search Method - Theory nm.mathforcollege

27

Theoretical Solution and Convergence

Iteration xl xu x1 x2 f(x1) f(x2) 1 0.0000 1.5714 0.9712 0.6002 5.1657 4.1238 1.57142 0.6002 1.5714 1.2005 0.9712 5.0784 5.1657 0.97123 0.6002 1.2005 0.9712 0.8295 5.1657 4.9426 0.60024 0.8295 1.2005 1.0588 0.9712 5.1955 5.1657 0.37105 0.9712 1.2005 1.1129 1.0588 5.1740 5.1955 0.22936 0.9712 1.1129 1.0588 1.0253 5.1955 5.1937 0.14177 1.0253 1.1129 1.0794 1.0588 5.1908 5.1955 0.08768 1.0253 1.0794 1.0588 1.0460 5.1955 5.1961 0.05419 1.0253 1.0588 1.0460 1.0381 5.1961 5.1957 0.0334

0420.12

0588.10253.12

Lu xx 1960.5)0420.1( f

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.

http://nm.mathforcollege.com

Page 28: Numerical Methods Golden Section Search Method - Theory nm.mathforcollege

THE END

http://nm.mathforcollege.com

Page 29: Numerical Methods Golden Section Search Method - Theory nm.mathforcollege

This instructional power point brought to you byNumerical Methods for STEM undergraduatehttp://nm.mathforcollege.comCommitted to bringing numerical methods to the undergraduate

Acknowledgement

Page 30: Numerical Methods Golden Section Search Method - Theory nm.mathforcollege

For instructional videos on other topics, go to

http://nm.mathforcollege.com

This material is based upon work supported by the National Science Foundation under Grant # 0717624. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the National Science Foundation.

Page 31: Numerical Methods Golden Section Search Method - Theory nm.mathforcollege

The End - Really