Lagrange Multiplier

2007-06-24 9:37 pm
find the points of the ellipse 4x*2+9y*2 = 36 that are closest to the point (1, 1) as well as the point or points farthest from it?
by Lagrange Multiplier

回答 (2)

2007-06-26 4:40 am
✔ 最佳答案
Function to optimize: f(x,y) = (x-1)^2 + (y-1)^2
Constraint: g(x,y) = 4x^2 + 9y^2 - 36
Therefore the lagrange function is:
Λ(x,y,λ) = (x-1)^2 + (y-1)^2 + λ(4x^2 + 9y^2 - 36)

Its partial derivatives and setting to zero:
dΛ/dx = 2(x-1) + 8λx = 0 ..................................(1)
dΛ/dy = 2(y-1) + 18λy = 0 ................................(2)
dΛ/dλ = 4x^2 + 9y^2 - 36 = 0 ............................(3)

From (1), x=1/(4λ+1) ........................................(4)
From (2), y=1/(9λ+1) ........................................(5)
Put (4) (5) into (3):
4/(4λ+1)^2 + 9/(9λ+1)^2 - 36 = 0
Solving for λ for real roots yields:
λ = -0.336, -0.050

When λ = -0.336, (x,y)=(-2.907, -0.494)
When λ = -0.050, (x,y)=(1.250, 1.818)

Plot for your reference: http://www.badongo.com/pic/766443

其實上面果個concept全對, 只是differentiate錯左.
2007-06-24 11:32 pm
我唔知咩係Lagrange Multiplier
不過我識計
x<=3,y<=2
當x,y在1值上下時
與(1,1)距離最短
所以x=y=√13/6時
與(1,1)的距離為√2x((√13/6)-1)^2
=0.882
由於x>y
所以4x*2達到極大值以及9y*2達到極小值時
和(1,1)距離最遠
所以x=3,y=0
與(1,1)的距離為√(3-1)^2+(0-1)^2
=√5
參考: me


收錄日期: 2021-04-13 00:51:37
原文連結 [永久失效]:
https://hk.answers.yahoo.com/question/index?qid=20070624000051KK01769

檢視 Wayback Machine 備份