Professional Documents
Culture Documents
Draw the level sets C1 = {x : f1 (x) = 12} and C2 = {x : f2 (x) = 16} on the same
set of axes. Identify on the diagram the set of x such that f (x) = [12, 16]T .
Solution: The p solution is obtained using Matlab. The set C1 is the set of x such
that x2 = ± x21 − 12. The set C2 is the set of x such that x2 = 8/x1 . For x1 6= 0 the
intersection of these two level sets is the set of points x such that x21 −12−64/x21 = 0.
Let y = x21 . Then the set of x such that x21 − 12 − 64/x21 = 0 corresponds to
The imaginary roots are x1 = ±2j. The real roots are x1 = ±4. The corresponding
real values of x2 are ±2.
The intersecting level sets are shown in Figure 1.
Figure 1 was generated by the following script:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%
%%%%% ECE569 Fall 2015, IUPUI
%%%%% Plot of Intersecting Level Sets for Problem 5.9 of Chong
%%%%% and Zak 4th ed.
%%%%% c. 2015 S. Koskie
%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
clf
clear x1a x1b x1c x2f1p1 x2f1p2 x2f1n1 x2f1n2 x2f2
x1a = -8:.01:-3.46;
x2f1p1 = real(sqrt(x1a.^2-12));
x2f1n1 = -real(sqrt(x1a.^2-12));
ECE580 Fall 2015 Solution to Problem Set 2 October 5, 2015 2
2
x2
−2
−4
f (x ,x ) = 2x x = 16
2 1 2 1 2
−6
2015 S. Koskie
−8
−8 −6 −4 −2 0 2 4 6 8
x1
x1b = 3.46:.01:8;
x2f1n2 = -real(sqrt(x1b.^2-12));
x2f1p2 = real(sqrt(x1b.^2-12));
x1c = -8:.01:8;
x2f2 = 16./(2*x1c);
figure(5)
plot(x1a,x2f1p1,’b’)
hold
plot(x1a,x2f1n1,’b’)
plot(x1b,x2f1n2,’b’)
plot(x1b,x2f1p2,’b’)
plot(x1c,x2f2,’r’)
axis([-8,8,-8,8])
xlabel(’x_1’)
ylabel(’x_2’)
title(’Problem 5.9 Intersecting Level Sets’)
text(-5,5,’\color{blue}f_1(x_1,x_2) = x_1^2 - x_2^2 = 12’);
text(-1,-5,’\color{red}f_2(x_1,x_2) = 2x_1x_2 = 16’)
text(4,-7.5,’\copyright 2015 S. Koskie’)
grid
print -depsc p5p9.eps
hold
T
(a) f (x) = x1 e−x2 + x2 + 1 and x0 = 1 0 .
Solution:
We need the following factors that occur in the terms of the zeroth to second
order terms of the Taylor series.
f (x0 ) = 1 + 0 + 1 = 2.
h i
∂f ∂f
e−x2 (−x1 e−x2 + 1)
Df (x) = ∂x1 ∂x2 =
so
Df (x0 ) = 1 (−1 + 1) = 1 0 .
∂2f ∂2f
" #
−e−x2
2 ∂x21 ∂x1 ∂x2 0
F (x) = D f (x) = ∂2f ∂2f =
−e−x2 x1 e−x2
∂x1 ∂x2 ∂x22
so
0 −1
F (x0 ) = .
−1 1
Thus near x0
We check that the right hand side (rhs) equals f (x0 ) at x0 . The value of the
rhs is 1 + 1 − 0 + 0 + 0 = 2 as expected.
T
(b) f (x) = x41 + 2x21 x22 + x42 and x0 = 1 1 .
Solution: We simplify this by noting that f (x) = (x21 + x22 )2 . Thus
f (x0 ) = 22 = 4.
Df (x) = 22 x1 (x21 + x22 ) 22 x2 (x21 + x22 )
so
Df (x0 ) = 8 8 .
4(3x21 + x22 ) 8x1 x2
F (x) =
8x1 x2 4(x21 + 3x22 )
ECE580 Fall 2015 Solution to Problem Set 2 October 5, 2015 4
so
16 8
F (x0 ) = .
8 16
Thus near x0
We check that the right hand side (rhs) equals f (x0 ) at x0 . The value of the
rhs is 12 − 32 + 24 = 4 as expected.
T
(c) f (x) = ex1 −x2 + ex1 +x2 + x1 + x2 + 1 and x0 = 1 0 .
so
Df (x0 ) = 2e + 1 1 .
ex1 (e−x2 + ex2 ) ex1 (−e−x2 + ex2 )
F (x) =
ex1 (−e−x2 + ex2 ) ex1 (e−x2 + ex2 )
so
2e 0
F (x0 ) = .
0 2e
Thus near x0
We check that the right hand side (rhs) equals f (x0 ) at x0 . The value of the
rhs is 1 + e + 1 + 0 + e + 0 = 2(e + 1) as expected.
ECE580 Fall 2015 Solution to Problem Set 2 October 5, 2015 5
dT ∇f (x∗ ) = d1 + d2 .
dT ∇f (x∗ ) = d1 ≥ 0,
The Hessian is
2 1 3
D f =2 ,
3 7
which is a constant, so independent of x0 .
(b) Find the directional derivative of f at x0 with respect to a unit vector in the
direction of maximal rate of increase.
Solution: The direction of maximum increase of f at a point is the value of
the gradient at that point, in this case ∇f (x0 ). The directional derivative with
along the direction d is
∂f
(x) = dT ∇f (x)
∂d
. Normalizing, we obtain
ˆ
p 1 11 1 11
d = ∇f (x0 )/ (∇f (x0 )) ∇f (x0 ) = √
T =√ .
121 + 625 25 746 25
Thus the directional derivative with respect to a unit vector along the maximal
rate of increase is
(∇f (x))T ∇f (x) p
p = (∇f (x))T ∇f (x). (4)
(∇f (x))T ∇f (x)
At x0 we have
∂f √
(x0 ) = 746
∂ dˆ
.
ECE580 Fall 2015 Solution to Problem Set 2 October 5, 2015 7
(c) Find a point that satisfies the FONC and determine whether it satisfies the
SONC.
Solution: Such a point must satisfy ∇f (x) = 0, so we need
∗
1 3 x1 3
∇f (x0 ) = 2 ∗ + = 0.
3 7 x2 5
T
One such x∗ =
3/2 −1 .
2 6
To determine whether it satisfies the SONC we must determine whether
6 14
is positive definite. Solving for the eigenvalues we obtain
s−2 −6 2
−6 s − 14 = (s − 2)(s − 14) − 36 = s − 16s − 12.
so the matrix is indefinite and the point does not satisfy the SONC. A more
efficient way to determine this for a two by two matrix is to take the deter-
minant. The determinant is the product of the eigenvalues, so being negative
indicates that the two eigenvalues have opposite signs.
Because the inverse exists, the result is unique. The SONC is not satisfied
because the determinant of the Hessian is negative, so the two by two matrix
has one positive and one negative eigenvalue, hence is indefinite. Accordingly,
f does not have a minimizer.
T 8 0
Now so long as d2 ≤ 2d1 , we will have d d ≥ 0 so the SONC is
0 −2
satisfied.
(c) Is the point x∗ = 0 a local minimizer of f over Ω?
A local minimizer of f over Ω, could occur anywhere on the boundary or the
interior of Ω. Because the Hessian is indefinite everywhere, the minimizer does
not occur in the interior of Ω. If we check the section of the boundary along
the x1 axis, the FONC is satisfied for any direction vector that has d2 = 0.
However, this does not cover all feasible directions, so the FONC is not satisfied
for nonzero points on the positive x1 axis. The last section of the boundary is
the curve x2 = x21 + 2x1 . (x21 + 2x1 )2 = x41 + 4x31 + 4x21 , so on this boundary,
f (x) = 4x21 − 2(x21 + 2x1 )2 = −2x41 − 8x31 , which is negative for all positive x1
as one approaches the origin along the curve. Thus the origin is not a local
minimizer of f over Ω.
(b) Find an initial condition x(0) such that the algorithm cycles, specifically such
that
x(0) = x(2) = x(4) = · · · .
Solution The graph of sinh x is odd, i.e. sinh(−x) = − sinh(x), see Figure 2.
Thus for the algorithm to cycle such that x(2k) = x(0) for all nonnegative
integers k, we need x(k+1) = −x(k) . This is true when
0.5
sinh(x)
−0.5
−1
−1.5
−10 −8 −6 −4 −2 0 2 4 6 8 10
x
(0)
(c) If kx0 k > x∗ , then kx(k+1) k > kx(k) k for all nonnegative integers k and the
sequence generated by the algorithm diverges. Examples of convergence, cy-
cling, and divergence are shown in Figures 3 through 5. This is a good example
showing why a picture is not a proof. The value of x(0) used for the cycling
example is an approximation, chosen carefully so that the algorithm would ap-
pear to cycle for the ten iterations shown. It converges or diverges later. It is
(0)
likely that the actual value of x∗ is irrational so can never be captured with
finite precision.
7.10
ECE580 Fall 2015 Solution to Problem Set 2 October 5, 2015 11
(0)
Newton Algorithm Converging for x =2
2
1.5
0.5
x(k)
−0.5
−1
−1.5
−2
1 2 3 4 5 6 7 8 9 10 11
k
(0)
Newton Algorithm Cycling for x = 2.177319
2.5
1.5
0.5
x(k)
−0.5
−1
−1.5
−2
−2.5
1 2 3 4 5 6 7 8 9 10 11
k
(0)
Newton Algorithm Diverging for x = 2.177348
250
200
150
x(k)
100
50
−50
1 2 3 4 5 6 7 8 9 10 11
k