0.1 Lagrange Multipliers

Lagrange multipliers. I’ve always wanted to learn about this topic because I heard of it many times, but didn’t actually knew what it is. Lagrange multiplier is another strategy, or tool, to find minimum and maximum of a function. There are many geometric intuitions and motivations involved, so let’s get right into it!

First, we are going to discuss Lagrange multipliers in two dimensions before generalizing it into three dimensions. Consider a function \(f(x, y)\) that is defined on a region \(R\). If \(C\) is a curve in \(R\), then we are going to write \(f\) whose domain is restricted to \(C\) as \(\left . f \right |_C\). This curve \(C\) is known as the constraint curve. Now say \((x_0, y_0) \in C\) is a relative extremum of \(\left . f \right |_C\) where if \(x(t), y(t)\) is a smooth parametrization of \(C\), then \((x_0, y_0)\) is at \(t = t_0\). In other words, \(f(x(t), y(t))\) has a relative extremum at \(t = t_0\). We say \(\left . f \right |_C\) has a constrained relative extremum, or constrained absolute extremum depending on the case, at \((x_0, y_0)\). Writing that into equations, we can see that the following equations hold. \begin{align*} \left . \frac {d}{dt} f(x(t), y(t)) \right |_{t = t_0} &= 0 \\ f_x(x_0, y_0) x'(t_0) + f_y(x_0, y_0) y'(t_0) &= 0 \end{align*}

In other words, \(\nabla f(x_0, y_0) \cdot \langle x'(t_0), y'(t_0) \rangle = 0\) and the gradient of \(f\) at \((x_0, y_0)\) and the vector tangent to \(C\) at \((x_0, y_0)\) are orthogonal.

Now let’s define a new differentiable function \(g(x, y)\) where \(C\) is the level curve of \(g\) at height \(0\). We can write it as \(g(x, y) = 0\) and this equation is known as the constraint equation. By Theorem ??, we can see that as long as \(\nabla g(x, y) \neq \mathbf {0}\), \(\nabla g(x, y)\) is orthogonal to the tangent line of \(C\) at \((x, y)\). In other words, \(\nabla f(x_0, y_0)\) and \(\nabla g(x_0, y_0)\) are parallel to each other if \((x_0, y_0)\) is a constrained relative extremum of \(f\). Continuing, we can also see that there exists a scalar \(\lambda \) that satisfies \(\nabla f(x_0, y_0) = \lambda \nabla g(x_0, y_0)\), which is called a Lagrange multiplier. We just showed the following statement.

Given two differential functions \(f(x, y)\) and \(g(x, y)\) where \(\nabla g(x, y) \neq \mathbf {0}\) for all points in its level curve \(C\) at height \(0\). If \(\left . f \right |_C\) has a relative extremum at \((x_0, y_0)\) and \((x_0, y_0)\) is not an endpoint of \(C\), then there exists some scalar \(\lambda \) that satisfies \(\nabla f(x_0, y_0) = \lambda \nabla g(x_0, y_0)\).

This is it! We just need to find some points \((x_0, y_0)\) on the constraint curve such that there exists some scalar \(\lambda \) that satisfies \(\nabla f(x_0, y_0) = \lambda \nabla g(x_0, y_0)\). But one thing to keep in mind is that every \((x_0, y_0)\) is a candidate. The statement above give necessary condition, but not sufficient condition, so we do need to check them afterward. Let’s take a look at an example.

Exercise 0.1.1

Given a function \(f(x, y) = 3x^2 + 2y^3\) subject to the constraint \(x^2 + 2y^2 = 3\), find the absolute maximum and minimum of \(f\).

Solution.

First, we need to define \(g(x, y)\). Notice that we can set it as \(g(x, y) = x^2 + 2y^2 - 3\). Now we want to find some points \((x_0, y_0)\) such that \(g(x, y) = 0\) an there exists some scalar \(\lambda \) that satisfies \(\nabla f(x_0, y_0) = \lambda \nabla g(x_0, y_0)\). To do that, let’s first find the gradients. \begin{align*} \nabla f(x_0, y_0) &= \langle 6x, 6y^2 \rangle \\ \nabla g(x_0, y_0) &= \langle 2x, 4y \rangle \end{align*}

In other words, there should be some constant \(\lambda \) that satisfies all the following equations. \begin{align*} x^2 + 2y^2 - 3 &= 0 \\ 6x &= \lambda 2x \\ 6y^2 &= \lambda 4y \end{align*}

For the first case, consider the case when \(x = 0\). If \(x = 0\), then \(y = \pm \sqrt {\frac {3}{2}}\) and \(\lambda = \pm \frac {3}{2}\sqrt {\frac {3}{2}}\). If \(y = 0\), then \(x = \pm \sqrt {3}\) and \(\lambda = 3\). Finally, if both \(x\) and \(y\) are nonzero, then \(\lambda = 3\), \(y = 2\), and \(x\) is not real.

Therefore, our candidates are at \((0, \pm \sqrt {\frac {3}{2}})\) and \((\pm \sqrt {3}, 0)\). Substituting them back to \(f\), we can see that the absolute minimum of \(f\) is \(-3\sqrt {\frac {3}{2}}\) at \((0, -\sqrt {\frac {3}{2}})\) and the absolute maximum is \(9\) at \((\pm \sqrt {3}, 0)\).