of 18

• date post

02-Jun-2018
• Category

## Documents

• view

218

0

Embed Size (px)

### Transcript of Lecture Week8 Q

• 8/10/2019 Lecture Week8 Q

1/18

Tutorial - week9

To minimiz2 2 2

-

with the starting poi nt ( ) ( ) by

, ,

, , ,

,

,0 0 0

-

x y z 0 0 0

( )1 Steepest Descent Method

( )2 Conjugate Gradient ethM od

• 8/10/2019 Lecture Week8 Q

2/18

calculating by:( ) , , , FirstlyT

f x y zSolution1

- -

- -( )- -

, , , ,

, , , ,T

0 0 0 0 0 0 0 0 0 0 0

- -

r f x y z 2x - y 1 2y x z 2z - y 1

.- -, ,

T1 0 1

finding which ( )byminimizes

,Next 0 00 f x r

x

- - x r 0 0 0 1 0 1

, ,- - 0

( ) ( ) (-( )

-

) ( )-

- - - - - -

, , , , , ,1 1 1 0 0 0 0

2 2 2 2

0 f x y z f x y z r f q

-

( ) ( ).

--

2q 2 2

4 2d 1

d

0

2d d

• 8/10/2019 Lecture Week8 Q

3/18

- - - -

( )

Therefore

1 1 11 - con.

, take the negative gradient to find the next search direction:

Thirdly

2 2 2

- -( - -) , , , ,1 1 1 1 1 1 1 1 1 1

r f x y z 2x - y 1 2y x z 2z - y

T

1

1

( ) ( )- ( )- ( ) ( )- - - - .-, , , ,

T2 - 1 2 2 - 1 0 1 0

1 1 1 10 0 0 -

2 2 2 2

, update the iteration formula byThen

( ) ( -) -, , , , ,, , ,

2 2 2 1 1 1 1x y z x y z r 0 0 1 02 2

-

-- ., , 2

-2

• 8/10/2019 Lecture Week8 Q

4/18

we( have) ,Thus1 - con.

( ) (- - ) ( ).( ) ( ), , , , , ,2 2 2 1 1 1 1x y z f x y z r f q2 2

-

( ) (- ) (- )( ( )) ( ) ( )(- ) (- ) (- )-2 2 2q 1 -

2 2 2 2 2

- - -

.- -2

2

( )- -

( )-Set

2

1

ddq 12 1 2 0

( , ,2 2x y () -) -, , , , , ,

2 1 1 1 11

1 1

z x y z r 0 0 1

1

- 0

.-- -, , 1 1 1

• 8/10/2019 Lecture Week8 Q

5/18

the negative gradient to find( ) Take1 - con.

( ) - -- -, , , ,2 2 2 2 2 2 2 2 2 2 2T

r f x y z 2x - y 1 2y x z 2z - y 1

( ) ( ) ( )- (- - - - - )- - - -( ) ( ) ( ), ,

2 -

2 2 2 2 2 2

1 2 2 - 1

2

- - ., ,

10

2

1

2

update the iter,Again ation formula by

( ) - - - - -)( , , , , , , , ,

3 3 3 2 2 2 2 x y z x y z r 02 2 2 2 2

- ( ) - - ( .), ,

1 1 1

1 12 2

2

• 8/10/2019 Lecture Week8 Q

6/18

( ) , we obtainThus1 - con.

- ( ) - - ( ) ( ).( ), , , ,

3 3 3f x y z f 1 q2

1 2 2

- ( ) - ( )( ) ( ( )) ( )- -

2

2

q 1 -

1 1

1 1

1

2 2

1

2 2

- -- --

21 1 1

1 1 1 1

2

2 2 212

3 1

-2

2 4

1 3 1

( )-

- . 2d

1 1

q 2 2

04

• 8/10/2019 Lecture Week8 Q

7/18

( )( ) ( ), , , ,Thus 3 3 3 2 2 2 22x y z x y z r1 - con.

- - -- - - - - ., , , , , ,

1 3 1 32 4

1 1 1 1 102 2 2 2 2 2 4

the next search direction:FindT

-- - -, , , ,3 3 3 3 3 3 3 3 3 33- -

- - - - - - - -- -

T

2 - 1 2 2 - 13 1 1 3 3 3 1

T

14 2 2 4 4 4 2

-, , , , , ,

4 4 4 3 3 3 32

3 1 3 1 313

-- - - - ., , , , , , , ,

4 4 424 2 4 2 44

• 8/10/2019 Lecture Week8 Q

8/18

by( ) Find2 2 2

31 - con.

.-, ,

4 4 4 4 4 4 4 4 4 4 4

2

21 1

-

3 3

- - - -

2

q -2

4 4

( ) - - -- ( )-

3 3 3

4 4 4

1 1

2

( ) - -21 3 9

1

( ) - - 21 3 9

1 d

.- 3d

22 4d

0

• 8/10/2019 Lecture Week8 Q

9/18

( ) ( ) ( ), , , , ,Thus 4 4 4 3 3 3 331 x y z x y z r- con.

-- -- - ., , , , , ,

0 04 2 4 2 42 4 4

the next search direction:

- ---

FindT

- -

-

, , , ,4 4 4 4 4 44 4 4 4 4

2

- - - -- -- - -, ,

T3 3 33 3

- 1 2 2 - 13 3

T 4 4 44 4

1 14 4

, , , , , ,

5 5 5 4 4 4 4

4 4

- - - ( ) .- ( ) -, , , , , ,

0 34 4 4 4 4

4

344

• 8/10/2019 Lecture Week8 Q

10/18

.

( ) by

-, ,

Find2 2 2

4

x z x x 1 - z z z

1

- con.

( ) ( ( )) ( )- ( ) - ( ) - -

2

2q 1 -3 31 1

3 3

2

1 1 13

- - --- 4 4 4

1 7

4

51

- -8 8

16

1 7 51

( )- -

- .

4

q 1 18 8 16

0

1

d

- - - - - .

Thus3 3 3 1 1 7

x 01 7 3

4 2 84 4 84 4 4

• 8/10/2019 Lecture Week8 Q

11/18

the next search direction:( ) FindT

1 - con.

- -

( ) ( ) ( )- ( )- ( ) ( ) ( )- - -

- -

- - .- - --

, , , ,

, , , ,

5 5 5 5 5 5 5 5 5 5 5T T- -

7 7 12 -

7 71 2 2 - 1 0 0

3 3 3

( ) ( ) -, , , ,6 6 6 5 5 5 57

x y z x y rz

- - -, , , ,

3 7 1

0 0

- - .- ( ), ,

7

8

1 3

7

84

by ( ) ( ) ( ).-, ,Find 2 2 26 6 6 6 6 6 6 6 6 6 6 52

f x y z x x 1 - y y y z z z q

- -( ) ( ( )) ( )- ( ) - ( )

28 8

q 1 3 34 4

-

- ( ) - - -- ( () .- - )

27 7 7 1 7 4938 8 8 16 16 32

4

3 1

• 8/10/2019 Lecture Week8 Q

12/18

- - 21 7 49

( )( -) q 1 116 16 32 08 16

dd d

1 - con.

( ) ( ), , , ,6 6 6 5 5 5 55 5x y z x y z r1

2

- - - ., , , , , ,

7 3 7 1 7 7 7 0 0

8 4 8 4 8 8 8

1

2

( ) is no, ,Since 6 6 6x y z t very close to ( ) ( ), , , , ,x y z - 1 -1 -1

• 8/10/2019 Lecture Week8 Q

13/18

1-

6 2.

- -( ) ( ), , , , , , , ,

7 7 7 6 6 6 6 6x y z x y z r 08 8 8 8 8

2

- ., ,

15 7 15

16 8 16

- - -( ) ( ) -, , , , , , , 8 8 8 7 7 77 7 715 7 15

x y z x y z r 0 , 1

0

- ( ) -- ., , 15 151

7

• 8/10/2019 Lecture Week8 Q

14/18

by ( )( ) , ,Find 8 8 87 f x y z1 - con.

( )- ( )- ( ) ( )- - - ., , 2 f q 716 64 64 128

16

78

-( -)( )

2

7

7q

64 64 128 0

d 1

d

( ) - - - --, , , , , , ,

7

15 7 15 1 15x y z 0 0

1 .- -,

15 15

we think that ( ) is very close to ( ) ( ) , , , , , , ,If 8 8 8x y z x y z - 1 -1 -1

we can check the by evaluating

- -( ), , , ,

convergence criteria

88 8 8 88 8 88 82y x2x - y 1f x y z 2z -z y 1

,1 16 0 ( ) ( ) ( ) ., ,2 2 21 161 16 1 16 2 16 0 0880 4

may take it to be close enough to solution in

.

We Example 2.

• 8/10/2019 Lecture Week8 Q

15/18

:( )Soluti2 on

we can rewr te to a qua ract c orm y, , ,rst y

T T

x y z1

, ,

2

( ), , , , ,

x y y -1 2 -1 y 1 0 1 y2 z z0 -1 2

2 -1 0- -

-1,

0 -1 2 .

-1

• 8/10/2019 Lecture Week8 Q

16/18

the begining of iterations, we calculate the residual

vector from

( ) At

r x

2 - con.

.- 0 0 0

-1 2 -1 0 0 -1 r b - Ax r 0 -1 2 -1 0 0

- - -

we use as our i i in t,Next0

r al search direction and compute,0 0

p

, ,

T

0 0

--1 0 -1 0

-1r r 2 1

.

, ,

T

0 0

0

2 -1 0 -1p Ap 4-1 0 -1 -1 2 -1 0

2

can now compu e ( ) ( )t , , , ,We1 1 1 0 00 0 0

- -

x y z x y z p

( ) .- - - -, , , , , ,

10

1 10

2 2 20 0 1 0 1

resu comp e es e rs era on.s

• 8/10/2019 Lecture Week8 Q

17/18

we can compute( ) So-1 2 -1 0 -1 0

2 - con.

,

1 0 00 r r - Ap 0 - -1 2 -1 0 -1-1 0 -1

2 2 -1 0

computing the scalar and the next search direction, .Next0 1

p

TT - -0

and,, , , ,

, , , ,

1

0

1 1

TT

0 0T

r r -1 0 -1 -1 0 -1 2

., , , , , , 0

T T

1 1 0 p r p 0 -1 0 -1 0 -1 - -1 -2 2 2

.

, , , ,

1 1

TT

1 1 0 -1 0 0 -1 0r r

1

, ,

T

1

1

12 -1 0p Ap 1 1

- -1 - -1 2 -1

.

, ,

T

- -1 -11 1

-

• 8/10/2019 Lecture Week8 Q

18/18

( ) 2 - con.

we can find ( ) by, , ,Using 2 2 21 x y z

, , , ,2 2 2 1 1 1 11

1 1 1 1

- - - - - - - - ., , , , , , 2 2 2 2

( ) is the point of ( ).minimum, , , ,2 2 2x y z f x y z , , .