Functions of several variables: Lagrange multipliers
The method of Lagrange multipliers (examples)
Often you want to find extreme values under constraints. The method of Lagrange multipliers can help. We first deal with introductory examples.
We discuss two methods:
1. Direct method
In the constraint, we can isolate the variable \(y\): \[y={{4}\over{3}}x+{{1}\over{3}}\text.\] Substitution in \(F(x,y)=f(x,y)^2\), gives the formula \[x^2+\left({{4}\over{3}}x+{{1}\over{3}}\right)^2\text.\] This valley parabola has a minimum in \(x\) that meets the requirement \[2x+2\cdot \left({{4}\over{3}}x+{{1}\over{3}}\right)\cdot {{4}\over{3}}=0\] that is \[{{50}\over{9}}x+{{8}\over{9}}=0\text.\] Thus: \[x=-{{4}\over{25}}\text.\] The value of \(y\) follows from the constraint equation written as \[y={{4}\over{3}}x+{{1}\over{3}}\] and is thus equal to \[y={{4}\over{3}}\cdot -{{4}\over{25}}+{{1}\over{3}}={{3}\over{25}}\] For the values of \(x\) and \(y\) found the function value \(f(x,y)\) is minimal and is equal to \[\sqrt{\left(-{{4}\over{25}}\right)^2+\left({{3}\over{25}}\right)^2}=\frac{1}{5}\text.\]2. Lagrange multipliers
The task to find the minimum of \[F(x,y)=x^2+y^2\] subject to the constraint \[G(x,y)=0\] with \[G(x,y)=-4x+3y-1\] is in the method of Lagrange multipliers equivalent to the task of finding the critical point of the function \[H(x,y,\lambda) = F(x,y) + \lambda \cdot G(x,y)\] in the three variables \(x\), \(y\) and \(\lambda\). You have to solve the following system of equations in three variables: \[\left\{\frac{\partial H}{\partial x}=0,\quad \frac{\partial H}{\partial y}=0,\quad \frac{\partial H}{\partial \lambda}=0\right\}\] in this case we have \[H(x,y,\lambda) = x^2+y^2 +\lambda\left(-4x+3y-1\right) \] and the system is equal to \[\left\{ 2 x-4 \lambda=0 ,\quad 3 \lambda+2 y=0 ,\quad -4
x+3 y-1=0 \right\}\] The solution of this system is \[\left\{ x=-{{4}\over{25}} ,\quad y={{3}\over{25}} ,\quad \lambda=-{{2
}\over{25}} \right\}\] Once again we find the same values \(x\) and \(y\) for which \(F(x,y)\) is minimal under the given condition. This way you also find the values \(x\) and \(y\) for which \(f(x,y)\) is minimal; this minimal value equals \[\sqrt{\left(-{{4}\over{25}}\right)^2+\left({{3}\over{25}}\right)^2}=\frac{1}{5}\text.\]
The method of Lagrange multipliers appeared out of the blue, but could be better understood as follows.
The constraint equation \(G(x,y)=0\) represents a straight line. We can now consider the contour curves of the function \(F\): these are circles with the origin as centre. If a contour curve intersects the straight line in two points, then the corresponding level of \(F\) cannot be an extreme value, because a slightly larger or slightly smaller value leads to curves that intersect the line with equation \(G(x,y)=0\) in two points, too. An extremum (in this case a minimum) can only occur if the straight line and the contour curve touch each other, i.e., when the line is a tangent line of the contour curve. But this means that we must find a point \((a,b)\) for which \(F(a,b)=G(a,b)\) and for which the gradient of \(F\) and the gradient of \(G\) calculated in that point are a multiple of each other. The requirements \[F(a,b)=G(a,b)\qquad\text{and}\qquad {\nabla}F(a,b)= -\lambda\cdot {\nabla}G(a,b)\quad\text{for some number }\lambda\small,\] for finding the point \((a,b)\) correspond to the task to solve the system of equations \[\left\{\frac{\partial H}{\partial \lambda}=0,\quad \frac{\partial H}{\partial x}=0,\quad \frac{\partial H}{\partial y}=0\right\}\] for \[H(x,y,\lambda) = F(x,y) + \lambda \cdot G(x,y)\tiny.\] The extreme value is equal to \(F(a,b)\) for the solution \((a,b)\) of the system of equations.