## Advanced Lagrange Maxima Minima Problems

My first post and I am new to forum etiquette, please go easy on me.

I have an exam in a few days and have a good grasp on the content. Historically the professor has been putting harder Lagrange questions on the exam than are available in my textbook and supplement books or that I can find similar ones of online. I have looked for 2 hours last night and another 3 today at 30 different explanations of Lagrange with constraints and I cannot find any as difficult as these to help guide me.. I am not lazy..any advice or simply point me in the right direction on solving these would be appreciated...I particularly have an issue looking for methods of solving the resulting systems of partial derivative equations. Thank you for any help in advance.

Type 1
Absolute Maximum and minimum of f(x,y,z) = x^2 + y^2 + z^2 - xyz
constrained by x^2 + y^2 + z^2 <= 1

Type 2
Maximum and minimum of f(x,y,z) = x^2 + y^2 - z^2 - x -y - z
in the region 0 <= x^2 + y^2 <= z^2 <= 4
 PhysOrg.com science news on PhysOrg.com >> King Richard III found in 'untidy lozenge-shaped grave'>> Google Drive sports new view and scan enhancements>> Researcher admits mistakes in stem cell study

Recognitions:
Gold Member
Staff Emeritus
 Quote by LiveLowGrow My first post and I am new to forum etiquette, please go easy on me. I have an exam in a few days and have a good grasp on the content. Historically the professor has been putting harder Lagrange questions on the exam than are available in my textbook and supplement books or that I can find similar ones of online. I have looked for 2 hours last night and another 3 today at 30 different explanations of Lagrange with constraints and I cannot find any as difficult as these to help guide me.. I am not lazy..any advice or simply point me in the right direction on solving these would be appreciated...I particularly have an issue looking for methods of solving the resulting systems of partial derivative equations. Thank you for any help in advance. Type 1 Absolute Maximum and minimum of f(x,y,z) = x^2 + y^2 + z^2 - xyz constrained by x^2 + y^2 + z^2 <= 1
Here's how I look at it. The vector $\nabla f= <2x-yz, 2y- xz, 2z- xy>$, from each point, points in the direction of fastest increase (and so its negative points in the direction of greatest decrease). If f were all we were given, would follow it (or opposite to find a minimum) until it as 0 and had no direction.

If we are constrained to $x^2+ y^2+ z^2\le 1$, we can first, look at points where $\nabla f= 0$ inside that sphere. We then need to look for solution on the sphere. If we let $g(x,y,z)= x^2+ y^2+ z^2$ then $\nabla g= <2x, 2y, 2z>$ dot a unit vector, gives the rate of change of g in the direction of the vector. In particular, as long as move along the surface of that sphere, g does not change, g(x, y, z)= 1 so its value is constant, its rate of change is 0 so $\nabla g$ is normal to the surface.

If we are constrained to that sphere, we cannot move in the direction of $\nabla f$, be we can move in the direction of its projection on the sphere. We can do that until there is no projection- until $\nabla f$ is also perpendicular to the surace- in the same direction as $\nabla g$, so one is multiple of the other: $\nabla f= \lambda\nabla g$ and $\lambda$ is the "Lagrange multiplier".

Here, that is saying $<2x-yz, 2y- xz, 2z- xy>= \lambda<2x, 2y, 2z>$.
That gives the three equations, $2x- yz= 2\lambda x$, $2y- xz= 2\lambda y$, and $2z- xy= 2\lambda z$.

Since a value for $\lambda$ is not part of the solution, I often find it simplest to start by eliminating $\lambda$ by dividing one equation by another: dividing the first equation by the second, (2x- yz)/(2y- xz)= x/y and, dividing the first equation by the third, (2x- yz)/(2z- xy)= x/z. "Cross multiplying" each gives y(2x- yz)= x(2y- xz) and z(2x- yz)= x(2z- xy). The first gives $2xy- y^2z= 2xy- x^2z$ which reduces to $y^2= x^2$ so that either y= x or y= -x. The second gives $2xz- yz^2= 2xz- x^2y$ or $z^2= x^2$ so that either z= x or z= -x.
Putting those together we have one of (x, x, x), (x, -x, x), (x, x, -x), or (x, -x, -x).
Put those into the constraint $x^2+ y^2+ z^2= 1$ to determine x.
 That was superb...thank you very much for your time and effort and being so lucid in your explanation....I was only unfamiliar with term nabal "look at points where \nabal f = 0 inside that sphere".... which I guess means I did not have that symbol in my computers font selection? ..your answer has allowed me to answer several of the other variations of max min I have... ..not to press my luck...but regarding the Type 2 question in my original post.... when I get to this stage.. 1) 2x-1 = λ2x + (mu)(0) 2) 2y-1 = λ2y + (mu)(0) 3) -2z-1 = λ(0) + (mu)(2z) and the system of equations becomes.. 1) 2x-1=λ2x 2) 2y-1=λ2y 3) -2z-1=(mu)(2z) what would you recommend in this situation or more generally what are the main techniques I would try to solve these? 1) look for a lonely variable x or y to isolate 2) divide one by another and cross multiply as we did above 3) .............?? my goal is always to get two of the three variables and plug it in to my constraint? what is the process for two constraints? any advice if you have a moment would be much appreciated...and thank you again for your prior insight...

Recognitions:
Homework Help

## Advanced Lagrange Maxima Minima Problems

 Quote by LiveLowGrow That was superb...thank you very much for your time and effort and being so lucid in your explanation....I was only unfamiliar with term nabal "look at points where \nabal f = 0 inside that sphere".... which I guess means I did not have that symbol in my computers font selection? ..your answer has allowed me to answer several of the other variations of max min I have... ..not to press my luck...but regarding the Type 2 question in my original post.... when I get to this stage.. 1) 2x-1 = λ2x + (mu)(0) 2) 2y-1 = λ2y + (mu)(0) 3) -2z-1 = λ(0) + (mu)(2z) and the system of equations becomes.. 1) 2x-1=λ2x 2) 2y-1=λ2y 3) -2z-1=(mu)(2z) what would you recommend in this situation or more generally what are the main techniques I would try to solve these? 1) look for a lonely variable x or y to isolate 2) divide one by another and cross multiply as we did above 3) .............?? my goal is always to get two of the three variables and plug it in to my constraint? what is the process for two constraints? any advice if you have a moment would be much appreciated...and thank you again for your prior insight...
In general: suppose that for a vector of variables x = (x1,x2,...,xn) we have a problem such as max/min f(x) subject to g1(x) <= 0, g2(x) <= 0,..., gm(x) <= 0. The standard method is to form a Lagrangian and to set its gradient to zero. There are other conditions as well, but let's deal with them later. The main difference between an inequality-constrained problem and an equality-constrained one is that for inequalities the signs of the Lagrange multipliers are known, provided that we form the Lagrangian in the correct manner. Here, the general rule is: form a Lagrangian so that it is better than the objective f for feasible points. Here, "better" means larger in a max problem and smaller in a min problem. So, if our problem is max f subject to g_i <= 0 for i = 1,2,...,m, then for a feasible point we want L to be larger than f; we achieve this by subtracting positive multiples of the g_i from f (because we would be subtracting negative quantities). So we let
$$L(x,u) = f(x) - \sum_{i=1}^m u_i g_i (x),$$ where ##u_1, u_2, \ldots, u_m ## are the Lagrange multipliers (often denoted as ##\lambda_i##, but ##u## is just as good a symbol as ##\lambda##). The point is that the signs are known: we have ## u_1 \geq 0, u_2 \geq 0, \ldots, u_m \geq 0.##

Now we have the optimality conditions:
$$(1)\; \partial L/ \partial x_j = 0, \: j = 1, 2, \ldots, n \\ (2)\; u_i \geq 0, i = 1, 2, \ldots, m \\ (3)\; \text{either } g_i = 0 \text{ or } u_i = 0.$$

What is condition (3) all about? Well, the optimal solution is either in the interior of the ith constraint---where ##g_i(x) < 0##--- or it is on the boundary of the ith constraint---where ##g_i(x) = 0.## If it is in the interior we essentially ignore g_i, and this is achieved by setting u_i = 0 so that g_i does not appear in the optimality condition, and so does not affect x. If it is on the boundary, then we have, essentially, an equality constraint g_i = 0, and so do have a Lagrange multiplier (which could, nevertheless, still = 0 by accident). However, unlike a problem that had an equality constraint from the "get-go", in the present case the sign of the Lagrange multiplier is restricted.

So, let's look at the first problem in max form.
max f(x,y,z) = x^2 + y^2 + z^2 - xyz, subject to g(x,y,z) = x^2 + y^2 + z^2 -1 <= 0.

$$L = f - u g = x^2 + y^2 + x^2 - xyz - u (x^2+y^2+z^2-1).$$
The optimality conditions are:
$$L_x = \partial L / \partial x = 0 \Longrightarrow 2x - yz - 2u x = 0\\ L_y = \partial L / \partial y = 0 \Longrightarrow 2y - xz - 2u y = 0\\ L_z = \partial L / \partial z = 0 \Longrightarrow 2z - xy - 2u z = 0$$
and u = 0 or g = 0.

If we first try u = 0 we obtain 5 candidate points (where grad f = 0):
$$(x,y,z) = (0,0,0),\: (2,2,2), \: (2,-2,-2),\: (-2,-2,2), \:(-2,2,-2).$$
Only the first point (0,0,0) satisfies the constraint g <= 0. The Hessian matrix of f at this point is positive-definite, so (0,0,0) is a strict local minimum. Therefore, we have solved the min problem, not the max problem!

OK, so now we know that a max must be on the boundary, so u may by > 0. Besides the previous solution (x,y,z) = (0,0,0), we get:
$$\begin{array}[cccc] ((x,y,z) &= & (2-2u, 2-2u, 2 - 2u) & (P1) \\ (x,y,z) &=& (2 - 2u, -2 + 2u, -2 + 2u) & (P2)\\ (x,y,z) &=& ( -2 + 2u, 2 - 2u, -2 + 2u) & (P3)\\ (x,y,z) &=& (-2 + 2u, -2 + 2u, 2 - 2u) & (P4) \end{array}$$

Substituting P1 into the equation g1 = 0 gives two solutions:
$$u_1 = 1 + \frac{1}{6}\sqrt{3} \doteq 1.288675, \; u_2 = 1 - \frac{1}{6}\sqrt{3} \doteq 0.71132,$$
Both u_1 and u_2 are > 0, so u = u_1 and u = u_2 give two candidate points for the max:
$$u = u_1 \Longrightarrow (x,y,z) = (-\sqrt{3}/3,-\sqrt{3}/3, -\sqrt{3}/3), \: g = 0, \; f = 1 + \frac{1}{9}\sqrt{3} \doteq 1.19245\\ u = u_2 \Longrightarrow (x,y,z) = (\sqrt{3}/3,\sqrt{3}/3,\sqrt{3}/3), \; g = 0, \: f = 1 - \frac{2}{9}\sqrt{3} \doteq 0.80755 .$$
The first point above must be a local max of f; the second point may be another local max or may be a constrained saddle point. We would have to perform some second-derivative tests to tell which case applies. (However, the second-derivative tests would be tricky: they involve testing the Hessian of the Lagrangian---NOT of just f itself---projected down into the tangent space of the constraint surface.) Interestingly, we can be sure the second point is not a constrained minimum of f, because the Lagrange multiplier u = u_2 would have the wrong sign for a min problem!

The points (P2) and (P3) can be analyzed similarly; they lead to two other "mirror images" of the above maximizing point. That makes sense, because for any (x,y,z) there are three other points with the same values of |x|, |y| and |z|, but where two of them have the opposite sign, so that the values of f and g are unchanged.

The second problem you listed above is harder because it has more inequality constraints. I will leave the fun of solving it up to you.
 Recognitions: Homework Help Science Advisor The second problem may be harder, but your first step is to try to visualize the domain you are trying to find extrema over. Have you done that yet? Which constraints you apply will depend on which part of the boundary you are talking about.
 Ok.. ..my vertical z plane cannot exceed 2 because z^2 <= 4 and it cannot be lower than 0 where it hits the xy plane.. my x^2+y^2 is a circle in standard form that cannot exceed radius 2 or be smaller than radius 0.. so in my mind the constraint is a cylinder shape two units in height... when I make x^2+y^2 and z^2 both 4 or both 0 they cancel and leave me with -x-y+z In this case fx=-1 fy=-1 fz=+1 I get the feeling I am supposed to evaluate something like this at the upper bounds and at the lower but Im unsure how to formulate it.... ..any advice would be appreciated..my exam is in 6 hours... :/

Recognitions:
Homework Help