程序代写案例-GR5410

欢迎使用51辅导,51作业君孵化低价透明的学长辅导平台,服务保持优质,平均费用压低50%以上! 51fudao.top
Columbia University
Department of Economics
Economics – GR5410: Mathematical Methods in Economics
Homework 3 – Solutions
Exercise 1 (21 points)
Consider the following nonlinear programming problem: max 2x + y − 13x3 − xy − y2 subject to x ≥
1
4 , x+ y ≤ 3.
(a) Write down the KKT conditions for this problem.
(b) Explain, and show, why the KKT conditions in part (a) are sufficient for optimality in this problem.
(c) Find the solution to this problem. Show all your work and explain your answer.
Solution :
(a) The Lagrangian for this problem is :
L = 2x+ y − 1
3
x3 − xy − y2 − µ1
(
1
4
− x
)
− µ2(x+ y − 3)
hence the KKT conditions are :
2− x2 − y + µ1 − µ2 = 0
1− x− 2y − µ2 = 0
µ1
(
1
4
− x
)
= 0
µ2(x+ y − 3) = 0
µ1, µ2 ≥ 0
x ≥ 1
4
x+ y ≤ 3
These necessarily hold because the constraint qualification holds, i.e. ∇g1 = (−1, 0) and ∇g2 = (1, 1)
are linearly independent.
(b) The KKT conditions are sufficient because we are maximizing over a convex set and the Lagrangian is
concave in (x, y) over the constraint set – indeed its hessian (with respect to (x, y)) is given by :
HL(x, y) =
(−2x −1
−1 −2
)
and HL(x, y) = 4x− 1 ≥ 0 since x ≥ 1/4 ; −2x,−2 < 0.
(c) Consider the following cases :
i. µ1 = µ2 = 0. Then from the KKT conditions 2 − x2 − y = 0 and 1 − x − 2y = 0 ; substituting
yields y = 1−x2 and simplifying gives 2x
2−x−3 = 0 so x = 32 and y = − 14 . This solutions satisfies
all necessary condition and is the maximizer – the corresponding maximum is 3116 .
ii. µ1, µ2 > 0. Then from the KKT conditions x =
1
4 and y =
11
4 so µ2 = 1 − x − 2y = − 194 < 0
yielding a contradiction.
iii. µ1 = 0, µ2 > 0. Then from the KKT conditions 1− x− 2y = 2− x2 − y and x+ y − 3 = 0, which
gives x = 2, y = 1 and µ2 = 1− x− 2y = −3 < 0, a contradiction.
1
iv. µ1 > 0, µ2 = 0. Then from the KKT conditions x =
1
4 and 1 − x − 2y = 0 so y = 38 and
µ1 = x
2 + y − 2 = − 2516 < 0, a contradiction.
We conclude that the unique maximizer is
(
3
2 ,− 14
)
.
Exercise 2 (21 points)
Compute the following Riemann integrals:
(a)
∫ 1
−1
x5
x2+1 dx
(b)
∫∞
1
(lnx)4
x2 dx
(c)
∫ 1
0
∫ 1
0
1
1−x2y2 dxdy
Solution :
(a) We have : ∫ 1
−1
x5
x2 + 1
dx = 0
since f : x 7→ x5x2+1 is an odd function i.e f(x) = f(−x) for all x and the integral of an odd function
over a symmetric interval around zero is zero.
(b) We have : ∫ ∞
1
(lnx)4
x2
dx = 24
This follows from substituting lnx = y and using integration by parts.
(c) We have : ∫ 1
0
∫ 1
0
1
1− x2y2 dxdy =
∫ 1
0
∫ 1
0
∞∑
n=0
(xy)2n dxdy
=
∞∑
n=0
1
(2n+ 1)2
=
pi2
8
Where we used that : ∫ 1
0
∫ 1
0
xnyn dxdy =
1
(n+ 1)2
and :
∞∑
n=0
1
(2n+ 1)2
=
∞∑
n=1
1
n2

∞∑
n=1
1
(2n)2
=
pi2
6
− 1
4
pi2
6
=
pi2
8
Exercise 3 (35 points)
This question introduces the Gamma and Beta functions, which are associated with the Gamma and
Beta distributions often used in statistics.
2
(a) For t > 0, define the gamma function Γ(t) =
∫∞
0
e−xxt−1 dx. Using the integration by parts, show
that Γ(t+ 1) = tΓ(t). What is the value of Γ(n) for a given positive integer n?
(b) Using substitution show that Γ(1/2) =

pi
(c) Next, for α, β > 0, define the Beta function B(α, β) =
∫ 1
0
uα−1(1 − u)β−1 du. Show that B(α, β) =
Γ(α)Γ(β)
Γ(α+β) using the following argument:
Write B(α, β)Γ(α+β) =
∫∞
0
∫ 1
0
e−xxα+β−1uα−1(1−u)β−1 dudx. Apply change of variables to x = y+z
and u = yy+z
find the Jacobian matrix of this mapping, and show that the resulting integral becomes
∫∞
0
∫∞
0
e−yyα−1e−zzβ−1 dydz =
Γ(α)Γ(β)
(d) What is the value of B( 32
5
2 )?
Solution :
(a) Directly using integration by part on Γ(t+ 1) =
∫∞
0
e−xxt dx yields :∫ ∞
0
e−xxtdx =
[
e−xxt
]∞
0
+
∫ ∞
0
e−xtxt−1dx
= tΓ(t)
which proves the result. Furthermore it can be shown using this relation Γ(t + 1) = tΓ(t) and an
induction argument (or the definition of factorials) that Γ(n) = (n− 1)! for all n ∈ N.
(b) Γ(1/2) =

pi can be shown directly using the change of variable x = y2 and the fact that
∫∞
0
e−t
2
=
1
2

pi directly in the expression for Γ(1/2).
(c) This follows directly from applying the suggested hint.
(d) From the previous question we now know that :
B(α, β) =
Γ(α)Γ(β)
Γ(α+ β)
Using the formulas to obtain Γ recursively and the expression we found for Γ(1/2) gives :
B
(
3
2
,
5
2
)
=
Γ( 32 )Γ(
5
2 )
Γ(4)
=
pi
16
Exercise 4 (25 points)
Consider maximizing x3+y3+z3+w3 subject to the constraints x+y+z+w = 6 and x2+y2+z2+w2 = 10.
(a) Write down the Lagrangian of this constrained maximization problem. Derive the first-order conditions.
(b) Explain the necessity of the Lagrangian method.
(c) Show that at any maximizer, x, y, z, w can take at most two values. Deduce that it is without loss to
assume either x = y = z holds, or x = y and z = w both hold.
(d) Find the maximizer.
3
Solution :
(a) The Lagrangian is given by :
L = x3 + y3 + z3 + w3 − λ(x+ y + z + w − 6)− µ(x2 + y2 + z2 + w2 − 10)
First order conditions are :
3x2 − λ− 2µx = 0
3y2 − λ− 2µy = 0
3z2 − λ− 2µz = 0
3w2 − λ− 2µw = 0
x+ y + z + w = 6
x2 + y2 + z2 + w2 = 10
(b) Denote g1(x, y, z, w) := x+ y + z + w and g2(x, y, z, w) := x
2 + y2 + z2 + w2. Observe that :
∇g1(x, y, z, w) =

1
1
1
1

∇g1(x, y, z, w) =

2x
2y
2z
2w

i.e ∇g1 and ∇g2 are colinear if and only if x = y = z = w. Assume that the constraint qualification fails
at some candidate point (x, y, z, w) verifying the constraints g1(x, y, z, w) = 6 and g2(x, y, z, w) = 10
; from the previous point and substituting in the constraint x = y = z = w = 3/2. Straightforwardly
verify that 4 × (3/2)2 = 9 6= 10 i.e the second constraint is violated, a contradiction. This that the
constraint qualification condition holds at all candidate points hence the first order conditions are
necessary conditions in the above problem.
(c) Observe that in the first order conditions above all variables are zeroes of the same second order
polynomial, hence they can take at most two values. Furthermore they cannot all be equal from the
previous point – since they all solve the same second-order equation and the constraint is symmetric
under relabeling, the solution is symmetric under relabeling (renaming variables do not alter the
solution). Combined, this entails that there are only two possible cases for a solution : either three
variables are equal and different from the last one – without loss of generality say x = y = z 6= w –
or two pairs of variables are equal within the pair and different from the other pair – without loss of
generality say x = y 6= z = w. All other cases are straightforward to rule out or equivalent by the
arguments just outlined.
(d) Consider the two cases delineated in the previous question :
• If x = y = z 6= w, then from the constraints we have :
3x+ w = 6
3x2 + w2 = 10
i.e w = 6−3x, hence 3x2 +(6−3x)2 = 10 i.e expanding and simplifying x must verify 6x2−18x+
13 = 0. Observe that the discriminant of this second order polynomial is 182−4×6×13 = 12 > 0
i.e there are two real roots 18±

12
12 =
9±√3
6 . This means that there are two candidates solutions
for this case :
4
– x = y = z = 9+

3
6 and w = 3 − 9+

3
6 (observe that first order conditions pin down corre-
sponding multipliers). This gives a value of approximately 17.42.
– x = y = z = 9−

3
6 and w = 3 − 9−

3
6 (observe that first order conditions pin down corre-
sponding multipliers). This gives a value of approximately 18.58.
• If x = y 6= z = w , then from the constraints we have :
2x+ 2w = 6
2x2 + 2w2 = 10
i.e w = 3−x, hence x2−(3−x)2 = 5 i.e expanding and simplifying x must verify 2x2−6x+4 = 0.
The discriminant of this second order polynomial is 36−4×2×4 = 4 > 0 i.e there are two possible
values for x ∈ {2, 1}. Observe that if x = 2, w = 1 and if x = 1, w = 2 so this gives a unique
solution up to relabeling of x and w. Observe that this also pins down λ = −6 and µ = 9/2
from the first order conditions. Without loss of generality, take the only candidate solution to be
x = y = 1, z = w = 2.
Observe that there must exist a minimizer because we are maximizing a continuous function over a
compact and convex set – and because the constraint qualification always holds it must be one of those
candidate points (clearly the solution must be interior). From direct comparison it is clear that the
maximizer is given (up to a relabeling) by x = y = z = 9−

3
6 and w = 3− 9−

3
6 .
5

欢迎咨询51作业君
51作业君

Email:51zuoyejun

@gmail.com

添加客服微信: abby12468