Re: Lagrange Multiplier Problem, three variables



JTolman wrote:
Jean-Marc Gulliet wrote:
Assigning a value to lambda might help?

eqn1= 2/ x^3== \[Lambda] y z;
eqn2= 2/ y^3 == \[Lambda] x z;
eqn3= 2/ z^3== \[Lambda] x y;
N@ Solve[ { eqn1,eqn2,eqn3}, { x,y,z}]/. \[Lambda]->1

For the numbers I tried I got complex numbers, which I am fairly
certain wouldn't be valid for the application problem I am working on.

Also, you could try Reduce:

--> ((x == -1.1486983549970349 && (y == x || y == -1.*x)) || (x ==
1.148698354997035 && (y == -1.*x || y == x))) && z == 2./(x*y^3)

Am I interpreting this right, (-1.14869, x, 2/xy^3, (-1.14869, -x, 2/x
y ^3), (1.14869, x, 2/x y ^3), (1.14869, -x, 2/x y ^3)

And this is the solution for lambda = 1, but I thought the way lagrange
multipliers worked you had to actually solve for lambda, you couldn't
just plug any number in?
HTH,
Jean-Marc


Sorry about that, I forgot that you were solving w/ the Lagrange multiplier.

f[ x_,y_,z_]:= 1/ x^2+ 1/ y^2+ 1/ z^2
g[ x_,y_,z_]:= x y z-v
sols= Reduce[ D[ f[ x,y,z], { { x,y,z}}]== \[Lambda] D[ g[ x,y,z], { { x,y,z}}]&& x>0&& y>0&& z>0&& x y z==v&& v>0, { x,y,z,\[Lambda]}]

returns

v > 0 && x == Root[-v + #1^3 & , 1] && y == v/x^2 && z == v/(x*y) && \[Lambda] == -(2/(x*y*z^3))

You can just "discard" \[Lambda] since x, y, and z are independent of it.

HTH,
Jean-Marc
.



Relevant Pages

  • Re: Lagrange Multiplier Problem, three variables
    ... Jean-Marc Gulliet wrote: ... And this is the solution for lambda = 1, but I thought the way lagrange ... just plug any number in? ...
    (sci.math.symbolic)
  • Re: Newbie question on Optimization
    ... In answer to your question yesterday as to whether the Lagrange ... multiplier technique would carry over to complex values for R, w, and h, ... where the Lagrange multiplier, lambda, can now be complex-valued. ...
    (comp.soft-sys.matlab)