PDA

View Full Version : crazy optimization/Lagrange questino


daBish
Nov4-04, 11:43 AM
Ok this is the question I had on a test today:

given this constraint equation z^2-xy+1=0 find the min. distance from the origin using Lagrange method.

so basically you use D^2=x^2+y^2+z^2 as the other equation. however, it basically goes nuts from there. especially if you set it up like you are suppose to.
Fx=(lambda)Gx
Fy=(lambda)Gy
Fz=(lambda)Gz
g=0

(capitals are partial derivatives)

with f as the distance formual and g as the constraint

this one sucks but if someone could help it would be greatly appreciated

Galileo
Nov8-04, 04:46 AM
Try not to minimize D=\sqrt{x^2+y^2+z^2}, but D^2=x^2+y^2+z^2.

HallsofIvy
Nov8-04, 08:02 AM
1. Why was this posted under "differential equations"?

2. You want to minimize F= x2+ y2+ z2 subject to the condition G= z^2-xy+1=0.
Okay, grad F= 2xi+ 2yj+ 2zk= λgrad G= &lambda(-yi- xj+ 2zk)
so 2x= -λy, 2y= -λx, and 2z= -2λz

Divide the first equation by the second, x/y= y/x so x2= y[/sup]2[/sup] and y= x or y= -x.
From 2z= -2λz, either z= 0 or &lambda= -1.

With x= y, z= 0, since z^2-xy+1=0, we have -x2+ 1= 0 so x= +1 or -1:
(1, 1, 0) and (-1,-1,0) are possible points.

With x= -y, z= 0, since z^2-xy+1=0, we have x2+ 1=0 which is impossible.

If z is not 0, then &lambda= -1 so 2x= -λy become 2x= y and 2y= -λx becomes 2y= x: 2y= 2(2x)= 4x= x so x= y= 0. In that case z^2-xy+1=0 becomes z2+ 1= 0 which is impossible.

The two minimum distance points are (1,1, 0) and (-1,-1,0). The are both distance √(2) from (0,0,0).