answer sheet: second midterm for math...

12

Click here to load reader

Upload: nguyentuyen

Post on 28-Jul-2018

212 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Answer sheet: Second Midterm for Math 2339faculty.smu.edu/yzhou/Teach/2010F/2339/mid2-10F-ans.pdf · Answer sheet: Second Midterm for Math 2339 October 26, 2010 Problem 1. True or

Answer sheet: Second Midterm for Math 2339

October 26, 2010

Problem 1. True or false: (check one of the box, and briefly explain why)

(1) If a twice differentiable f(x, y) satisfies fx(a, b) = fy(a, b) = 0, andfxx(a, b)fyy(a, b) > f2

xx(a, b). Then f must have a local minimum at (a, b).

false Even with the correct formula fxx(a, b)fyy(a, b) > f2xy(a, b), it is

still not sufficient to guarantee a local minimum without fxx(a, b) > 0.

(2) If f(x, y, z) = ln(x2y2z2), then ∇f(x, y, z) = 2x

+ 2y

+ 2z

.

false , ∇f(x, y, z) = 〈 2x, 2

y, 2

z〉

(3) There exists a function f(x, y) such that fx = sin(xy) and fy = cos(xy) .

false

Note that fxy = x cos(xy) but fyx = −y sin(xy), this contradicts theClairaut’s Theorem.

(4) If a31 − a3

2 = 2, then u = ea1x−a2y is a solution of∂3u

∂x3+

∂3u

∂y3= 2u.

true , Note∂3u

∂x3= a3

1u,∂3u

∂y3= −a3

2u and a31 − a3

2 = 2.

(5) If f(x, y, z) = sin(x) + cos(y) + sin(z), and −→u is a unit vector, then

−√

3 ≤ D−→u f(x, y, z) ≤√

3.

true Note that

|Duf(x, y, z)| = |∇f · −→u | = |〈cos(x),− sin(y), cos(z)〉 · −→u |≤ |〈cos(x),− sin(y), cos(z)〉|

=√

cos2(x) + sin2(y) + cos2(z) ≤√

3

1

Page 2: Answer sheet: Second Midterm for Math 2339faculty.smu.edu/yzhou/Teach/2010F/2339/mid2-10F-ans.pdf · Answer sheet: Second Midterm for Math 2339 October 26, 2010 Problem 1. True or

Problem 2. Letf(x, y, z) =

z − x2 − y2 + ln(x2 + y2 + z2 − 1).

(a) Find the domain of f .

Answer: Need z − x2 − y2 ≥ 0 and x2 + y2 + z2 − 1 > 0. Thereforethe domain is

dom(f) = {(x, y, z) | x2 + y2 + z2 > 1, z ≥ x2 + y2}.

(b) Evaluate f(1, 0, e).

Answer:

f(1, 0, e) =√

e − 1 + ln(e2) =√

e − 1 + 2.

(c) Find the range of f .

Answer: Note that f(0, 0,∞) → ∞, and when z = x2 + y2 and letz + z2 → 1+, i.e., z is close to the positive solution of z2 + z − 1 = 0, or

z →(

−1+√

52

)+

, then f → −∞.

Therefore the range of f is (−∞, ∞) .

Page 3: Answer sheet: Second Midterm for Math 2339faculty.smu.edu/yzhou/Teach/2010F/2339/mid2-10F-ans.pdf · Answer sheet: Second Midterm for Math 2339 October 26, 2010 Problem 1. True or

Problem 3. Let f(x, y) = xy.

(a) Find∂f

∂xand

∂f

∂yAnswer:

∂f

∂x= yxy−1

∂f

∂y= xy ln(x)

(b) Find∂2f

∂x2and

∂2f

∂y2

Answer:

∂2f

∂x2= y(y − 1)xy−2

∂2f

∂y2= xy(ln(x))2

(c) Find∂2f

∂x∂yand

∂2f

∂y∂xAnswer:

∂2f

∂x∂y= xy−1 + yxy−1 ln(x) = xy−1(1 + y ln(x))

∂2f

∂y∂x= yxy−1 ln(x) + xy 1

x= xy−1(y ln(x) + 1)

They should be the same by the Clairaut’s theorem.

Page 4: Answer sheet: Second Midterm for Math 2339faculty.smu.edu/yzhou/Teach/2010F/2339/mid2-10F-ans.pdf · Answer sheet: Second Midterm for Math 2339 October 26, 2010 Problem 1. True or

Problem 4. Let

f(x, y, z) = ln (x2 + y2 + z3), x = r cos(θ), y = r sin(θ), z = rθ .

Use the chain rule to find∂f

∂rand

∂f

∂θ.

Answer:

∂f

∂r=

∂f

∂x

∂x

∂r+

∂f

∂y

∂y

∂r+

∂f

∂z

∂z

∂r

=1

x2 + y2 + z3(2x cos(θ) + 2y sin(θ) + 3z2θ)

∂f

∂θ=

∂f

∂x

∂x

∂θ+

∂f

∂y

∂y

∂θ+

∂f

∂z

∂z

∂θ

=1

x2 + y2 + z3(−2xr sin(θ) + 2yr cos(θ) + 3z2r)

=r

x2 + y2 + z3(−2x sin(θ) + 2y cos(θ) + 3z2)

Page 5: Answer sheet: Second Midterm for Math 2339faculty.smu.edu/yzhou/Teach/2010F/2339/mid2-10F-ans.pdf · Answer sheet: Second Midterm for Math 2339 October 26, 2010 Problem 1. True or

Problem 5. Let F be a differentiable function. Define the function G as

G(s, t) = F ( cos(s2 − t2), sin(s2 − t2) ).

Does the function G satisfy the following differential equation

t∂G

∂s+ s

∂G

∂t= 0 ?

Answer: Let x = cos(s2 − t2), y = sin(s2 − t2), then

G(s, t) = F (x, y).

By the chain rule,

∂G

∂s=

∂F

∂x

∂x

∂s+

∂F

∂y

∂y

∂s= −2s sin(s2 − t2)Fx + 2s cos(s2 − t2)Fy

∂G

∂t=

∂F

∂x

∂x

∂t+

∂F

∂y

∂y

∂t= 2t sin(s2 − t2)Fx − 2t cos(s2 − t2)Fy

Therefore

t∂G

∂s+ s

∂G

∂t= 0

Yes G satisfies the differential equation.

Page 6: Answer sheet: Second Midterm for Math 2339faculty.smu.edu/yzhou/Teach/2010F/2339/mid2-10F-ans.pdf · Answer sheet: Second Midterm for Math 2339 October 26, 2010 Problem 1. True or

Problem 6. Let f and g be one-dimensional twice differentiable functions. Let a and b betwo constants, with b 6= 0. Show that

u(x, t) = f(ax + bt) + g(ax − bt)

is a solution of the wave equation

∂2u

∂x2=

(

a2

b2

)

∂2u

∂t2.

Answer: For u(x, t) = f(ax + bt) + g(ax − bt),

∂u

∂x=

d

dx(f(ax + bt) + g(ax − bt)) = af ′(ax + bt) + ag′(ax − bt)

∂2u

∂x2=

d2

dx2(f(ax + bt) + g(ax − bt)) = a2f ′′(ax + bt) + a2g′′(ax − bt)

∂u

∂t=

d

dt(f(ax + bt) + g(ax − bt)) = bf ′(ax + bt) − bg′(ax − bt)

∂2u

∂t2=

d2

dt2(f(ax + t) + g(ax − t)) = b2f ′′(ax + bt) + b2g′′(ax − bt)

Since b 6= 0, we have

∂2u

∂x2= a2 (f ′′(ax + bt) + g′′(ax − bt)) =

a2

b2

∂2u

∂t2.

Therefore u(x, t) = f(ax + bt) + g(ax − bt) is a solution of

∂2u

∂x2=

a2

b2

∂2u

∂t2.

(Comment: You may also separate it into two cases: a = 0 and a 6= 0.

If a = 0, then u(x, t) = f(bt) + g(−bt) is independent of x, therefore∂2u∂x2 = 0 = a2

b2∂2u∂t2

and the equation is satisfied.

If a 6= 0, we have

=⇒ 1

a2

∂2u

∂x2=

1

b2

∂2u

∂t2= f ′′(ax + bt) + g′′(ax − bt)

which also satisfies ∂2u∂x2 = a2

b2∂2u∂t2

. )

Page 7: Answer sheet: Second Midterm for Math 2339faculty.smu.edu/yzhou/Teach/2010F/2339/mid2-10F-ans.pdf · Answer sheet: Second Midterm for Math 2339 October 26, 2010 Problem 1. True or

Problem 7. Let the surface be z = f(x, y) = ln(y2 + cos(xy) + e − 2).

(a) Find the gradient vector of f

Answer:

∇f(x, y) =1

y2 + cos(xy) + e − 2〈−y sin(xy), 2y − x sin(xy) 〉

(b) Evaluate f(0, 1).Find the tangent plane to this surface at the point ( 0, 1, f(0, 1)).

Answer: f(0, 1) = ln(e) = 1.The tangent plane of z = f(x, y) at (x0, y0, z0) is

z − z0 = fx(x0, y0)(x − x0) + fy(x0, y0)(y − y0)

Plugging in (x0, y0) = (0, 1) into ∇f(x, y), we get fx(0, 1) = 0, fy(0, 1) = 2e.

Therefore the tangent plane is

z − 1 = 0(x − 0) +2

e(y − 1) , or 2y − ez = 2 − e .

(c) Find the symmetric equation of the normal line at the point ( 0, 1, f(0, 1))?

Answer:

The normal line is perpendicular to the tangent plane, therefore the direction ofthe normal line is the same as the normal direction of the tangent plane. From(b) we see the normal direction of the tangent plane at ( 0, 1, 1 ) is parallel to〈0, 2

e,−1〉,

Therefore the symmetric equation of the normal line at ( 0, 1, 1 ) is

e(y − 1)

2=

z − 1

−1

x = 0 .

Each equation represents a plane, and their intersection gives the normal line.

Page 8: Answer sheet: Second Midterm for Math 2339faculty.smu.edu/yzhou/Teach/2010F/2339/mid2-10F-ans.pdf · Answer sheet: Second Midterm for Math 2339 October 26, 2010 Problem 1. True or

Problem 8. Letf(x, y, z) = e−x3+cos(y)+sin(z)

(a) Find the gradient vector of f(x, y, z), and evaluate ∇f(1, 0, 0).

Answer:

∇f(x, y, z) = 〈fx, fy, fz〉= e−x3+cos(y)+sin(z)〈 − 3x2, − sin(y), cos z 〉

∇f(1, 0, 0) = e0〈−3, 0, 1〉 = 〈−3, 0, 1〉

(b) Find the directional derivative of f at (1, 0, 0) in the direction−→u = 〈−1/3, 2/3, 2/3 〉.Answer:

D−→u f(1, 0, 0) = ∇f(1, 0, 0) · −→u

= 1 +2

3=

5

3

(c) What is the 3-d unit directional vector −→v that can maximize D−→v f(1, 0, 0)?What is the largest possible value of D−→v f(1, 0, 0)?

Answer: Notice that for any unit vector −→v ,

D−→v f(x, y, z) = ∇f(x, y, z) · −→v = |∇f(x, y, z)| cos(θ),

where θ is the angle between ∇f(x, y, z) and −→v .

So the maximum D−→v f(x, y, z) is obtained when θ = 0, i.e., when −→v isparallel to ∇f(x, y, z).

Therefore,max−→v

D−→v f(x, y, z) = |∇f(x, y, z)|

And the direction for this maximum is

−→v =∇f(x, y, z)

|∇f(x, y, z)|

Plugging x = 1, y = z = 0 gives

max−→v

D−→v f(1, 0, 0) = |∇f(1, 0, 0)| =√

10, −→v =1√10

〈−3, 0, 1〉 .

Page 9: Answer sheet: Second Midterm for Math 2339faculty.smu.edu/yzhou/Teach/2010F/2339/mid2-10F-ans.pdf · Answer sheet: Second Midterm for Math 2339 October 26, 2010 Problem 1. True or

Problem 9. We want to build a rectangular aquarium with given volume V . The base ismade of marble, and the other four sides made of glass. Assume that marblecosts 16 times as much as glass. Find the dimensions of the aquarium so thatthe cost of materials will be minimized.

Let the edges of the base be x and y, and the height be z, then this problemcan be modeled as

{

minx,y,z>0

f(x, y, z) = 16xy + 2yz + 2xz

s.t. g(x, y, z) = xyz − V = 0

Apply Lagrange multiplier method to find the optimal dimensions.

Answer:

By Lagrange multiplier,

∇f = λ∇g

xyz = V

We get

16y + 2z = λyz

16x + 2z = λxz

2y + 2x = λxy

Multiply respectively by x, y, z on both sides of the above three equations:

λxyz = 16xy + 2xz = 16xy + 2yz = 2yz + 2xz .

Therefore,

x = y =z

8.

Since xyz = V , we have 8x3 = V , therefore the optimal dimensions are

x = y =3√

V

2, z = 4

3√

V .

Page 10: Answer sheet: Second Midterm for Math 2339faculty.smu.edu/yzhou/Teach/2010F/2339/mid2-10F-ans.pdf · Answer sheet: Second Midterm for Math 2339 October 26, 2010 Problem 1. True or

Problem 10. (Bonus 10 points) Find the plane that passes through the point (1, 2, 1) andcuts off the smallest possible volume in the first octant. (Hint: Express the cut off volume

as a function of the 3 components of the normal direction of the plane. Then solve the optimization problem.)

Answer: The plane that goes though (1, 2, 1) may be written as

a(x − 1) + b(y − 2) + c(z − 1) = 0, (1)

where −→n = 〈a, b, c〉 is the normal direction.

To find the volume of the cutoff tetrahedron, we first find the intersection pointsof the plane with the axises.

1) Set y = z = 0 in (1), then x = a+2b+ca

, this is the intercept with the x-axis.

2) Set x = z = 0 in (1), then y = a+2b+cb

, this is the intercept with the y-axis.

3) Set x = y = 0 in (1), then z = a+2b+cc

, this is the intercept with the z-axis.

So the volume of the cutoff tetrahedron is

V (a, b, c) =1

6

(a + 2b + c)3

abc

Since the constraint that the plane passes (1, 2, 1) is already satisfied in (1), weonly need to solve an unconstraint optimization problem

mina,b,c>0

V (a, b, c) .

So we can find the critical point by solving ∇V =−→0 .

However, it is easier to apply the 1st order necessary condition to ln(6V ) (sinceln() function is strictly increasing, the minimum critical point of ln(6V ) is thesame as that of V ). Let

f(a, b, c) = ln(6V ) = ln((a+2b+c)3)−ln(abc) = 3 ln(a+2b+c)−ln(a)−ln(b)−ln(c).

Then ∇f =−→0 gives

∂f

∂a= 0 =⇒ 3

a + 2b + c− 1

a= 0

∂f

∂b= 0 =⇒ 6

a + 2b + c− 1

b= 0

∂f

∂c= 0 =⇒ 3

a + 2b + c− 1

c= 0

Therefore, the critical point of f(a, b, c) must satisfy 3a+2b+c

= 1a

= 1c

= 12b

, ora = c = 2b. Since the scaling of a normal direction as in (1) does not matter,we can set b = 1 and write the plane as

2(x − 1) + y − 2 + 2(z − 1) = 0 , or 2x + y + 2z = 6 .

The minimum is V (a, b, c) = 16

(3a)3

a3

2

= 9. The maximum of V does not exist

(E.g., V → ∞ when a → 0+ while b and c are set to 1).

Page 11: Answer sheet: Second Midterm for Math 2339faculty.smu.edu/yzhou/Teach/2010F/2339/mid2-10F-ans.pdf · Answer sheet: Second Midterm for Math 2339 October 26, 2010 Problem 1. True or

Another solution: We can formulate the problem as a constrained optimiza-tion problem and apply Lagrange multiplier. Express the plane as

x

a+

y

b+

z

c= 1 .

(It simply means that the normal direction is −→n =⟨

1a, 1

b, 1

c

.) This form ofplane is convenient for this problem since it readily shows that the interceptswith the x-, y-, z- axises are a, b, c respectively. Therefore the volume of thecutoff tetrahedron is V (a, b, c) = 1

6abc. Now we need to satisfy the constraint

that the plane passes a giving point. Plugging the point (1, 2, 1) into the planewe get 1

a+ 2

b+ 1

c= 1.

So the mathematical model is a constraint optimization problem

{

mina,b,c>0

f(a, b, c) = 6V (a, b, c) = abc

s.t. g(a, b, c) = 1a

+ 2b+ 1

c− 1 = 0

By Lagrange multiplier, taking partial derivatives w.r.t. a, b, c as in

∇f = λ∇g

We get

bc = −λa−2

ac = −2λb−2

ab = −λc−2

Multiplying respectively a, b, c on both sides of the above three equations, weget

abc = −λ1

a= −λ

2

b= −λ

1

c.

Since a, b, c are positive, we have λ 6= 0. So we must have

a = c, b = 2a.

Plugging the above into the constraint 1a

+ 2b

+ 1c

= 1 we get a = c = 3, b = 6.Therefore the plane that cuts off smallest volume is

x

3+

y

6+

z

3= 1, or 2x + y + 2z = 6 .

And the smallest cutoff volume is V (3, 6, 3) = 16× 3 × 6 × 3 = 9.

Page 12: Answer sheet: Second Midterm for Math 2339faculty.smu.edu/yzhou/Teach/2010F/2339/mid2-10F-ans.pdf · Answer sheet: Second Midterm for Math 2339 October 26, 2010 Problem 1. True or

Problem 11. (Bonus 10 points) A central concept in statistical mechanics/thermodynamicsand information science is Entropy. For n random variables pi > 0, (i =1, . . . , n), where pi’s are independent, the entropy can be defined as

S(p1, p2, . . . , pn) = −n

i=1

pi ln(pi) ,

with the constraintn

i=1

pi = 1.

Apply Lagrange multiplier method to find the extreme value of S. (In this caseit is a maximum.)

Answer: Here this objection function is

S(p1, p2, . . . , pn) = −n

i=1

pi ln(pi),

and the constraint is

g(p1, p2, . . . , pn) =n

i=1

pi − 1 = 0.

The Lagrange multiplier satisfies ∇S = λ∇g, that is

∂S

∂pi

= λ∂g

∂pi

, (i = 1, 2, . . . , n).

This gives

− ln(pi) − pi

1

pi

= λ, =⇒ − ln(pi) = λ + 1, (i = 1, 2, . . . , n).

Therefore at the extreme value of S all pi’s are equal. Since they sum to 1, wemust have

p1 = p2 = · · · = pn =1

n.

The point ( 1n, 1

n, . . . , 1

n) in R

n corresponds to a maximum of S, which is

maxp1, . . . , pn > 0∑n

i=1 pi = 1

−n

i=1

pi ln(pi) = − ln

(

1

n

)

= ln(n) .

(We’ll have to skip the second order derivative test for the Lagrangian L =S −λg in this higher dimension case, but it is not hard to see that ∂2L

∂p2i

= ∂2S∂p2

i

=−1pi

< 0 for all positive pi, which means the critical point of L cannot correspond

to a minimum. Note also that ∂2L∂pi∂pj

= ∂2S∂pi∂pj

= 0 for i 6= j, so the Hessian

matrix of L is positive definite, that is why the critical point corresponds to amaximum. The result says that the highest unordered state (i.e., no differenceamong pi’s) has the maximum entropy. )