Answered step by step
Verified Expert Solution
Question
1 Approved Answer
LAB 3: FUNCTIONS OF SEVERAL VARIABLES, PART B (c)2017 UM Math Dept licensed under a Creative Commons By-NC-SA 4.0 International License. 1. Objectives and Expectations
LAB 3: FUNCTIONS OF SEVERAL VARIABLES, PART B (c)2017 UM Math Dept licensed under a Creative Commons By-NC-SA 4.0 International License. 1. Objectives and Expectations for Lab 2, Part B Part B of Lab 2 contains less guidance. You are expected to answer problems that are more challenging than the ones in Part A. The material covered and the assignments in Part A is instructive for completing Part B. 2. Matlab Commands Some of the MATLAB commands we will use in this lab are the following: 2.1. f = @(x,y) formula. This command defines a function handle that you can then use as a function that you've defined. For example, >> h = @(x,y) x^2 + y^2; after which we can use h(1.698, 0), etc. Note that the arguments declared by the @() construction may be vectors, as may the function output. 2.2. syms x y. This command tells MATLAB that x and y are symbolic variables. Note that you can set any number of variables, and that the variable names are separated by spaces, not commas. 2.3. vpasolve([eqlist], [symslist]). Numerically solve the equations in eqlist for the previously declared symbolic variables in symslist. The return value is a solution structure giving the different variables for which we are solving. For example, >> syms x y; >> sol = vpasolve( [ x^2+2*y==3, 2*x-4*y==7 ], [ x, y ] ); The output sol has the solutions for x and y as ordered lists in >> sol.x and >> sol.y 3. Assignments Recall that we said, following [JS], that we may find the location of possible extreme values of a function f (x1 , x2 , ... ) subject to the constraint g (x1 , x2 , ... ) = c by solving the system of equations (1) g (x1 , x2 , ... ) = c, f = g , 2 LAB 3: FUNCTIONS OF SEVERAL VARIABLES, PART B and that if we have multiple constraints g1 (x1 , x2 , ... ) = c1 , g2 (x1 , x2 , ... ) = c2 , etc., we generalize (1) to g1 (x1 , x2 , ... ) = c1 , (2) g2 (x1 , x2 , ... ) = c2 , ... f = 1 g1 + 2 g2 + . This is the method of Lagrange multipliers, and it works provided the gradients g1 , g2 , etc., are linearly independent: that is, each provides some more information about the domain on which we are solving. For one constraint, this is just that g1 6= ~0, and for two, that in addition g2 6= kg1 or, equivalently (and for any number of contraints), that (3) c1 g1 + + cn gn = ~0 only if c1 = c2 = = cn = 0. 3.1. Optimization with a single constraint. We start with an exercise with a single constraint. What does the surface in 3.2 look like? to be on the surface given by g (x, y ) means that we want to be on the downward opening paraboloid z = g (x, y ). The condition z x + y says we're also above a plane through the origin with slope one in both x and y directions. Thus, the surface is the top of the paraboloid, cut off at an angle. Exercise 1: Find the minimum value of the function f (x1 , x2 , x3 , x4 ) = x12 + x22 +x32 +x42 subject to the constraint g (x1 , x2 , x3 , x4 ) = x1 +x2 +x3 +x4 = 20. 3.2. Constraining to a surface. We often want to find the maximum and minimum of a function on a bounded surface. For example, suppose we want to find the maximum and minimum values of f (x, y , z) = x 2 + y 2 + z 2 on the surface given by the graph of the function g (x, y ) = 2 x 2 21 y 2 where z x +y . We can do this by combining two constrained optimization problems, as shown in the exercises below. For all of these you should use MATLAB 's vpasolve command to find numerical solutions to the required equations. Exercise 2: Use Lagrange multipliers with one constraint to find the critical points of f (x, y , z) constrained to the surface z = 2 x 2 12 y 2 . Pick out the critical points which lie in the region z x + y . Exercise 3: Use Lagrange multipliers with two constraints to find the critical points of f (x, y , z) constrained to the boundary. That is, constrained to z = 2x 2 12 y 2 and z = x +y . Be sure to verify that the gradients of the two constraints are linearly independent at every point on the boundary. Exercise 4: Evaluate the function f (x, y , z) at the critical points found in the above two exercises to determine where the maximum and minimum occur, and what the values of f (x, y , z) at these points are. LAB 3: FUNCTIONS OF SEVERAL VARIABLES, PART B 3 3.3. An application to economics. Suppose that you own an electronics manufacturing company and produce two types of circuit boards: board A and board B. To produce either type you need some number of worker-hours and some amount of money, and these trade off (e.g., if you spend more money on automation, you need fewer worker hours; and in general, producing more lowers the cost per item). We generally want to minimize the cost of production. The constraints are (1) that we have contracts to produce some number of each type of the circuit boards; and (2) that we have a fixed number of workerhours available. The first of these is modeled by the Cobb-Douglas production model: if L is the number of labor hours spent to produce the boards and K the dollars of capital invested, (number of boards) = k L K , for some constants k, , and . Let's say that we have a contract to produce 15,000 circuit board As, and 25,000 circuit board Bs, and that the Cobb-Douglas models for these are 0.7 15000 = 5L0.3 A KA and 0.6 25000 = 2L0.4 B KB . Suppose you have 2000 total labor hours available, so that 2000 LA + LB . Finally, the cost of production is the capital invested in the production of each type of board, and the cost of the labor. Suppose that each hour of labor on circuit A costs $20, while each hour on circuit B costs $25. (In the following you may assume that the gradients of the constraints are linearly independent, as they are.) Exercise 5: Write an equation for the total cost of production, and the constraints. What are the variables in the optimization problem? Exercise 6: Consider the case 2000 > La + LB . Find possible locations of the minimum cost by using the technique from exercise 2. Exercise 7: Now consider the boundary 2000 = La + LB . Find possible locations of the minimum cost, and by using the results from 6 find the minimum production cost. References [JS] Stewart, James. Calculus. Eighth edition. Boston, MA:Cengage, 2016
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started