# Lagrange multipliers

1. Jun 12, 2010

### kliker

1. The problem statement, all variables and given/known data

find the points on the surface x^2-z^2 = 1 which are in minimum distance from (0,0)

i should find the points using d = x^2+y^2+z^2

first of all

where f = d and g = x^2-z^2

so we have (2x,2y,2z) = λ (2x,0,2z)

now
2x = λ2x
2y = 0 => y = 0
2z = λ2z

so λ=1

but now how can i find x and z?

im totally confused

2. Jun 12, 2010

### lanedance

also i think you mean closest to (0,0,0)?

3. Jun 12, 2010

### HallsofIvy

Staff Emeritus
This s wrong. You have dropped a sign.

4. Jun 12, 2010

### kliker

oh you're right so now i have

2x = λ2x
2y = 0 => y = 0
2z = -λ2z => λ*2z+2z = 0 => 2z(1+λ)=0

hence we have λ = -1 and z = 0

but if z is 0 then x = +1 or x = -1

so for λ = -1 we have two points (1,0,0) and (-1,0,0)

is this correct? also, i would like to ask something, if these points are correct then why for λ = -1 in the first equation i get -4x = 0 hence x = 0?

but when x = 0 the point will be (0,0,0), can we check for this point too?

5. Jun 12, 2010

### lanedance

(0,0,0) is not in your surface

6. Jun 12, 2010

### lanedance

its also worth drawing the surface to help understand what is going on

try drawing the curve given by y=0, x^2-z^2 = 1 in the xz plane....

7. Jun 12, 2010

### cronxeh

Just curious, shouldn't d = sqrt(x^2+y^2+z^2)

8. Jun 12, 2010

### lanedance

yeah, but minimising x^2 will minimise |x| so its ok - but i suppose you should show it

Last edited: Jun 12, 2010
9. Jun 12, 2010

### kliker

the problem states by itself that it shouldnt be sqrt(x^2+y^2+z^2) I think i understand the solution now,