# Lagrange multiplers - contraints and matrices

1. Mar 7, 2006

### Benny

Hi, I'm stuck on the following questions and would like some help.

1. A percel delivery service requires that the dimension of a rectangular box be such that the length plus twice the width plus twice the height be no more than 108 centimetres. What is the volume of the largest box that the company will deliver?

2. Let $A = \left( {a_{ij} } \right)$ be a symmetric n * n matrix (ie. a_ij = a_ji) and define

$$f:R^n \to R,f\left( {\mathop x\limits^ \to } \right) = \mathop x\limits^ \to \bullet A\mathop x\limits^ \to$$

Suppose x_0 (a point in R^n) is a point where f has a maximum or minimum on the unit sphere $\left\{ {\mathop x\limits^ \to \in R^n :\mathop x\limits^ \to \bullet \mathop x\limits^ \to = 1} \right\}$.

Use Lagrange multipliers to show that x_0 is an eigenvector of A with eigenvalue $$\lambda = f\left( {\mathop {x_0 }\limits^ \to } \right)$$.

1. In the first one I use Lagrange multipliers and keep on getting roughly V = (27/2)(27)(27/2) ~ 4920 cubic centimetres. The answer is 11664. I basically tried to find max(V = xyz) subject to the contraint P = y + 2x + 2z. (where p <= 108)

An alternative to Lagrange multipliers I guess would be to solve for z in terms of x and y and sub into v = xyz. But looking at the equation with P, if I used the substitution method I would get different answers depending on whatever I solved for y in terms of the other variables or x in terms of the other variables).

The equations which come up when I use Lagrange multipliers are really simple so I don't see why I keep on getting the wrong answer. So I suspect that my constraint expression is incorrect but at the moment I can't spot what's wrong.

2. This one, the hint is to use a result from another question. That is, with f defined as it is, it follows that $$\nabla f\left( {\mathop x\limits^ \to } \right) = 2A\mathop x\limits^ \to$$.

I don't really see what I can do with it at the moment. I think I'll be dealing with some equations of the form $$2a_{k1} + ...2a_{kn} = 2\lambda x_k$$. Nothing comes to mind when I try to do this question. I managed to show the result given in the hint but I'm not sure if knowing how to do so will shed any light on this question.

Basically, I'm tired, out of ideas and I don't know what to do. Can someone please help me out?

2. Mar 7, 2006

### HallsofIvy

Staff Emeritus
Unfortunately, you don't say how you got y= 27! The object function is F(x,y,z)= xyz and grad F= yzi+ xzj+ xyk. We can write the constraint as 2x+ y+ 2z= f(x,y,z)= p and grad f= 2i+ j+ 2k. Taking $\lambda$ as the Lagrange multiplier, we must have yz= 2$\lambda$, xz= $\lambda$, and xy= 2$\lambda$. Dividing the first equation by the second, y/x= 2 so y= 2x. Dividing the third equation by the first, x/z= 1 so z= x. Then the constraint, y+ 2x+ 2z<= 108 becomes 6x<= 108. Obviously the maximum value of the volume is taken at the maximum value for x: x= 108/6= 18. Then y= 2x= 36 and z= x= 18. The largest volume is 18(36)(18)= 11664 cubic inches.

3. Mar 7, 2006

### benorin

We need to solve

$$\nabla f\left( {\mathop x\limits^ \to } \right) = \lambda \nabla \left( \mathop x\limits^ \to \cdot \mathop x\limits^ \to \right)$$​

and since

$$\nabla f\left( {\mathop x\limits^ \to } \right) = 2A\mathop x\limits^ \to ,$$​

we have

$$2A\mathop x\limits^ \to = \lambda \nabla \left( \mathop x\limits^ \to \cdot \mathop x\limits^ \to \right) = \lambda \nabla \left( \sum_{k=1}^{n}x_{k}^{2} \right) = 2\lambda\mathop x\limits^ \to$$​

and hence

$$A\mathop x\limits^ \to = \lambda\mathop x\limits^ \to$$​

and the proof is done.

4. Mar 7, 2006

### Benny

Thanks for help.

In the first question I wrote 2x + 2x + 2x '=' 8x = 108 leading to my mistake.

5. Mar 8, 2006

### Benny

There's something else that I don't understand about question 2. I can now see how to get to:

$$A\mathop x\limits^ \to = \lambda \mathop x\limits^ \to$$

Which is the set of equations that need to be solved to obtain the value of x for which f is a maximum on the unit sphere. The question says that f has a maximum on the unit sphere at x_0 so x_0 satisfies the above equation.

$$A\mathop {x_0 }\limits^ \to = \lambda \mathop {x_0 }\limits^ \to$$

This shows that x_0 is an eigenvector of A with eigenvalue lambda. But where does $\lambda = f\left( {\mathop {x_0 }\limits^ \to } \right)$ come from?

If lambda is f(x_0) then doesn't that mean:

$$A\mathop {x_0 }\limits^ \to = \left( {\mathop {x_0 }\limits^ \to \bullet A\mathop {x_0 }\limits^ \to } \right)\mathop {x_0 }\limits^ \to$$

I don't see how that can be.