Optimizing Using Lagrange Multipliers
Calculus III, or sometimes called Multivariable Calculus, deals mostly with functions and surfaces in three dimensions (ie. f(x,y,z)). Like in Calculus I, optimizing functions had several real life applications. For exmaple, using a function in two dimensions, we could find the largest area a square could have under certain given conditions (ie. Perimeter = 32). In three dimensions, the problem gets slightly more complicated but using Lagrange Multipliers simplify the task.
Assume we are asked to find the maximum area of a box subject to the fact that the total area of the box is equal to 128 units squares. Lagrange theory states that a the gradiant of a function is equal to the restriction function multiplied by a constant lambda:
< fx , fy , fz > = λ< gx , gy , gz >
In this case, we are trying to maximize the volume of a box which we all know to be: base x height x width. This can we rewritten using variables as:
f(x,y,z) = xyz
That takes care of our first function. Now we need to find a functional representation for the restriction applied in this question. We need to maximize the volume of the box BUT we need the total area of that box to remain 128 units. This restriction can be rewritten as:
g(x,y,z) = 2xy + 2yz + 2zx
128 = 2xy + 2yz + 2zx
64 = xy + yz + zx
We now have the function we want to maximize and the functional representation of the restriction applied. Plugging all the information we found into the Lagrange formula above, we get a set of 4 equations to solve:
yz = λ(y+z)
xz = λ(x+z)
xy = λ(y+x)
64 = xy + yz + zx
To not get lost in the equations, keep in mind that we want to find values for x, y and z such that the volume of the box is at a maximum under the restriction above. We can simplify the above equations by multiplying the first three by the only variable missing in each of the equations. We then get this:
xyz = λ(xy+xz)
xyz = λ(xy+yz)
xyz = λ(yz+xz)
64 = xy + yz + zx
We then set the first two equations equal to each other and solve.
λ(xy+xz) = λ(xy+yz)
λ(zx-zy) = 0
λ = 0
z = 0
x = y
The three conclusions above cannot all be valid. We know that λ cannot be equal to 0, if it was we would have a volume also of 0. Therefore this equation can be thrown out. Following we get z= 0, which also could not be valid seeing as it would also lead to a volume of 0. The final equation is the one that matters. We have proven that the x and y sides of the box must be equal. Moving on, we will set the second and third equations from the original set equal to each other and solve once again.
λ(xy+yz) = λ(yz+xz)
λ(xy-xz) = 0
λ = 0
x = 0
y = z
Once again, we are found with three equations, two of which are invalid (λ = 0 and x = 0). We are then left with y = z. Now we know that the dimensions of the box must be all the same for it to be a maximum, therefore we have a cube:
x = y = z
But this is not enough, we need to consider the restriction function and find actual numerical values for the dimensions. Substituting what we know into the restriction formula we get:
xx + xx + xx = 64
x = ± √(64/3)
x = √(64/3)
We may throw out the negative value for x seeing as we are dealing with positive dimensions. Answering the question we get that the dimensions for the box that has the largest possible volume, yet has a total area of 128 are:
x = √(64/3)
y = √(64/3)
z = √(64/3)
Its as simple as that! You now know how to optimize in three dimensions using Lagrange Multipliers.
