You are on page 1of 7

Math 241, Sections E

Exam 2 Solutions

Fall 2008

Problem 1 (20 points)


Suppose the function f (x, y ) = 1 3x2 xy describes the elevation (altitude) at a point with coordinates (x, y ) in a landscape, and you are positioned at the point (1, 2). In the questions below specify the direction asked in terms of a direction vector (which does not have to be a unit vector). (i) In which direction should you move in order to climb as quickly as possible? Solution: The rate of climb is maximal in the direction of the gradient at the given point: f
(1,2)

= 6x y, x
(1,2)

8, 1

(or a multiple thereof). (ii) If you move in this direction (i.e., the direction specied by (i)), what is the initial rate of climb? (You can express the answer in raw form, e.g., 1/ 2.) Solution: The slope in this direction is the magnitude of the gradient: 8, 1 = 82 + 12 = 65 = 65

(iii) In which direction should you move if you want to stay at the same altitude? Solution: The direction sought is perpendicular to the gradient at the given point. Now, f (x, y ) = 6x y, x , so (1, 2) = 8, 1 . A vector perpendicular to this vector is 1, 8 , or any multiple thereof. (iv) If you move from the point (1, 2) straight towards the point (4, 2), do you initially climb or descend, and what is the angle at which you climb or descend? (For the angle an answer involving inverse trig functions (such as sin1 (1/3)) is sucient.) Solution: The quickest solution is to note that when moving from (1, 2) to (4, 2) you are moving in the direction of the positive x-axis, and the rate of change in this direction is simply the partial derivative fx at the given point, which was calculated above as 8. Thus you initially descend , and the rate of descent, i.e., vertical gain divided by horizontal gain, is 8. If denotes the angle of ascent/descent, then tan = 8, so = tan1 (8) . Alternative solution: Alternatively, compute the directional derivative in the direction in which you are moving. This direction is given by the vector from (1, 2) to (4, 2), i.e., the vector (4 1), (2 2) = 3, 0 . Normalizing, we get a unit vector in this direction, u = 1, 0 , so the directional derivative becomes f (1, 2) 1, 0 = 8, 1 1, 0 = 8, as before. Comments: Note that the direction vector to work with is the vector from the point (1, 2) to the point (4, 2), i.e., 4 1, 2 2 , not the vector 1, 2 or 4, 2 , which represent directions from the origin to one of these points. Also, note that, in the directional derivative formula, the direction vector ( 3, 0 in the above case) must rst be normalized to get a unit vector. Without such a normalization, one would get arctan(24) as the angle of descent. (v) There is exactly one of the level curves of the function f (x, y ) that passes through the point (1, 2). Write down the equation for that particular level curve. Solution: The equation of a general level curve has the form f (x, y ) = c, where c is a constant. At x = 1, y = 2 the function f (x, y ) equals f (1, 2) = 1 3 12 1 2 = 4, so choosing c = 4 as the constant we get the equation of the level that passes through the point (1, 2), i.e., equation 1 3x2 xy = 4 or 3x2 + xy = 5 . Comments: Full credit was given for either of the above boxed equations. Some common incorrect answers were:

Page 1

Math 241, Sections E

Exam 2 Solutions

Fall 2008

An equation involving three variables x, y , z . (Since a level curve lives in the xy -plane, it cannot involve the variable z .) A computation of a tangent plane, leading to an equation such as z (4) = 8(x 1) 1(y 2). (The latter would be indeed be tangent plane, but level curves are something completely dierent.) An answer like 1 3x2 xy (which is just the given formula for f (x, y ), not an equation). No partial credit was given for such answers.

Problem 2 (15 points)


The following problems are independent of each other. (i) State the limit denition of the directional derivative Du f (x, y ) of a function f at a point (x, y ) in direction of a unit vector u = a, b . The denition should be in the form Du f (x, y ) = lim , with appropriate expressions in place of the asterisks. (If you wish, you can use vector notation: r = x, y , f (r) = f (x, y ), etc.) Solution: In scalar notation, the directional derivative is dened as Du f (x, y ) = lim In vector notation, the denition is Du f (r) = lim f (r + hu) f (r) h0 h f (x + ha, y + hb) f (x, y ) h

h0

The rst denition is the one in the book. The latter denition was given in class; its equivalent to the scalar denition, but more easily understood and remembered. Either denition, if correctly stated, was acceptable. (ii) Suppose you have three data points (1, 2), (2, 4), (3, 8). To nd the best-tting line y = ax+b for these data points by the least squares method, you need to minimize a certain function. Write down this function explicitly for the above three points. (You can leave the expression in raw/unsimplied form. Note that the problem does not ask for a complete solution of the minimization problem, only for a formula for the function to be minimized. Thus, no calculations are required.) Solution: Given a set of data points (xi , yi ), the function one has to minimize in the least squares method is the sum of the squares of the vertical errors, i.e., the sum of the squares of the dierences ei = yi (axi + b) between the y -values of the data points and the y -values of the corresponding points on the line. Taking the given points (1, 2), (2, 4), (3, 8) as the data points (xi , yi ), the squares sum becomes f (a, b) = (2 (a + b))2 + (4 (2a + b))2 + (8 (3a + b))2 .

Remarks: All the problem asked was to write down the function to be minimized (i.e., the function f (a, b) above). In particular, as clearly stated in the problem (see the part in italics), the problem did not ask to work out a solution to the minimization problem. Grading was based only on answering the actual question asked, i.e., on getting the correct formula for the function f (a, b) above; no partial or additional credit was given for solving the minimization problem. As the name suggests, the least squares method involves the sum of the squares of the vertical errors ei , rather than the ei s themselves, or their absolute values. As I mentioned in the lecture, there are good reasons why one wouldnt want to simply add up the errors, or the absolute values of the errors, and the sum of the squares is, in a sense, the best measure of how well a least squares line ts a given set of data points.

Page 2

Math 241, Sections E

Exam 2 Solutions

Fall 2008

Problem 3 (20 points)


(i) (True/false) For each of the following statements mark the statement as true (T) or false (F), or leave it blank. Grading: 2 points for a correct answer, -1 point for an incorrect answer, 0 points for an answer left blank. The surface given by the equation x2 + y 2 z 2 2xy + 4xz 4 = 0 is a ... (a) level surface of the function x2 + y 2 z 2 2xy + 4xz 4 (b) level surface of the function x2 + y 2 z 2 2xy + 4xz (c) graph of the function x2 + y 2 z 2 2xy + 4xz 4 (d) graph of the function x2 + y 2 z 2 2xy + 4xz Solution: (a) true, (b) true, (c) false, (d) false (By denition, a level surface of a function F (x, y, z ) is a surface dened by () F (x, y, z ) = c, where c is a constant. The given equation is of the form () with F (x, y, z ) = x2 + y 2 z 2 2xy +4xz 4 (the function in (a)) and c = 0, but also with F (x, y, z ) = x2 + y 2 z 2 2xy +4xz (the function in (b)) and c = 4. Thus statements (a) and (b) are both true. On the other hand, the graph of a 3 variable function F (x, y, z ) is represented by an equation of the form w = F (x, y, z ), which involves 4 variables, x, y, z as well as w. Since the given equation involves x, y, z alone, it cannot represent a graph of a 3-variable function. Hence (c) and (d) are false.)

(ii) Find a (nonzero) vector that is tangent to the surface x2 + y 2 z 2 2xy + 4xz 4 = 0 at the point (1, 0, 1). Solution: Since the surface is a level surface for the function F (x, y, z ) = x2 + y 2 z 2 2xy + 4xz 4, and gradient vectors are perpendicular to level surfaces, any vector that is perpendicular to the gradient F at the given point is tangent to the level suface at this point. The gradient is F (1, 0, 1) = 2x 2y + 4z, 2y 2x, 2z + 4x
(1,0,1)

= 6, 2, 2

A vector perpendicular to this vector is, for example, 1, 3, 0 (There are many other choices.) z by implicit (iii) Given that x2 + y 2 z 2 2xy + 4xz 4 = 0, nd the partial derivative x dierentiation. Solution: With F as above, the implicit dierentiation formula gives z 2x 2y + 4z Fx = = x Fz 2z + 4x

Problem 4 (15 points)


Suppose the total production of a company is given by the function P = P (K, L) = K 1/4 L1/2 , where K denotes the number of units of capital used and L the number of units of labor used. The following questions both involve this function P (K, L), but otherwise are independent of each other. (i) Suppose each unit of capital K costs 1 million dollars and each unit of labor L costs 7 million dollars. Consider the problem of maximizing the total production P if the total budget is 10 million dollars. In order to solve this problem by the Lagrange multiplier method, one needs to solve a certain system of scalar equations. Write down (but do not solve) these equations explicitly, and the variables one needs to solve these equations for: Page 3

Math 241, Sections E

Exam 2 Solutions

Fall 2008

Solution: (This is a standard application of Lagrange multipliers to functions arising in economics. The problem was covered in the lecture, and is of the same type as HW Problem 37 in 12.8 (see http://www.math.uiuc.edu/hildebr/241/hw/12-8.pdf.) The function to be maximized is P (K, L) = K 1/4 L1/2 . The total cost is K + 7L, so the constraint equation is K + 7L = 10, or g (K, L) = 0, where g (K, L) = K + 7L 10. The system of equations comes from the Lagrange equations P = g (written out as scalar equations), together with the above constraint equation K + 7L 10 = 0. Computing the gradients, P = (1/4)K 3/4 L1/2 , (1/2)K 1/3 L1/2 , we get the three scalar equations (1) (2) (3) (1/4)K 3/4 L1/2 = 1 (1/2)K 1/4 L1/2 = 7 K + 7L 10 = 0 g = 1, 7 ,

where the variables are K, L, . Remarks: The problem specically asked for scalar equations, so writing down a generic equation like f = g (instead of explicit scalar equations as in (1) and (2)) was not enough. Also, note that a key feature of the Lagrange method is that the Lagrange multiplier is plays the role of a variable in the above system of equations. Thus, in the list of variables has to be included, in addition to the given variables K and L.

(ii) Suppose the capital K increases at a rate of 4% per year, and the labor L increases at a rate of 5% per year. Determine the corresponding rate of increase of the production P (expressed in the same form, i.e., as x% per year, with an appropriate value of x). (As noted above, this question is independent of that in part (i), except that both involve the same function P (K, L).) Solution: (This is similar to HW Problem 15 in 12.5 and to a problem worked out in the discussion sections in connection with 12.5. See page 12.5-3 in the HW Solutions to 12.5, posted on the course webpage, http://www.math.uiuc.edu/hildebr/241/hw/12-5.pdf.) The key here is the proper translation of percentage (or relative) rates of increase: Saying that K and L increase at a rate of 4%, and 5%, respectively, means (1) dK = 0.04K, dt dL = 0.05L dt

(and not dK/dt = 0.04, or dL/dt = 0.05). Similarly, the percentage rate of increase in P that the problem asks for is dP/dt P , not dP/dt. By the chain rule, we have dP P dK P dL = + dt K dt L dt 1 1 dK dL = K 3/4 L1/2 + K 1/4 L1/2 . 4 dt 2 dt Substituting (1) we get 1 1 dP = K 3/4 L1/2 0.04K + K 1/4 L1/2 0.05L dt 4 2 1 1 = K 1/4 L1/2 0.04 + 0.05 4 2 1 1 =P 0.04 + 0.05 = 0.035P, 4 2 Page 4

Math 241, Sections E

Exam 2 Solutions

Fall 2008

since K 1/4 L1/2 = P . Thus, dP/dt = 0.035P , which means that the production increases by 3.5% . Remarks: The above method is the only correct approach. If one were to use the (incorrect) formula dK/dt = 0.04 instead of dK/dt = 0.04K (and similarly for L), the expressions one would get above, after applying the chain rule, would not simplify to 0.035P as above. (If one plugs in K = 1, L = 1, or simply drops all K - and L-terms above, then one would also end up with 0.035, but this is a pure coincidence and not a valid argument. The above method gives the 3.5% gure regardless of what the values of K and L are.)

Problem 5 (20 points)


Suppose you are in a spaceship equipped with instruments showing that the current position is (1, 2, 3), the temperature at this position is 32, the temperature gradient at this position is 3, 4, 5 . (i) Given this information, estimate the temperature at the point (1.1, 2.1, 2.9). Solution: Let T (x, y, z ) denote the temperature at the point (x, y, z ). We are given that T (1, 2, 3) = 32, T (1, 2, 3) = 3, 4, 5 .

We use dierentials to get an estimate for the change in temperature: dT = Tx dx + Ty dy + Tz dz = 3dx + 4dy + 5dz. At the point (1, 2, 3), we know that T = 3, 4, 5 , so Tx = 3, Ty = 4, and Tz = 5. Also, the point (1.1, 2.1, 2.9) is obtained by changing the coordinates (x, y, z ) = (1, 2, 3) of the original point by dx = 0.1, dy = 0.1, dz = 0.1. Substituting these values into the above formula for dT we get dT = 3 0.1 + 4 0.1 + 5 (0.1) = 0.2. Adding this value to the current temperature 32, we obtain 32.2 as the estimate for the temperature at (1.1, 2.1, 2.9). (ii) Find a linear approximation to the temperature function T (x, y, z ) near the point (1, 2, 3). Solution: The linear approximation is given by L(x, y, z ) = T (1, 2, 3) + Tx (x 1) + Ty (y 2) + Tz (z 3) = 32 + 3(x 1) + 4(y 2) + 5(z 3) = 6 + 3x + 4y + 5z

(iii) Suppose the spaceship begins to move away from the point (1, 2, 3) while maintaining constant altitude 3 (i.e., so that the ight path lies in the plane z = 3). For each of the following parts, either give an appropriate (3-dimensional) unit direction vector, or explain why no such direction vector exist. (Note that in order for the movement to remain in a horizontal plane, the direction vectors must have z -component equal to zero. Use the back of the page for work if needed.) (a) Direction in which the initial rate of change in temperature is 3: (b) Direction in which the initial rate of change in temperature is 0: (c) Direction in which the initial rate of change in temperature is 5: (d) Direction in which the initial rate of change in temperature is 10:

Page 5

Math 241, Sections E

Exam 2 Solutions

Fall 2008

Solution: The rate of change in T in a direction specied by a unit vector u is given by the directional derivative Du T = T u. Now, at the given point T = 3, 4, 5 , and since the direction must be horizontal, u must be of the form u = x, y, 0 , where x2 + y 2 = 1. Hence Du T = 3x + 4y , so it remains to nd values of x and y , satisfying x2 + y 2 = 1, so that 3x + 4y equals the values given in (a)(d), or show that such x and y do not exist. This is easy to do: (a) To get Du T = 3, choose x = 1, y = 0, and thus u = 1, 0, 0 = i.

Alternative argument: From the given gradient vector T = Tx , Ty , Tz = 3, 4, 5 , we read o Tx = 3. Thus 3 is the rate of change in T in direction of the x-axis, i.e., in direction i. (b) To get Du T = 0, choose x = 4/5, y = 3/5, and thus u = 4/5, 3/5, 0 . Alternative argument: We know that the directional derivative is 0 in any direction that is perpendicular to the direction of the gradient. Thus, we need to nd a vector with z -component 0, whose dot product with 3, 4, 5 is 0. 4, 3, 0 is one such vector, and normalizing it, we get a unit vector in this direction, 4/5, 3/5, 0 . (c) To get Du T = 5, choose x = 3/5, y = 4/5, and thus u = 3/5, 4/5, 0 . (d) Du T = 10 is impossible since the maximal value of Du T in any direction is the magni tude of the gradient, i.e., T = 32 + 42 + 52 = 50, which is smaller than 10.

Problem 6 (10 points)


Find and classify all local minima, maxima, and saddle points of the function f (x, y ) = x2 + y 2 + x2 y . Solution: We rst nd the critical points. The gradient of f is f (x, y ) = 2x + 2xy, 2y + x2 . Setting this equal to the zero vector gives the equations for the critical points: (1) (2) 2x + 2xy = 0, 2y + x2 = 0.

To solve this system, we rst use (2) to get y = x2 /2. Next, substitute this into (1) to get 2x + 3 2 2x(x2 /2) = x3 + 2x = 0, or x = 2x, i.e., x(x 2) = 0. The latter equation has three solutions: x = 0, x = 2, and x = 2. From (1) we get the y -values corresponding to these solutions: y = 0, y = 1, and y = 1. Hence we have three critical points: (0, 0), ( 2, 1), ( 2, 1) . Next, we apply the second derivative test to each of these points in order to determine whether it is a saddle point, a local min or a local max. We compute: fxx = 2 + 2y, D = fxx fyy fyy = 2,
2 fxy

fxy = fyx = 2x,

= (2 + 2y )(2) (2x)2 = 4 + 4y 4x2 .

The condition for a saddle point is that D < 0, for a local minimum/maximum it is D > 0, with a minimum occurring if fxx > 0 and a maximum if fxx < 0. Substituting the three critical points into this formula, we get: (0, 0): D = 4 and fxx = 2 > 0, so (0, 0) is a local minimum ( 2, 1): D = 8, so ( 2, 1) is a saddle point ( 2, 1): D = 8, so ( 2, 1) is a saddle point Remarks: As pointed out in class and in the discussions, when solving the critical points equations, one has to take into account the possibility that the variables are 0. In particular, one cannot simply cancel a variable from an equation without rst analyzing the case when this variable is equal to 0. Sometimes, this has no consequences on the end result, but in the above problem it Page 6

Math 241, Sections E

Exam 2 Solutions

Fall 2008

makes a crucial dierence: if one divides equation (1) by x, one misses out on the case x = 0, and the point (0, 0), which is a local minimum. 2 Also note that the equation x = 2 has two solutions, x = 2 and x = 2, yielding two points, ( 2, 1) and ( 2, 1).

Page 7

You might also like