Lagrange Multipliers with One Constraint Examples 6

# Lagrange Multipliers with One Constraint Examples 6

Recall from The Method of Lagrange Multipliers page that with the Method of Lagrange Multipliers that if we have a function $z = f(x, y)$ subject to the constraint $g(x, y) = C$, then if extreme values exist and $\nabla g (x, y) \neq (0, 0)$ on the level curve $g(x, y) = C$ then we can obtain the critical points subject to the constraint by solving the system of equations below and then comparing the values of $f$ at these critical points.

(1)
\begin{align} \quad \nabla f(x, y) = \lambda \nabla g(x, y) \\ \quad g(x, y) = C \end{align}

Furthermore, if we have a function $w = f(x, y, z)$ subject to the constraint $g(x, y, z) = C$, then if extreme values exist and $\nabla g(x, y, z) \neq (0,0,0)$ on the level surface $g(x, y, z) = C$, then we can find these extreme values by solving the system of equations below and then comparing the values of $f$ at these critical points.

(2)
\begin{align} \quad \nabla f(x, y, z) = \lambda g(x, y, z) \\ \quad g(x, y, z) = C \end{align}

We will now look at some more examples of solving problems regarding Lagrange multipliers.

## Example 1

Find the extreme values of the function $f(x_1, x_2, ..., x_n) = x_1 + 2x_2 + ... + nx_n$ subject to the constraint $x_1^2 + x_2^2 + ... + x_n^2 = 1$.

Let $g(x_1, x_2, ..., x_n) = x_1^2 + x_2^2 + ... + x_n^2$. In calculating the necessary partial derivatives we have that:

(3)
\begin{align} \quad 1 = 2 \lambda x_1 \\ \quad 2 = 2 \lambda x_2 \\ \quad \vdots \quad \\ \quad n = 2 \lambda x_n \\ \quad x_1^2 + x_2^2 + ... + x_n^2 = 1 \end{align}

Note that $x_1, x_2, ..., x_n \neq 0$ otherwise the first $n$ equations would be contradicted. Thus we can divide freely by these variables to have that:

(4)
\begin{align} \quad \lambda = \frac{1}{2x_1} = \frac{2}{2x_n} = ... = \frac{n}{2x_n} \end{align}

This implies that $2x_1 = \frac{2x_n}{2} = ... = \frac{2x_n}{n}$. More generally, for each $j = 2, 3, ..., n$ we have that $x_j =jx_1 (*)$ and so plugging this information into the last equation and we have that

(5)
\begin{align} \quad x_1^2 + (2x_1)^2 + ... + (nx_1)^2 = 1 \\ \quad 1x_1^2 + 2^2x_1^2 + ... + n^2x_1^2 = 1 \\ \quad x_1\sum_{i=1}^{n} i^2 = 1 \\ \quad \frac{n(n+1)(2n+1)}{6}x_1^2 = 1 \\ \quad x_1^2 = \frac{6}{n(n+1)(2n+1)} \\ \quad x_1 = \pm \sqrt{ \frac{6}{n(n+1)(2n+1)}} \end{align}

Thus from $(*)$ we see that our points of interest are $\left ( \sqrt{ \frac{6}{n(n+1)(2n+1)}}, 2 \sqrt{ \frac{6}{n(n+1)(2n+1)}}, ..., n\sqrt{ \frac{6}{n(n+1)(2n+1)}} \right )$ and $\left ( - \sqrt{ \frac{6}{n(n+1)(2n+1)}}, -2\sqrt{ \frac{6}{n(n+1)(2n+1)}}, ..., -n\sqrt{ \frac{6}{n(n+1)(2n+1)}} \right )$.

Plugging these points into $f$ and we have that the maximum is achieved at the first point and is:

(6)
\begin{align} \quad \sqrt{ \frac{6}{n(n+1)(2n+1)}} (1^2 + 2^2 + ... + n^2) = \sqrt{ \frac{6}{n(n+1)(2n+1)}}\frac{n(n+1)(2n+1)}{6} = \sqrt{\frac{n(n+1)(2n+1)}{6}} \end{align}

Similarly, $f$ achieves a minimum at the second point and it is:

(7)
\begin{align} \quad -\sqrt{ \frac{6}{n(n+1)(2n+1)}} (1^2 + 2^2 + ... + n^2) = -\sqrt{ \frac{6}{n(n+1)(2n+1)}}\frac{n(n+1)(2n+1)}{6} = - \sqrt{\frac{n(n+1)(2n+1)}{6}} \end{align}