Homework 5 Solution
1. Consider the following function:
f
(
x
) = 1 + 4
x

2
x
2
+ cos
x
(a) [2pt] Find an maximum using three iterations of the Golden Section search with initial
guesses
x
l
=

5 and
x
u
= 5.
(b) [2pt] Find an maximum using three iterations of quadratic interpolation with initial
guesses
x
0
=

5
, x
1
=

2, and
x
2
= 3.
(c) [2pt] Find an maximum using three iterations of the Newton’s method with an initial
value
x
0
= 5.
Solution.
(a) Golden Section Method
Iteration 1:Given initial guesses
x
l
=

5
, x
u
= 5
d
=
√
5

1
2
(
x
u

x
l
) = 6
.
18
x
1
=
x
l
+
d
=

5 + 6
.
18 = 1
.
18
, x
2
=
x
u

d
=

1
.
18
f
(
x
1
) = 3
.
3161
, f
(
x
2
) =

6
.
1239
f
(
x
2
)is smaller,let
x
l
=
x
2
=

1
.
18
, x
2
=
x
1
= 1
.
18
Iteration 2:
d
=
√
5

1
2
(
x
u

x
l
) = 3
.
8195
x
1
=
x
l
+
d
= 2
.
6395
, f
(
x
1
) =

3
.
2521
f
(
x
1
)is smaller,let
x
u
=
x
1
= 2
.
6395
, x
1
=
x
2
= 1
.
18
Iteration 3:
d
=
√
5

1
2
(
x
u

x
l
) = 2
.
3606
x
2
=
x
u

d
= 0
.
2789
f
(
x
2
) =
f
(0
.
2789) = 2
.
9214
, f
(
x
2
)is smaller,let
x
l
=
x
2
= 0
.
2789. Now the maxima
is limited within the range[0.2789,2.6395].
(b) Quadratic interpolation
Iteration 1:
Given
x
0
=

5
, x
1
=

2
, x
2
= 3 with
f
(
x
1
) =

15
.
4161
x
3
=
1
2
f
(
x
0
)(
x
2
1

x
2
2
) +
f
(
x
1
)(
x
2
2

x
2
0
) +
f
(
x
2
)(
x
2
0

x
2
1
)
f
(
x
0
)(
x
1

x
2
) +
f
(
x
1
)(
x
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
This is the end of the preview.
Sign up
to
access the rest of the document.
 Spring '11
 LEE
 Optimization, Xu, Golden ratio, Golden section search

Click to edit the document details