# Crazy lagrange problem

1. Nov 4, 2004

### daBish

--------------------------------------------------------------------------------

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

2. Nov 4, 2004

### matt grime

Minimizing D is the same as minimizing D^2, so we solve

2x = -ky
2y=-kx
2z=2kz

whence k=1, x=-y, which leads to nonsense, or z=0, and 2x=-ky=k^2x, so k=sqrt(2), also note that xy=1, and the solution follows.

edit, thanks to arildno, it should read:

2x=-ky=k^2x/2, ie

4x=xk^2, whence k=+/-2

from which you should be able to get the answer.

Last edited: Nov 4, 2004