# Lagrange Multipliers with Two Constraints Examples 4

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)Let's look at some more examples of using the method of Lagrange multipliers to solve problems involving two constraints.

## Example 1

**Find the maximum and minimum values of the function $f(x, y, z) = x^2 + y^2 + z^2$ on the curve of intersection of $z^2 = x^2 + y^2$ and $x - 2z = 3$.**

Let $g(x, y, z) = x^2 + y^2 - z^2 = 0$ and $h(x, y, z) = x - 2z - 3 = 0$. Then in computing the necessary partial derivatives we obtain the following system of equations:

(2)The second can be rewritten as $2y - \lambda 2y = 2y(1 - \lambda) = 0$. Therefore $\lambda = 1$ or $y = 0$. If $\lambda = 1$ then our system of equations reduces down to:

(3)The first equation then implies that $\mu = 0$ and so we further reduce our system of equations to:

(4)The first equation now implies that $z = 0$ and plugging this into the third equation implies that $x = 3$. But these values of $x$ and $z$ contradict the second equation.

Now suppose that $y = 0$. Then our earlier system of equations reduces down to:

(5)The third equation here implies that $x = \pm z$. We will break this up into two cases. First suppose that $x = z$. Then the fourth equation above implies that $x - 2x = -x = 3$ so $x = -3$. Therefore $(-3, 0, -3)$ is a critical point. Now suppose that $x = -z$. Then the fourth equation above implies that $x + 2x = 3x = 3$ and so $x = 1$. Therefore $(1, 0, -1)$ is a critical point.

Now we evaluate $f$ at our critical points. We'll have that $f(-3, 0, -3) = 18$ which is out maximum, and $f(1, 0, -1)$ which is our minimum.