Você está na página 1de 18

Unit 8

Optimization
In your introductory calculus course, you will have learned how the rst
and second derivatives of a function y = f(x) give information about maxima
and minima (i.e. extreme values) of the function. We know that a univariate
function y = f(x) (i.e. a function of only 1 independent variable) can only
have a local maximum or a local minimum at a critical number in the domain
of f, where c is a critical number of f if either f

(c) = 0 or f

(c) does not


exist. Furthermore, for a continuous function f, if f

(c) = 0 and f

(c) > 0
then f has a local minimum at x = c, while if f

(c) = 0 and f

(c) < 0 then


f has a local maximum at c.
(Recall: f

(c) = 0 means that f(x) has a horizontal tangent line at x = c.


f

(c) > 0 means that f is concave up at x = c, so the horizontal tangent


indicates that f was decreasing to the left of x = c and starts increasing to
the right of x = c, having reached a local minimum at x = c. Similarly,
f

(c) < 0 means that f is concave down at x = c, so in this case the hori-
zontal tangent indicates that f was increasing to the left of x = c and starts
decreasing to the right of x = c, having reached a local maximum at x = c.)
We have similar properties with functions of 2 variables. Of course, since
a surface z = f(x, y) is more complicated than a curve y = f(x), some of the
denitions and results are a bit more complex.
Denition 8.1. Let D be the domain of a function f(x, y) and let (a, b) D.
Then we say that
(i) f(a, b) is the maximum value of f(x, y) on D
if f(a, b) f(x, y) for every (x, y) D.
(ii)f(a, b) is the minimum value of f(x, y) on D
if f(a, b) f(x, y) for every (x, y) D.
1
Note: The maximum and minimum values of f(x, y) are sometimes referred
to as the absolute maximimum and absolute minimum values, respectively.
Denition 8.2. The extreme values of f(x, y) are the absolute minimum
and absolute maximum values of the function.
If f(a, b) is not the largest (or smallest) value of f that occurs anywhere
in the domain, but is the largest (or smallest) value that occurs anywhere
near this point (i.e. in the neighbourhood of (a, b)), then f has a local max-
imum (or minimum) at (a, b).
Denition 8.3. Let D be the domain of a function f(x, y) and let (a, b) D.
Then we say that
(i) f(a, b) is a local maximum value of f(x, y)
if f(a, b) f(x, y) for every (x, y) nearby (a, b).
(ii)f(a, b) is a local minimum value of f(x, y)
if f(a, b) f(x, y) for every (x, y) nearby (a, b).
Figure 1 shows part of the surface f(x, y) = x
2
+ y
2
which is easily seen
to have both a local minimum and a minimum (ie. absolute minimum) at
the point (0, 0), so the minimum value of f(x, y) = x
2
+ y
2
is f(0, 0) = 0.
Figure 1: f(x, y) = x
2
+ y
2
There are only 3 kinds of places at which the extreme values of f(x, y)
can occur. As with univariate functions, we refer to such places as critical
points of the function.
2
Denition 8.4. A point (a, b) in the domain D of a function f(x, y) is a
critical point of the function if:
(1) f
x
(a, b) = f
y
(a, b) = 0, i.e. the rst partials are both 0,
or (2) (a, b) is on the boundary of D,
or (3) (a, b) is a point where the graph has some type of pathalogical be-
haviour - for instance a point where the graph is ripped or has a corner,
or uctuates wildly.
Our main concern is with condition (1) and we will not talk about condi-
tion (3) at all. We need to dene a critical point in this way so that we may
state the following theorem.
Theorem 8.5. An extreme value may only occur at a critical point.
Recall Figure 2 from Unit 7, reproduced below (again called Figure 2). At
the point (x, y, z) = (a, b, f(a, b)) shown there, both traces have horizontal
tangent lines (i.e. both rst partials are 0). We can see that this point is a
local (and, in this case, absolute) maximum of the function. This point is a
local maximum of both traces, i.e. of f(x, b) and also of f(a, y).
Figure 2: The Geometric Interpretation of Partials
Local minima and maxima of f(x, y) occur at places where both rst
partials are 0. However, not all such places correspond to a local maximum
or local minimum. It is possible to have a point (a, b) in the domain of f at
which f
x
(a, b) = f
y
(a, b) = 0 such that the function f(x, b) has a local min-
imum at (a, b) while the function f(a, y) has a local maximum at (a, b) (or
vice versa). Thus, both traces have horizontal tangents at (a, b), but f(a, b)
is neither the largest nor the smallest function value nearby. (i.e. moving
3
from this point along one trace gives higher function values, while moving
away along the other trace gives lower function values.) This kind of point
is called a saddle point. The point P in Figure 3 is such a point.
Figure 3: Saddle Surface
Figure 4 shows a typical surface z = f(x, y) which has a number of local
maxima, local minima and saddle points.
Figure 4: Maximal and Minimal Points of a Surface
4
Finding Extreme Values
There is a relatively straightforward test which usually (but not always)
tells us about whats happening to a function value f(x, y) at a point (a, b)
at which both rst partials are 0.
Theorem 8.6. The Second Partials Test
Suppose that the second partials of f(x, y) are all continuous in a neighbour-
hood of some point (a, b) in the domain of f, and that f
x
(a, b) = 0 = f
y
(a, b)
(so that (a, b) is a critical point of f).
Let T(a, b) = [f
xx
(a, b)][f
yy
(a, b)] [f
xy
(a, b)]
2
. Then:
(1) If T(a, b) > 0 and f
xx
(a, b) < 0 then f has a local maximum at (a, b).
(2) If T(a, b) > 0 and f
xx
(a, b) > 0 then f has a local minimum at (a, b).
(3) If T(a, b) < 0 then f has a saddle point at (a, b).
(4) If T(a, b) = 0 then this test yields no information about f(a, b).
(i.e. the test is inconclusive.)
Example 1. Find all critical points of f(x, y) =
x
2
2
+6x+xy y
2
+y
3
and de-
termine whether each is a local maximum, a local minimum or a saddle point.
Solution: Notice that f(x, y) is dened and is continuous everywhere. Thus
there are no boundary points and no places at which the function behaves
peculiarly. So the only critical points will be those which occur when both
rst partials are 0. We need to nd the rst partials of f:
f
x
(x, y) =

x
_
x
2
2
+ 6x + xy y
2
+ y
3
_
= x + 6 + y
f
y
(x, y) =

y
_
x
2
2
+ 6x + xy y
2
+ y
3
_
= x 2y + 3y
2
To nd the critical points, we set each of these equal to 0. This often allows
us to express one variable in terms of the other:
x + 6 + y = 0 x = y 6
x 2y + 3y
2
= 0 x = 2y 3y
2
To nd the places at which both are 0, we equate these two expressions for x.
That is, we have seen that x = y6 whenever f
x
= 0, and that x = 2y3y
2
5
whenever f
y
= 0, so it must be true that y 6 = 2y 3y
2
whenever both
f
x
and f
y
are 0.
y6 = 2y3y
2
3y
2
3y6 = 0 3(y
2
y2) = 0 (y2)(y+1) = 0
We see that both rst partials are 0 when y = 2 and x = y 6 = 8 and
also when y = 1 and x = y 6 = 5. So the critical points of f are
(x, y) = (8, 2) and (x, y) = (5, 1).
To determine whether each is a (local) maximum or minimum, or is a saddle
point, we need to do The Second Partials Test, for which we need to nd the
second partials and also T.
f
xx
=

x
(x + 6 + y) = 1
f
yy
=

y
_
x 2y + 3y
2
_
= 2 + 6y
f
xy
=

y
(x + 6 + y) = 1
So we have T(x, y) = f
xx
f
yy
(f
xy
)
2
= (1)(2 + 6y) (1)
2
= 6y 3.
Notice that f
xx
(x, y) = 1 > 0 for all (x, y) in the domain of f. So f cannot
have any local maxima (because local maxima have T > 0 and f
xx
< 0).
We use the T function to test each of the critical points to see if we can
determine whether each is a local minimum or a saddle point.
For (8, 2), we have T(8, 2) = 6(2) 3 = 9 > 0 so we see that (with T > 0
and f
xx
> 0) this critical point is a local minimum of f.
For (5, 1), we have T(5, 1) = 6(1) 3 = 9 < 0 so we see that
(because T < 0) this critical point is a saddle point of f.
Example 2. Determine the dimensions of an open rectangular box as shown
in Figure 5, in order for the box to have volume 32 m
3
, and have the mini-
mum possible surface area.
Solution: The open box has a bottom of dimension xy, 2 sides of dimension
xz and 2 more sides each of dimension y z. The surface area of the box is
found by summing the surface areas of all of these parts of the box. Letting
A be the total surface area, we have:
A = xy + 2xz + 2yz
6
Figure 5:
We wish to minimize this area, subject to the constraint that the volume of
the box (given by xy z) must be 32 m
3
. We can rearrange the constraint
that xyz = 32 to get z =
32
xy
, and substitute this into the area function. This
gives a new area function (of only 2 variables, x and y) which ensures that
the constraint is satised. Thus, we need to minimize:
A = xy +
64
y
+
64
x
We need to nd the dimensions, i.e. x and y (and hence z) values, which
minimize this function. Notice: Since the dimensions of the box must be
strictly positive, then the domain of the function is x > 0, y > 0 and we see
that A is continuous on this domain. The rst partials of the function are:
A
x
=

x
_
xy +
64
y
+
64
x
_
= y
64
x
2
A
y
=

y
_
xy +
64
y
+
64
x
_
= x
64
y
2
We need to nd the critical points of the function, i.e. the points at which
A
x
= 0 and also A
y
= 0.
For A
x
= 0 we require that y
64
x
2
= 0, i.e. that y =
64
x
2
.
Similarly, for A
y
= 0 we require that x
64
y
2
= 0, i.e. that x =
64
y
2
.
To have both of these holding simultaneously, we need to have x =
64
y
2
while
y =
64
x
2
, so that x =
64
(
64
x
2
)
2
=
x
4
64
. We can solve this for x:
x =
x
4
64
64x = x
4
64x x
4
= 0 x(64 x
3
) = 0
This is satised when x = 0 or when x
3
= 64 x = 4. We discard x = 0
because this value of x is not in the domain of the area function. When
7
x = 4, we have y =
64
x
2
=
64
16
= 4. Thus, the only critical point in the domain
is the point (x, y) = (4, 4).
We need to check, using the second partials test, that the point (4,4) is
indeed a minimum of the area function. To do this, we need to nd the
second partials of the function.
A
xx
=

x
_
y
64
x
2
_
= 0 64
_
2x
3
_
=
128
x
3
A
yy
=

y
_
x
64
y
2
_
=
128
y
3
A
xy
= A
yx
=

x
_
x
64
y
2
_
= 1
So we have A
xx
(4, 4) = A
yy
(4, 4) =
128
4
3
=
128
64
= 2 and A
xy
(4, 4) = 1. Thus
the T-value for the second partials test is
T(4, 4) = [A
xx
(4, 4)] [A
yy
(4, 4)] [A
xy
(4, 4)]
2
= (2)(2) 1
2
= 3 > 0
Since A
xx
(4, 4) = 2 > 0 and T(4, 4) = 3 > 0, then by the second partials
test we see that the critical point (4,4) is indeed a local minimum for A.
Thus x = 4, y = 4 and z =
32
xy
=
32
16
= 2 are the dimensions required. The
minimum surface area of the box is therefore:
A = xy +
64
y
+
64
x
= (4)(4) +
64
4
+
64
4
= 48m
2
Or, using the original function, we get
A = xy + 2xz + 2yz = (4)(4) + 2(4)(2) + 2(4)(2) = 48m
2
.
Example 3. A company makes 2 kinds of widgets - type 1 and type 2. If the
company produces some quantity x of the type 1 widget and some quantity
y of the type 2 widget, they will be able to sell each type 1 widget for a price
of $110 $5x, and each type 2 widget for a price of $85 $3y. Producing x
type 1 widgets and y type 2 widgets will cost C(x, y) = 6x+5y 2xy dollars.
Find the production levels of the 2 types of widgets which will maximize the
companys prot.
Solution: Of course, profit = revenue cost. We know the cost, C(x, y), of
producing x type 1 widgets and y type 2 widgets. The revenue from selling x
type 1 widgets at a price of $110$5x each is x(1105x) = 110x5x
2
dollars.
Similarly, the revenue from selling y type 2 widgets at a price of $85$3y each
8
is y(853y) = 85y3y
2
dollars. So the total revenue (in $s) from producing
x type 1 widgets and y type 2 widgets will be R(x, y) = 110x5x
2
+85y3y
2
.
Thus the companys prot, in dollars, is given by:
P(x, y) = R(x, y) C(x, y)
=
_
110x 5x
2
+ 85y 3y
2
_
(6x + 5y 2xy)
= 104x 5x
2
+ 80y 3y
2
+ 2xy
We need to nd the maximum of this function. We see that:
P
x
(x, y) = 104 10x + 2y and P
y
(x, y) = 80 6y + 2x.
Now, P
x
(x, y) = 0 104 10x + 2y = 0 y =
10x104
2
= 5x 52.
Likewise, P
y
(x, y) = 0 80 6y + 2x = 0 x =
6y80
2
= 3y 40.
To have x = 3y 40 while y = 5x52, we must have x = 3(5x52) 40
x = 15x15640 14x = 196 x = 14, which gives y = 5(14) 52 = 18.
So (x, y) = (14, 18) is a critical point of this function.
We can easily conrm that this is a local maximum, using the second
partials test. We have:
P
xx
(x, y) = 10, P
yy
(x, y) = 6 P
xy
(x, y) = 2
so T(x, y) = P
xx
(x, y)P
yy
(x, y)(P
xy
(x, y))
2
= (10)(6)(2)
2
= 56 > 0.
Thus, we see that P
xx
< 0 and T > 0, indicating that it is indeed a local
maximum which occurs at the point (x, y) = (14, 18).
Question: Is (x, y) = (14, 18) the only critical point of the prot function?
Its the only one at which P
x
= P
y
= 0, and the function P(x, y) is well-
behaved everywhere. However, we need to think about what the domain of
the function is. Since x and y correspond to production levels, we must have
x 0 and also y 0. That is, we cannot produce negative quantities of
either type of widget. So there is a boundary of the domain on which there
could be other maxima. That is, it could be that prot is maximized by
producing only one type of widget. So we need to check what happens when
x = 0 and also what happens when y = 0.
We have P(0, y) = 80y 3y
2
, which is maximized when P
y
(0, y) = 0,
which occurs at y =
40
3
, giving a maximum prot of $533.33 when no type
1 widgets are produced. Similarly, we have P(x, 0) = 104x 5x
2
which is
maximized at x = 10.4 giving a maximum prot of $540.80 when no type 2
9
widgets are produced. Since both of these are lower than P(14, 18) = $1448,
we see that the interior critical point we found with the second partials test
is the absolute maximum of this prot function. Thus, the company should
produce 14 type 1 widgets and 18 type 2 widgets in order to obtain the max-
imum possible prot, which is $1448.
Constrained Optimization: Lagranges Method
We have already solved a constrained optimization problem, i.e. a prob-
lem of the form: maximize or minimize the value of some function f subject
to satisfying some condition (constraint) that some other function g must
have some specied value. In order to nd the minimum surface area of an
open box with volume 32 cm
2
, we solved
minimize xy + 2xz + 2yz
subject to xyz = 32
by rearranging the constraint to z =
32
xy
and substituting for z in xy+2xz+2yz
to obtain the unconstrained problem
minimize xy +
64
y
+
64
x
.
Solving this unconstrained minimization problem simply involved a straight-
forward application of the second derivative test.
The approach we used in that problem worked because we were able to
use the constraint to express one of the variables in terms of the others in
order to incorporate the constraint into the function to be optimized. But
what if the constraint function was more complicated, so that this was not
possible? For instance, suppose we wanted to solve a problem like
minimize xy + 2xz + 2yz
subject to
x
4

y
z
xy
2
z
3
= 15
Here, it is dicult, or perhaps even impossible, to use the constraint to ex-
press one variable in terms of the others, so we are unable to use our previous
approach to transform this constrained problem into an unconstrained prob-
lem. We need a new approach.
Notice that although it is true that our previous approach reduced the
number of variables in the problem, this is not what made it successful. The
10
important feature was the transformation of a constrained optimization prob-
lem into an unconstrained optimization problem. There is another method
we can use which also transforms a constrained optimization problem into
an unconstrained optimization problem. It does so by introducing a new
variable. This approach is known as Lagranges Method.
To use Lagranges Method to solve an optimization problem involving
a single constraint, we dene a new function, involving a new variable, ,
and then nd the points for which all rst partials of this new function are
0. That is, we nd the critical points (of type 1) of the new function, as
we would in solving any unconstrained optimization problem. All local ex-
treme points of the original, constrained, problem, will be found among these
critical points of the new function, so we simply need to identify which of
these points has the minimum or maximum value of the original function we
needed to optimize.
So how do we form this new function? Its very straightforward. Suppose
we wish to optimize some function f subject to the constraint that some
other function g must have the value 0. Then the function we use for La-
granges Method is F = f +g. That is, we simply add times the constraint
function to the function we wish to optimize.
Notice: We must have the constraint function required to be 0 to do this.
Thats not a problem, though, because we can rearrange any constraint equa-
tion into this form, simply by moving everything to the left hand side.
We state Lagranges Method in the context of a 2-variable problem. Gen-
eralizing the method to functions of more variables is straightforward, and is
discussed briey immediately following the presentation of the method. An
example is given later.
Theorem 8.7. Lagranges Method (for 2-variable problems)
To solve the constrained optimization problem:
optimize f(x, y)
subject to g(x, y) = 0
form the function:
F(x, y, ) = f(x, y) + g(x, y)
11
and nd all points which satisfy:
F
x
(x, y, ) = 0
F
y
(x, y, ) = 0
F

(x, y, ) = 0
All local maxima and minima of the original constrained problem will be
among the points found. Thus, to nd the optimum, it is only necessary to
determine which of these points gives the optimal value of f(x, y).
This method can be extended to problems involving more than 2 vari-
ables in a very straightforward way. If our f and g functions are functions of
n independent variables, then the function F = f +g is a function of n +1
independent variables, and hence has n +1 rst partials. We nd the points
which satisfy all rst partials of F having the value 0, and check which gives
the optimal value of f.
Notice: The function F = f +g has F

= g, so requiring F

= 0 ensures
that the constraint g = 0 is satised. This is why we must put the constraint
into this form.
Lagranges Method works for any constrained optimization problem, in-
cluding those we can solve by the previous approach. Lets see how La-
granges Method works by applying it to a very easy problem, i.e. one which
we can solve using our old approach, to see that the 2 approaches do, indeed,
give the same answer.
Example 4. Solve the problem of nding the minimum of x
2
+ y
2
subject to
the constraint x y = 6 by 2 methods:
(a) by using the constraint to eliminate one of the variables,
(b) using Lagranges Method.
Solution:
(a) We require x y = 6, which we can rearrange to x = y +6. Substituting
for x in x
2
+y
2
we get (y +6)
2
+y
2
= (y
2
+12y +36) +y
2
= 2y
2
+12y +36.
We get the unconstrained problem of nding the minimum of 2y
2
+12y +36.
12
Because we started with a 2-variable problem and eliminated one variable,
we now have only a single variable problem, which is easily solved. To nd
the critical values of f(y) = 2y
2
+ 12y + 36, we set f

(y) = 0. We have
f

(y) = 4y + 12, so f

(y) = 0 4y + 12 = 0 y = 3. We have only one


critical value of f (notice that f is a parabola, so it has only a single extreme
point). We can verify that this is a local minimum by seeing that f

(y) = 4,
so f

(3) = 4 > 0.
When y = 3, we have x = y + 6 = 3 and x
2
+ y
2
= 18, so we see that the
minimum value of x
2
+y
2
subject to the constraint x y = 6 is 18, achieved
at the point (x, y) = (3, 3).
(b) We have the problem of nding the minimum of the given function
f(x, y) = x
2
+ y
2
subject to the constraint that x y = 6. Rearranging
this constraint to xy 6 = 0, we get the constraint function for Lagranges
Method as g(x, y) = x y 6. This gives us the Lagrange function as:
F(x, y, ) = f(x, y) + g(x, y) = x
2
+ y
2
+ (x y 6)
We nd the rst partials of F and set them equal to 0.
F
x
(x, y, ) =

x
_
x
2
+ y
2
+ (x y 6)

= 2x +
F
y
(x, y, ) =

y
_
x
2
+ y
2
+ (x y 6)

= 2y + (1) = 2y
F

(x, y, ) =

_
x
2
+ y
2
+ (x y 6)

= x y 6
So we require 2x+ = 0 and 2y = 0 and x y 6 = 0. We need to nd
the points which satisfy all 3 of these equations. Because of the form of the
function F, we can (almost) always rearrange each of the equations requiring
that the rst partial of F with respect to one of the original variables must
be 0 to the form = some function of the original variables. (That is, we can
do this for each of the equations except for the one which requires F

= 0.)
In the current problem, we have:
F
x
(x, y, ) = 0 2x + = 0 = 2x
F
y
(x, y, ) = 0 2y = 0 = 2y
Since both these equations must be satised simultaneously, we equate these
expressions for . This often allows us to express one of the variables in terms
13
of the other(s). Here, we have = 2x and = 2y, so 2x = 2y y = x.
We also require that xy6 = 0, so we substitute y = x into this equation
and then solve for x. We get x y 6 = x (x) 6 = 2x 6, so we need
2x 6 = 0 which is satised only when x = 3.
When x = 3, we have y = x = 3 (and = 2y = 6) so we see that
(x, y) = (3, 3) is the only point which satises all rst partials of F being
0, so this must be the solution to our original problem. That is, we see (as
before) that f(3, 3) = 18 is the minimum value of f(x, y) = x
2
+y
2
subject
to the constraint that x y 6 = 0.
Now lets look at a problem which we cant solve using our previous approach.
Example 5. Find the maximum and minimum values of x y subject to the
constraint x
2
+ y
2
+ xy 6x = 4.
Solution: We have f(x, y) = x y as the function whose maximum and
minimum values we need to nd. The constraint is x
2
+ y
2
+ xy 6x = 4
which can also be written as x
2
+ y
2
+ xy 6x 4 = 0, so the constraint
function for Lagranges Method is g(x, y) = x
2
+ y
2
+ xy 6x 4.
The Lagrange function is therefore F(x, y, ) = xy+(x
2
+y
2
+xy6x4),
which has rst partials:
F
x
(x, y, ) = 1 + (2x + y 6)
F
y
(x, y, ) = 1 + (2y + x)
F

(x, y, ) = x
2
+ y
2
+ xy 6x 4.
Setting F
x
= 0 gives
1 + (2x + y 6) = 0 (2x + y 6) = 1 =
1
2x + y 6
Setting F
y
= 0 gives
1 + (2y + x) = 0 (2y + x) = 1 =
1
2y + x
We are only interested in points which satisfy both of these equations, so
these -values must be equal. That is, we need:

1
2x + y 6
=
1
2y + x
(2y + x) = 2x + y 6
14
So we need 3y = 3x 6 y = 2 x.
Now, setting F

= 0, we have x
2
+ y
2
+ xy 6x 4 = 0 and substituting in
y = 2 x (because we need this equation to be satised at the same time as
the others) gives
x
2
+ (2 x)
2
+ x(2 x) 6x 4 = 0
x
2
+ (4 4x + x
2
) + (2x x
2
) 6x 4 = 0
x
2
8x = 0 x(x 8) = 0
Thus we need x = 0 or x = 8 in order to satisfy all of our equations (i.e. to
have all rst partials be 0).
When x = 0 we have y = 2 x = 2, so (0, 2) is a candidate for a point at
which the maximum or minimum value may occur.
When x = 8 we have y = 2 x = 6, so (8, 6) is another candidate point.
Both the maximum and minimum values (if they exist) of f(x, y) = x y
subject to the constraint x
2
+ y
2
+ xy 6x = 4 must be among the points
identied by setting the rst partials of the Lagrange function all equal to
0, so one of these candidate points gives the maximum value and the other
gives the minimum value. We simply evaluate the function f(x, y) = xy at
both these points to see which point gives the higher value and which gives
the lower value. For the point (0, 2) we have f(0, 2) = 0 2 = 2, while for
the point (8, 6) we have f(8, 6) = 8 (6) = 14. So the maximum value
is 14, which occurs at (8, 6) and the minimum value is -2, which occurs at
(0, 2).
Example 6. Find the maximum value of f(x, y) = x
2
+ y
2
subject to the
constraint x
2
+ xy + y
2
= 12.
Solution: Notice that we cannot isolate either x or y in this constraint. We
have f(x, y) = x
2
+ y
2
and g(x, y) = x
2
+ xy + y
2
12, so the Lagrange
function is F(x, y, ) = x
2
+ y
2
+ (x
2
+ xy + y
2
12). The rst partials of
this function are:
F
x
(x, y, ) = 2x + (2x + y) F
y
(x, y, ) = 2y + (x + 2y)
F

(x, y, ) = x
2
+ xy + y
2
12
We set F
x
(x, y, ) = 0 and F
y
(x, y, ) = 0 and isolate in each:
2x + (2x + y) = 0 (2x + y) = 2x =
2x
2x + y
15
2y + (x + 2y) = 0 (x + 2y) = 2y =
2y
x + 2y
Next, we equate these to solve for y in terms of x (or vice versa).

2x
2x + y
=
2y
x + 2y
(x + 2y)(2x) = (2x + y)(2y)
2x
2
+ 4xy = 4xy + 2y
2
2x
2
= 2y
2
x
2
= y
2
y = x
Now, we use F

(x, y, ) = 0 to nd the critical points. We have the equation


x
2
+ xy + y
2
12 = 0, with y = x.
When y = x, we have x
2
+x(x)+(x)
2
12 = 0, so 3x
2
= 12 and x
2
= 4, which
gives x = 2. This gives us two critical points: (2,2) and (-2,-2) (because
we have y = x).
When y = x, we have x
2
+x(x) +(x)
2
12 = 0, so x
2
= 12 which gives
x =

12 = 2

3. This gives us two more critical points: (2

3, 2

3)
and (2

3, 2

3) (remember: here we have y = x).


We have 4 critical points as candidates for giving the maximum value of
f(x, y) = x
2
+ y
2
. We see that f(2, 2) = f(2, 2) = 4 + 4 = 8, and
f(2

3, 2

3) = f(2

3, 2

3) = (2

3)
2
+(2

3)
2
= 12+12 = 24. Clearly,
24 is a local maximum value and 8 is a local minimum value. So the maxi-
mum value of x
2
+ y
2
subject to x
2
+ xy + y
2
= 12 is 24, occurring at both
(2

3, 2

3) and (2

3, 2

3).
As stated previously, we can extend Lagranges Method to functions in-
volving more than 2 variables. To see how this works, we can look at the
problem we solved previously.
Example 7. Use Lagranges Method to nd the minimum value of the func-
tion f(x, y, z) = xy + 2xz + 2yz subject to the constraint xyz = 32.
Solution: Notice that this is the open box problem from Example 2 earlier in
this Unit. We start by writing the constraint in the form xyz 32 = 0. Thus
we have the functions f(x, y, z) = xy + 2xz + 2yz and g(x, y, z) = xyz 32.
We use these to write the Lagrange function:
F(x, y, z, ) = f(x, y, z) + g(x, y, z) = xy + 2xz + 2yz + (xyz 32)
16
We nd the rst partials of F:
F
x
(x, y, z, ) = y + 2z + (yz)
F
y
(x, y, z, ) = x + 2z + (xz)
F
z
(x, y, z, ) = 2x + 2y + (xy)
F

(x, y, z, ) = xyz 32
Setting F
x
(x, y, z, ) = 0 we have
y + 2z + yz = 0 yz = y 2z =
y + 2z
yz
(1)
Setting F
y
(x, y, z, ) = 0 we have
x + 2z + xz = 0 xz = x 2z =
x + 2z
xz
(2)
Setting F
z
(x, y, z, ) = 0 we have
2x + 2y + (xy) = 0 xy = 2x 2y =
2x + 2y
xy
(3)
Since we need all 3 of these rst partials to be 0 at the same time, we need
these expressions for to be equal. Equating (1) and (2), we have

y + 2z
yz
=
x + 2z
xz
xz(y + 2z) = yz(x + 2z)
xyz + 2xz
2
= xyz + 2yz
2
2xz
2
= 2yz
2
2xz
2
2yz
2
= 0
z
2
(x y) = 0
All values of x, y and z which satisfy this equation make F
x
= 0 and F
y
= 0.
Equating (1) and (3) we get:

y + 2z
yz
=
2x + 2y
xy
xy(y + 2z) = yz(2x + 2y)
xy
2
+ 2xyz = 2xyz + 2y
2
z
xy
2
= 2y
2
z
y
2
(x 2z) = 0
17
All values of x, y and z which satisfy y
2
(x2z) = 0 make F
x
= 0 and F
z
= 0.
Remember: We also need to satisfy:
F

(x, y, z, ) = 0 xyz 32 = 0 xyz = 32 (4)


With this in mind, we see that none of x, y or z can be zero. Thus, we need
z
2
(x y) = 0 x y = 0 x = y, and y
2
(x 2z) = 0 x 2z = 0
x = 2z. That is, in order to have equations (1), (2) and (3) all satised with
neither of y nor z being 0 we need y = x and z =
x
2
. Substituting these
values into (4), we get:
xyz = 32 x(x)
_
x
2
_
= 32
x
3
2
= 32 x
3
= 64 x = 4
When x = 4, we have y = x = 4 and z =
x
2
= 2. Thus, we see that
the point (x, y, z) = (4, 4, 2) is the only candidate for the minimum of
f(x, y, z) = xy + 2xz + 2yz subject to xyz = 32. This point must be ei-
ther a local maximum or a local minimum, and common sense, or a bit of
thought, tells us it must be a minimum.
Notice: We can satisfy xyz = 32 by setting y =
1
x
and z = 32. We see
that f(x,
1
x
, 32) = x
_
1
x
_
+2x(32) +2
_
1
x
_
(32) = 1 +64x +
64
x
. In this way we
can make the value of f(x, y, z) as large as we like by choosing a very large
value for x (while setting y =
1
x
and z = 32). That is, there is no upper limit
on how much material we can use to make a box whose capacity is 32 cm
2

we just make the box very big in one dimension and correspondingly small
in another direction for instance a very long but extremely narrow box.
Thus, the function f(x, y, z) has no maximum so the point we found must
be a minimum.
We see (as before) that the minimum value of f(x, y, z) = xy + 2xz + 2yz
subject to xyz = 32 occurs at (4, 4, 2). The minimum value is f(4, 4, 2) = 48.
18

Você também pode gostar