close
標題:

Lagrange Multiplier

發問:

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

最佳解答:

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錯左.

aa.jpg

 

此文章來自奇摩知識+如有不便請留言告知

其他解答:

我唔知咩係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
arrow
arrow
    文章標籤
    三元 文章 只是 奇摩
    全站熱搜

    hzb53jl55v 發表在 痞客邦 留言(0) 人氣()