Lagrange Multipliers with Two Constraints Examples 1

Lagrange Multipliers with Two Constraints Examples 1

Recall that if we want to find the extrema of the function $w = f(x, y, z)$ subject to the constraint equations $g(x, y, z) = C$ and $h(x, y, z) = D$ (provided that extrema exist and assuming that $\nabla g(x_0, y_0, z_0) \neq (0, 0, 0)$ and $\nabla h(x_0, y_0, z_0) \neq (0, 0, 0)$ where $(x_0, y_0, z_0)$ produces an extrema in $f$) then we ultimately need to solve the following system of equations for $x$, $y$ and $z$ with $\lambda$ and $\mu$ as the Lagrange multipliers for this system:

(1)
\begin{align} \quad \frac{\partial f}{\partial x} = \lambda \frac{\partial g}{\partial x} + \mu \frac{\partial h}{\partial x} \\ \quad \frac{\partial f}{\partial y} = \lambda \frac{\partial g}{\partial y} + \mu \frac{\partial h}{\partial y} \\ \quad \frac{\partial f}{\partial z} = \lambda \frac{\partial g}{\partial z} + \mu \frac{\partial h}{\partial z} \\ \quad g(x, y, z) = C \\ \quad h(x, y, z) = D \end{align}

Let's look at some examples of using the method of Lagrange multipliers to solve problems involving two constraints.

Example 1

Find the extreme values of the function $f(x, y, z) = 3x - y - 3z$ subject to the constraint equations $x + y - z = 0$ and $x^2 + 2z^2 = 1$.

Let $g(x, y, z) = x + y - z = 0$ and let $h(x, y, z) = x^2 + 2z^2 = 1$. Then in computing the necessarily partial derivatives, we have that:

(2)
\begin{align} \quad 3 = \lambda + 2\mu x \\ \quad -1 = \lambda + 0\mu \\ \quad -3 = -\lambda + 4\mu z \\ \quad x + y - z = 0 \\ \quad x^2 + 2z^2 = 1 \end{align}

Now we immediately have from the second equation that $\lambda = -1$. Substituting this into the first and third equations and we have:

(3)
\begin{align} \quad 2 = \mu x \\ \quad -1 = \mu z \\ \quad x + y - z = 0 \\ \quad x^2 + 2z^2 = 1 \end{align}

Note that from the equations above we have that $x \neq 0$ (otherwise this would contradict equation 1) and $z \neq 0$ (otherwise this would contradict equation 2) $]]. Thus we can freely divide by $x$ and $z$. In doing so, the first equation implies that $\mu = \frac{2}{x}$ and the second equation implies that $\mu = -\frac{1}{z}$ and so $\frac{2}{x} = - \frac{1}{z}$ which implies that $\frac{x}{2} = - z$ which implies that $z = -\frac{x}{2} (*)$. Plugging this into equation 4 and we have that:

(4)
\begin{align} \quad x^2 + 2 \left ( - \frac{x}{2} \right )^2 = 1 \\ \quad x^2 + 2 \frac{x^2}{4} = 1 \\ \quad x^2 + \frac{x^2}{2} = 1 \\ \quad \frac{3x^2}{2} = 1 \\ \quad x^2 = \frac{2}{3} \\ \quad x = \pm \frac{\sqrt{2}}{\sqrt{3}} \end{align}

Now for $x = \frac{\sqrt{2}}{\sqrt{3}}$, from $(*)$ we immediately have that $z = - \frac{\sqrt{2}}{2\sqrt{3}} = -\frac{1}{\sqrt{6}}$. For $x = -\frac{\sqrt{2}}{\sqrt{3}}$, from $(*)$ we have that $z = \frac{\sqrt{2}}{2\sqrt{3}} = \frac{1}{\sqrt{6}}$.

Now from the equation $x + y - z = 0$, we have that the corresponding points of interest are $\left ( \frac{\sqrt{2}}{\sqrt{3}} , -\frac{\sqrt{3}}{\sqrt{2}}, -\frac{1}{\sqrt{6}} \right )$ and $\left ( -\frac{\sqrt{2}}{\sqrt{3}} , \frac{\sqrt{3}}{\sqrt{2}}, \frac{1}{\sqrt{6}} \right )$. The first point yields a maximum of $2 \sqrt{6}$ while the second point yields a minimum of $-2 \sqrt{6}$.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License