Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Lagrange Multipliers: Example: Find The Maximum of

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

Lagrange multipliers

Normally if we want to maximize or minimize a function of two variables

 

 



, then we set

(1)

solve the two simultaneous equations we get, and were done. But suppose we have in addition a


constraint that says that and can only take certain values. We want to maximize (or minimize)

the function subject to that constraint. In other words, out of the set of values
that satisfy the

constraint, we want to find the ones that give the largest value of
.



All possible constraints can always be rearranged to read 




 
  . For instance, the constraint
 gives us a line or curve
  , and so forth. The equation 
 
  and be written

in
the
plane. We want to go along that line and find the point on it with the largest value of
.

When we find that largest value, we know that
will be stationary as we move along the line.
Thats what being a maximum means. This in turn means that the gradient
is perpendicular to
the line of the constraint at this point, because the gradient is always perpendicular to the contour (the
line of constant ).
But we know something else also. The constraint is also constant long the line. Of course it is

! , and zero is a constant. So it also has a gradient " that is
its zero by construction 
perpendicular to the line. Thus the two gradients arent equal, but they do point in the same direction.
$# " , where # is some number that we dont
In other words, they are proportional to each other
at present know the value of. This number # is called a Lagrange multiplier. Rearranging, we see
%
# &  , or
that

(' 
But if +'





where '


)

# 


*

, then all partial derivatives of ' are zero.

(2)



This gives us a method for finding our maximum. We simply construct the function '
as above,
but multiplying  by a constant # , and then we set all partial derivatives of ' to zero and solve the set
of simultaneous equations we get. This gives us a solution for the maximum of ' .

The only problem is that the solution still contains the constant # , whose value we dont know. But
we can solve that problem easily enough. We still have one more equationthe constraint. If we


substitute our solution for and back into the constraint, we get another equation that we can solve
for # , and then were done.

-  /.0 
&1/
,.
,
subject to the constraint that


   2.3 
 +14(

Our two basic functions are
and 
 
,
, . Notice that we have
 . Then the Lagrange function '
rearranged the constraint so that 
is

5 )

6  /.3   &178 9*

# 
,
#
'
,
(3)

Example: Find the maximum of

The our simultaneous equations for the solution are

'

 :

;.<=
#


1

?>@ *
'
 :
#

(4)

Hence, the maximum of



is at

BA  C
 A
# , D#

is. To get this, we substitute our


 ,  , 
. # > # , 

(5)

(6)

To complete the solution, we just need to know what the value of




and into the constraint, to get

"17
which gives us #=

 DE

Putting it all together, we then find that

 #

.F

.


 #

>6


, *

More than two variables: It easy to show that the method generalizes to more than two variables and
HJIKL
*M*M*N
 PHJI3 9RQ
*S*M*UT
,
,
of variables and a set MO G
more than one constraint. If we have a set G
of constraints, then one constructs the function

where

G#O

is a set of

 PHVI3  PHJI3 )XY W


 PHJI3 9

# O9SO G
' G
G
OZ A

(7)

unknown Lagrange multipliers. Then we solve the

simultaneous equations


'
PH 
PH

to get in terms of the # O , and we substitute the answer back into the
equations that we solve for # O .

(8)
constraints to get

[H

more

^]<

are now \
for
This is what you need to do for maximizing the entropy, where the variables
different states, and the constraints are given in the question. Evaluating the Lagrange multipliers
in that case gives you complicated expressions in terms of the energy and so forth, but its OK just
to leave the multipliers in there. By convention we always write our expressions in terms of the
multipliers themselves (temperature, partition function, etc.) rather than energy and so forthits
more convenient that way.

You might also like