# Thread: solve using Lagrange multiplier

1. ## solve using Lagrange multiplier

find the point on the plane ax + by + cz = d that is nearest the origin.

I tried minimizing x^2 + y^2 + Z^2 with ax + by + cz - d = 0

2. Originally Posted by tennis14321
find the point on the plane ax + by + cz = d that is nearest the origin.

I tried minimizing x^2 + y^2 + Z^2 with ax + by + cz - d = 0

3. f = x^2 + y^2 + Z^2 + lamda (ax + by + cz -d) = 0
F (patial y) = 2y + lamda * b
F (patial z) = 2z + lamda * c
Euler: d/dx F (partial y') - F (partial y) = 0 => 2y + lamda * b = 0
d/dx F (partial z') - F (partial z) = 0 => 2z + lamda * c = 0
Then I'd get y and z...

4. Originally Posted by tennis14321
f = x^2 + y^2 + Z^2 + lamda (ax + by + cz -d) = 0
F (patial y) = 2y + lamda * b
F (patial z) = 2z + lamda * c
Euler: d/dx F (partial y') - F (partial y) = 0 => 2y + lamda * b = 0
d/dx F (partial z') - F (partial z) = 0 => 2z + lamda * c = 0
Then I'd get y and z...

$L = x^2 + y^2 + z^2 + \lambda (ax + by + cz - d)$

$\frac{\partial L}{\partial x} = 0 \Rightarrow 2x + \lambda a = 0$ .... (1)

$\frac{\partial L}{\partial y} = 0 \Rightarrow 2y + \lambda b = 0$ .... (2)

$\frac{\partial L}{\partial z} = 0 \Rightarrow 2z + \lambda c = 0$ .... (3)

$\frac{\partial L}{\partial \lambda} = 0 \Rightarrow ax + by + cz - d = 0$ .... (4)

Substitute equations (1), (2) and (3) into equation (4) and solve for $\lambda$.

Then substitute $\lambda$ into equations (1), (2) and (3) to get x, y and z.

5. aghh
I was so close. I just couldn't think anymore.
Thanks so much.