21-256 Exam 3: Lagrange multipliers and integration (sample) Instructions (please read carefully)

21-256 Exam 3: Lagrange multipliers and integration
(sample)
Friday 27th June, 10:30–11:20am
Instructions (please read carefully)
This test is split into two sections of five questions each:
ˆ Section A: Lagrange multipliers
ˆ Section B: Integration
You should attempt exactly eight questions, including at least three questions from each
section. All questions will be marked out of 12. The duration of the test is 50 minutes. Please
write legibly in the blue book provided. Calculators and other electronic devices are not permitted.
Please indicate on the table below which questions you attempted.
Question
A1
Attempted? (X)
Score
A2
A3
A4
A5
B1
B2
B3
B4
B5
Free credit
Total
Name:
4
Section A
For the following maximization (resp. minimization) problems, you may take for granted that if
¯ for which f (¯
the vector equation ∇Λ = 0 has finitely many solutions, then the solution (¯
a; λ)
a)
is greatest (resp. least) is optimal.
A1. Find the values of (x, y, z) which maximize x4 +y 4 +z 4 subject to the constraint x2 +y 2 +z 2 =
1.
Solution. The Lagrangian is
Λ(x, y, z; λ) = x4 + y 4 + z 4 + λ(1 − x2 − y 2 − z 2 )
Setting ∇Λ = 0 gives

3

4x − 2λx


4y 3 − 2λy

4z 3 − 2λz



1 − x2 − y 2 − z 2
=0
=0
=0
=0
Factorizing the first three equations gives
2x(2x2 − λ) = 0,
2y(2y 2 − λ) = 0,
2z(2z 2 − λ) = 0
Since we’re maximizing x4 + y 4 + z 4 , and the smallest value the fourth power of a real
number can take is zero, we may assume not all of x, y, z are zero.
If two are zero. Suppose x = y = 0. Then z 2 = 1 so z = ±1 and x4 +y 4 +z 4 = 1; the same
goes for x = z = 0 and y = z = 0, so all values (x, y, z) = (±1, 0, 0), (0, ±1, 0), (0, 0, ±1) are
critical points of the Lagrangian making the value of the function equal to 1.
If one is zero. Suppose x = 0. Then y 2 = z 2 =
gives
λ
1−2· =0
⇒
2
λ
2,
and substituting into the constraint
λ=1
So (x, y, z) = (0, ± √12 , ± √12 . In this case x4 + y 4 + z 4 = 14 + 14 = 21 , which is less than 1, so
these solutions are not optimal. The same goes for if y = 0 or z = 0.
If none are zero. In this case we must have x2 = y 2 = z 2 =
constraint gives
λ
2
1−3· =0
⇒
λ=
2
3
q
q
q
So (x, y, z) = (± 13 , ± 13 , ± 13 ). In this case, x4 + y 4 + z 4 =
these solutions are not optimal
λ
2.
1
9
+
Substituting into the
1
9
+
1
9
= 13 , so again,
So the maximum value of x4 + y 4 + z 4 subject to x2 + y 2 + z 2 = 1 is 1, which occurs when
(x, y, z) takes one of the values
(1, 0, 0), (−1, 0, 0), (0, 1, 0), (0, −1, 0), (0, 0, 1), (0, 0, −1)
A2. Find the values of (x, y, z) which minimize yz + xy subject to the constraints xy = 1 and
y 2 − z 2 = 1.
Solution. The Lagrangian is
Λ(x, y, z; λ, µ) = −yz − xy + λ(1 − xy) + µ(1 − y 2 − z 2 )
Setting ∇Λ = 0 gives


−y − yλ





−z − x − xλ − 2µy
−y − 2µz


1 − xy




1 − y2 − z2
=0
=0
=0
=0
=0
The first equation gives y(1 + λ) = 0, so either y = 0 or 1 + λ = 0. If y = 0 then the
constraint y 2 − z 2 = 1 cannot be satisfied, so we must have 1 + λ = 0, i.e. λ = −1.
The second equation gives
−z − 2µy = 0
⇒
µ=−
z
2y
⇒
µ=−
y
2z
and the third equation gives
−y − 2µz = 0
Setting these equal to each other and multiplying through by the denominators gives 2z 2 =
2y 2 , so y = ±z. Setting z = ±y in the fifth equation then gives 1 − 2y 2 = 0, so y = ± √12 .
√
If y = √12 then the fourth equation gives x = 2. If y = − √12 then the fourth equation
√
gives x = − 2. In both cases xy will be positive; yz will be positive if y and z have the
same sign and negative otherwise, so z = −y will give a minimal value.
So the possible solutions are:
√ 1
1
(x, y, z) = ( 2, √ , − √ )
2
2
√
1 1
(x, y, z) = (− 2, − √ , √ )
2 2
1
2
1
⇒ yz + xy =
2
⇒ yz + xy =
These are both the same, so 21 is the minimal value of yz + xy subject to the constraints,
√
√
and occurs when (x, y, z) = ( 2, √12 , − √12 ) and when (x, y, z) = (− 2, − √12 , √12 ).
A3. Use the method of Lagrange multipliers to show that the rectangle of maximum area that
has given perimeter p is a square.
Solution. Translating this to a mathematical problem, we need to maximize xy subject to
2x + 2y = p, where x, y denote the side lengths of the rectangle. The Lagrangian is
Λ(x, y; λ) = xy + λ(p − 2x − 2y)
Setting ∇Λ = 0 gives


=0
y − 2λ
x − 2λ
=0


p − 2x − 2y = 0
The first two equations give x = y = 2λ; in particular, x = y, so no matter what the values
of x and y, the rectangle must be a square.
A4. The plane x + y + 2z = 2 intersects the surface z = x2 + y 2 in an ellipse. Find the point on
this ellipse closest to the origin.
Solution. Since minimizing the distance from the point to the origin is equivalent to minimizing the square of the distance, so our problem is thus to minimize x2 + y 2 + z 2 subject
to x + y + 2z = 2 and x2 + y 2 − z = 0. The Lagrangian is
Λ(x, y, z; λ, µ) = −x2 − y 2 − z 2 + λ(2 − x − y − 2z) + µ(z − x2 − y 2 )
Setting ∇Λ = 0 gives


−2x − λ − 2xµ





−2y − λ − 2yµ
−2z − 2λ



2 − x − y − 2z




z − x2 − y 2
=0
=0
=0
=0
=0
The first three equations give
λ = −2x(1 + µ) = −2y(1 + µ) = −z
Since −2x(1 + µ) = −2y(1 + µ) we have −2(x − y)(1 + µ) = 0, and hence either have µ = −1
or x = y.
If µ = −1 then the string of equations above give z = 0. The fifth equation then gives
x2 + y 2 = 0, which can only happen if x = y = 0, at which point the value of the function
is zero.
So we must have x = y. The last two equations give z = 1 − x and z = 2x2 , so 2x2 = 1 − x,
so 2x2 + x − 1 = (2x − 1)(x + 1) = 0. Hence x = −1 or x = 12 .
If x = −1 then y = −1 and z = (−1)2 + (−1)2 = 2, so x2 + y 2 + z 2 = 6.
If x =
Since
1
1
1 2
2 then y = 2 and z = ( 2 )
3
4 < 6, the optimal solution
+ ( 12 )2 = 12 , so x2 + y 2 + z 2 = 34 .
is ( 21 , 21 , 12 ).
A5. A student wishes to maximize f (x, y, z) subject to the constraints g(x, y, z) = k and
h(x, y, z) = `. She finds (3, −3, 2; 0, 1) is a solution to ∇Λ = 0, and that the corresponding
bordered Hessian is:


0
0
1 2 −3
0
0 −1 0 −1



H=
 1 −1 2 0 0 
2
0
0 2 0
−3 −1 0 0 2
0 0
(a) Why does
appear in the top left-hand corner of H?
0 0
(b) What conditions on determinants of sub-matrices of H must be satisfied in order to
conclude from this that f (3, −3, 2) is maximal?
Solution.
0 0
appears in the top right-hand corner because they are the com(a) The matrix
0 0
ponents of the Hessian corresponding to the second derivatives with respect to two
Lagrange multipliers; this always yields zero.
(b) Since there are 3 variables and 2 constraints, the largest 3 − 2 = 1 principal minors
must be checked; namely det(H). And its determinant must be negative, since 2 is
even, to conclude that (3, −3, 2) maximizes f .
Section B
B1. Find the average value of y 2 on the disc of radius 2 centered at the origin in the xy-plane.
You may use without proof the fact that
3
d
1 p
−1 x
2
2
6 sin
− x 4 − x (x − 10) = (4 − x2 ) 2
dx
2 4
2
Any
√ disc of radius√2 has area π · 2 = 4π. We can parametrize the disc by −2 6 x 6 2 and
− 4 − x2 6 y 6 4 − x2 , so the average value is given by
1
4π
Z
2
−2
√
Z
4−x2
1
y 2 dy dx =
√
4π
− 4−x2
=
1
4π
y=√4−x2
y3
dx
√
−2 3 y=− 4−x2
Z 2
2
2 32
dx
(4 − x )
−2 3
2
2
1 p
−1 x
2
2
·
6 sin
− x 4 − x (x − 10)
3
2 4
−2
Z
2
1
4π
1
=
· 4(sin−1 (1) − sin−1 (−1))
4π
1 π
π =
− (− )
π 2
2
=1
=
√
√
Notice that we can ignore the ugly 41 x 4 − x2 (x2 − 10) term because 4 − x2 = 0 when
x = ±2.
Z
B2. Find
2x + 3y 2 dA, where U is the region of R2 bounded by y = x2 and y = 8 − x2 .
U
Solution. The curves y = x2 and y = 8 − x2 intersect when x2 = 8 − x2 . Rearranging gives
x2 = 4, so x = ±2. In the region −2 6 x 6 2 we have x2 6 8 − x2 , as can be seen for
example by plugging in x = 0. Hence the region U is parametrized by −2 6 x 6 2 and
x2 6 y 6 8 − x2 . So
Z
Z
2
2
Z
8−x2
2x + 3y dA =
U
=
−2 x2
Z 2
2x + 3y 2 dy dx
xy + y 3
−2
Z 2
=
8−x2
x2
(x(8 − x2 ) + (8 − x2 )3 − x(x2 ) − (x2 )3 ) dx
−2
2
Z
=
(−2x2 + 24x4 − 2x3 − 192x2 + 8x + 512) dx
−2
2
24
1
= − x2 + x5 − x4 − 64x3 + 4x2 + 512x
3
5
2
44032
=
35
2
−2
Er... nothing this ugly will be on your test... yeah.
B3. Find the volume of the solid enclosed by the xy-plane, the yz-plane, the zx-plane and the
plane x + y + z = 4.
The plane x + y + z = 4 intersects the xy-plane when z = 0, namely at the curve y = 4 − x.
This intersects the coordinate axes when x = 0 and x = 4, so the region of the xy-plane
that we need to integrate over can be parametrized by 0 6 x 6 4 and 0 6 y 6 4 − x. The
height is the z-value, namely z = 4 − x − y, so the volume is given by the integral
Z 4
Z 4 Z 4−x
1
(4 − x − y) dy dx =
(4y − xy − y 2 ) dx
2
0
0
0
Z 4
1
=
(4(4 − x) − x(4 − x) − (4 − x)2 ) dx
2
0
Z 4
1
=
( x2 − 4x + 8) dx
0 2
4
1 3 4 2
=
x − x + 8x
6
3
0
32
=
3
B4. X and Y are independent continuous random variables whose probability density functions
are defined by
(
(
k if − 1 6 x 6 1
`y 2 if − 2 6 y 6 2
fX (x) =
and fY (y) =
0 otherwise
0
otherwise
Find the values of the constants k and `, and find P(X > 0 and |Y | 6 1).
Solution. Since fX and fY are probability density functions, their integral over the whole
real line must be equal to 1. Now
Z 1
Z ∞
k dx = [kx]1−1 = k(1 − (−1)) = 2k
fX (x) dx =
−1
−∞
so k = 21 , and
∞
2
h y i2
4
8`
4
`y dy = ` ·
=`
=
fY (y) dy =
− −
3 −2
3
3
3
−2
−∞
Z
Z
2
so ` = 38 .
Since X and Y are independent, their jdf is the product of their pdfs, namely
1
2
· 38 y 2 =
3y 2
16
Finally,
P(X > 0 and |Y | 6 1) = P(0 6 X 6 1 and − 1 6 Y 6 1)
Z 1Z 1
3y 2
=
dy dx
0
−1 16
Z 1 3 1
y
=
dx
16 −1
0
Z 1
1
1
=
− −
dx
16
16
0
Z 1
1
=
dx
0 8
1
1
=
x
8 0
1
=
8
B5. A dartboard has radius 10 inches, and its bullseye has radius 12 inch. I throw a dart at the
board. The dart is twice as likely to land in the upper half of the board than the lower half,
and twice as likely to hit the board than to miss it, but the dart never lands more than 1
inch from the board. Thus, I model x-coordinate X and y-coordinate Y of where it lands
using the probability density function


4c if y > 0 and x2 + y 2 6 100



2c if y < 0 and x2 + y 2 6 100
g(x, y) =

3c if 100 < x2 + y 2 6 121



0 otherwise
What the value of the constant c? What is the probability that I hit the bullseye?
Solution. Since x2 + y 2 6 100 is a disc of radius 10, its area is 100π. Thus the volume
of the half-cylinder with y > 0 is 4c · 50π = 200πc, and the volume of the portion of the
half-cylinder with y < 0 is 2c·50π = 100πc. Finally, the part of the board where the missing
darts land is an annulus whose inner disc has radius 10 and whose outer disc has radius 11,
so its area is 121π − 100π = 21π; so the volume of the hollow cylinder above this region is
3c · 21π = 63πc.
Putting this together, letting U be the region x2 + y 2 6 121, we have
Z
Z
g(x, y) dA =
g(x, y) dA = 200πc + 100πc + 63πc = 363πc
R2
U
Since g is a jdf, we must have c =
1
363π .
The bullseye has radius 12 in, so the probability that I hit it is equal to the volume above
the disc of radius 12 about the origin and beneath the graph of the jdf. Again, the half-disc
of radius 21 has area π4 , so the probability is equal to
π
π
3πc
3π
1
· 4c + · 2c =
=
=
4
4
2
2 · 363π
242
My aim is pretty bad.
Note: this could be done without any geometry using pure calculus; in this situation it helped
to interpret the underlying calculus in terms of volume of familiar solids (namely cylinders,
or half-cylinders).
Please submit this question sheet with your answer booklet.