Solutions

Solutions to Homework 1
February 24, 2010
1. Bertsekas 1.1.1: Given the function
f (x, y) = x2 + y 2 + βxy + x + 2y,
we need to determine which of its stationary points are minima. From the set of necessary conditions ∇f = 0,
we get
2x + βy
βx + 2y
= −1
= −2.
When these simultaneous equations are solved for (x, y), we obtain
x=
4−β
2(1 − β)
,y=
.
(β + 2)(β − 2)
(β + 2)(β − 2)
The sufficient conditions for a minimum require that the Hessian ∇2 f be positive definite. From this
condition, we obtain
|β| < 2.
When |β| = 2, there are no available solutions for the pair (x∗ , y ∗ ).
2. Bertsekas 1.1.2:
(a) The function f (x, y) = (x2 − 4)2 + y 2 has stationary points (0, 0), (2,0) and (-2,0). The point (0,0) is
2
2
a saddle point since ∂∂xf2 < 0 and ∂∂yf2 > 0.
(b) The function f (x, y) = 21 x2 + x cos y has stationary points {(0, (2k + 1) π2 ), k = 0, ±1, ±2. . . .},
{(−1, 2kπ), k = 0, ±1, ±2, . . .} and {(1, (2k+1)π), k = 0, ±1, ±2, . . .}. The sufficient condition for a minimum
requires that
−x cos2 y − sin2 y ≥ 0
which is only satisfied for the sets {(−1, 2kπ), k = 0, ±1, ±2, . . .} and {(1, (2k + 1)π), k = 0, ±1, ±2, . . .}.
(c) Given the function f (x, y) = sin(x) + sin(y) + sin(x + y), the set of stationary points within
{(x, y)|0 < x < 2π, 0 < y < 2π} are given by the equations
cos x + cos(x + y) = 0,
cos y + cos(x + y) = 0.
The solutions within 0 < x < 2π and 0 < y < 2π are (π, π), (π/3, π/3), (5π/3, 5π/3). The matrix of second
derivatives is
− sin x − sin(x + y)
− sin(x + y)
.
− sin(x + y)
− sin y − sin(x + y)
We can easily check that (5π/3, 5π/3) is the only local minimum and that (π/3, π/3) is the only local
maximum. (See attached MATLAB plot).
2 2
2
(d) The
stationary
points of the function f (x, y) = (y − x ) − x are (0, 0). The Hessian at this stationary
−2 0
point is
which implies that the point (0, 0) is a saddle point.
0 2
1
1.8558
1.60
0
0.6 0.8
−0 .123
18 66 1.11
.1 72
59 02
35
23
71
−0
.6
0.3
18
71
58
1
5
09
.36
06
−1
0.12372
2
660
5
0.8
711
.35
−2
83
−1.60
4
−1.113
−1.8558
−2
2
−2.1032
23
72
−0
−1.8558
−1.6083
23
.1
71
4
−0.6
185
8
85
0.61
−
2
72
859
0.
37
09
11
5
2
−0
1.
1.1135
37
.
32
2.10
09
36
12
71
3
12
3
1.36
0.
1.6083
23
0.61
0.8660
0.12372
0.37115
0.61859
0.1
1.8558
2
5
−0.12371
08
1.1135
−1.3609
−0.3711
−0.37115
−0.12371
0.12372
0.37115
3
8
−1.11
34
−0.86
602
1.6
3
0.1
−0.8660
02 134
66 −1.1
09
608
.36
−1
0.
15
−0.12371
.8
85
61
71
−0.3711
9
.3
−0.61858
9
60
1.3
5
−0
−0
−1.
5
−
−1 −1 1.3
.8
6
.
.10 558 608 09
3
32
−2
.3
50
6
83
0.3
6
5
11
37
0.
0
0
5
58
618
−0.
−0.3711
2.1032
32
1
2
3
.1
23
71
−0
−1 −0.8 .618
.11
66 58
02
−1. 34
360
−1.6
083 9
2.10
3
5
9
08
−0
11
85
1.6
.37
61
09
0.
36
−0
0.61859
1.
58
1.3609
85
602
0.86
135
1.1
06
06
1.
83
1.60
58
1.85
2.35
35
2.
1
4
5
0.
86
60
2
0.
12
37
2
6
Figure 1: MATLAB plot of the level sets of the function f (x, y) = sin x + sin y + sin(x + y).
2
(e) Since the unconstrained problem has no local minima, the constrained problem must have minima
2 2
2
on the boundaries y = ±1. Performing 1D calculus on the
√ functions f (x)
√ = (1 − x ) − x and g(x) =
2 2
2
(1 + x ) − x , we see that the minima occur at (0, −1), ( 6/2, 1) and (− 6/2, 1).
3. Bertsekas 1.1.3:
(a) Since the function f (x∗ + αd) is minimized at α = 0 , we must have as a necessary condition that the
derivative w.r.t. α is zero. This gives us ∇f T d = 0 and since this has to be zero for all d, we get ∇f = 0.
(b) Consider the function f (y, z) = (z − py 2 )(z − qy 2 ) where 0 < p < q. For an x∗ = (0, 0), x∗ + αd =
(αd1 , αd2 ). Then
f (αd1 , αd2 ) = α2 d22 − α3 d2 (p + q)d21 + pqα4 d21 d22 .
2
∂ f
∂f
2
= 0, we get α = 0 to be a stationary point. From the condition ∂α
From ∂α
2 ≥ 0, we get 2d2 ≥ 0 which
2
4
is strictly greater than zero for any d2 6= 0. Furthermore f (y, my ) = (m − p)(m − q)y < 0 if y 6= 0 and
p < m < q. Since y can be an arbitrarily small ǫ, we get f (ǫ, mǫ2 ) = (m − p)(m − q)ǫ4 < 0 despite the fact
that (0, 0) is a local minimum along every line passing through the origin. This illustrates that minimization
in a subspace—every line in this case—is not sufficient to be a local minimum in the original space.
4. Bertsekas 1.1.6: We seek to minimize
f (x) =
m
X
i=1
wi kx − yi k
subject to x ∈ Rn and where w1 , . . . , wm are given positive scalars.
(a) First we show that the objective function is convex. We require f (αx1 + (1 − α)x2 ) ≤ αf (x1 ) + (1 −
α)f (x2 ).
f (αx1 + (1 − α)x2 ) =
≤
≤
m
X
i=1
m
X
i=1
wi kαx1 + (1 − α)x2 − yi k
αwi kx1 − yi k +
m
X
i=1
(1 − α)wi kx2 − yi k
αf (x1 ) + (1 − α)f (x2 ).
We have used the triangle inequality in step 2. By Proposition 1.1.2, a local minimum is also a global
minimum.
(b) Since f (x) may not be strictly convex, the global minimum may not be unique.
(c) Assume that the lengths of the m strings are the same (d). Then the height of each string is
hi = h − (d − kx − yi k) where h is the height of the table. Consequently
f (x)
=
=
∝
m
X
i=1
m
X
i=1
m
X
wi kx − yi k
wi (hi − h − d)
wi hi .
i=1
Therefore the minimization of f (x) is equivalent to the minimization of the potential energy
5. Bertsekas 1.1.10: The function
a 2
a2
f (x) = x22 − ax2 kxk2 + kxk4 = kxk2 − x2 + 1 −
>0
2
4
for 0 < a < 2. For the points (−p, q) and (p, q), we have that
f (x) = q 2 − aq(p2 + q 2 ) + (p2 + q 2 )2 .
3
Pm
i=1
wi hi .
We need to show that f (p, q) = f (−p, q) < f (0, q). From direct algebra,
a
a2
f (p, q) − f (0, q) = p2 + 2(q − )2 −
≤0
4
8
a
a
a
a2
3a4
a2
3a2
√
,
we
get
f
(p,
q)
=
−
=
.
For
p
=
and
q
=
for q = a4 and 0 < p ≤ 2√
1
−
= γ. For
4
16
256
16
16
2
2 2
0 < a < 2, γ > 0.
6. Bertsekas 1.2.7: The engineer’s approach basically amounts to a coordinate ascent strategy. She
performs local maximization w.r.t. one variable while holding the other fixed and vice versa. Local maximization w.r.t. one variable is similar to steepest ascent except that the ascent is not clocked: each variable
is separately optimized while holding the other fixed. As long as each step is guaranteed to increase or keep
same the current I, this process will perform a type of ascent on the current. However, one cannot usually
guarantee convergence of each variable to a fixed point.
4