Lagrange Multipliers

advertisement
Honor’s Contract – Lagrange Multipliers
Severin Davis
The purpose of the method of Lagrange multipliers is to find the maximum and minimum
of a function of three variables. To do this, f(x, y, z) is constrained by g(x, y, z) = k.
The maximum and minimums occur when the two level curves of f and g are tangent
to each other. Since they are tangent, their gradients will be parallel.
From that we get:
∆𝑓(𝑥, 𝑦, 𝑧) = λ ∆g(𝑥, 𝑦, 𝑧)
λ accounts for the fact that the gradients may be in opposite directions or different lengths,
but they have to be parallel.
From this equation, one can obtain three equations by breaking the gradient down into its
components.
This results in three equations:
𝑓𝑥 = λ g x
𝑓𝑦 = λ g y
𝑓𝑧 = λ g z
Unfortunately, at the moment, these equations contain four variables; λ, x, y, and z.
However, g(𝑥, 𝑦, 𝑧) = k provides the fourth equation to solve the system.
Often, the value of λ isn’t important and only the x, y, and z values are needed.
As an example of this method, consider the following problem involving the maximization
of the volume of a box.
The volume of the box is given by:
𝑉 = 𝑥𝑦𝑧
This is constrained by
𝑔(𝑥, 𝑦, 𝑧) = 3𝑥𝑧 + 𝑦𝑧 + 3𝑥𝑦 = 15
The constraint function is shown here:
The problem essentially wants to know the dimensions of the largest box that will fit in the
first quadrant. The Lagrange method looks at all the points where the box connects with
the constraint and checks if the gradients are parallel.
Now we can find the gradients of both of these functions and separate it into its
components. This results in the following equations:
𝑉𝑥 = 𝑦𝑧 = λ(3z + 3y)
𝑉𝑦 = 𝑥𝑧 = λ(z + 3x)
𝑉𝑧 = 𝑥𝑦 = λ(3x + y)
These, along with the original:
𝑔(𝑥, 𝑦, 𝑧) = 3𝑥𝑧 + 𝑦𝑧 + 3𝑥𝑦 = 15
Create a solvable system of equations.
The first three equations can be easily manipulated to this:
𝑥𝑦𝑧 = λ(3xz + 3xy)
𝑥𝑦𝑧 = λ(yz + 3xy)
𝑥𝑦𝑧 = λ(3xz + yz)
Now,
λ(yz + 3xy) = λ(3xz + 3xy)
Dividing by λ and subtracting 3xy, leaves:
yz = 3xz
y = 3x
Now we can solve the second set of equations:
λ(3xz + yz) = λ(yz + 3xy)
3xz = 3xy
3xz = 3xy
z=y
Now, we can use (z = y) and (y = 3x) to solve g(x, y, z) = 15
𝑧 = 𝑦 = 3𝑥
𝑔(𝑥, 𝑦, 𝑧) = 3𝑥𝑧 + 𝑦𝑧 + 3𝑥𝑦 = 15
3𝑥(3𝑥) + (3𝑥)(3𝑥) + 3𝑥(3𝑥) = 15
9𝑥 2 + 9𝑥 2 + 9𝑥 2 = 15
27𝑥 2 = 15
𝑥 2 = 15⁄27
𝑥 = ±√15/27
Since we are looking at the dimensions of a box and it’s volume, x cannot be negative.
Using (z = y =3x), we now have our values to maximize the area of the box:
𝑥 = √15/27
𝑦 = 3√15/27
𝑧 = 3√15/27
Download