1. 程式人生 > >Lagrange multiplier method (拉格朗日乘數法)

Lagrange multiplier method (拉格朗日乘數法)

The Lagrange multiplier method is used to solve the problem that find the extremum of a function z=f(x,y), given ϕ(x,y)=0.

simple extremum problem

To solve a simple extremum problem,

z=f(x,y)
we just need to find the (x,y) where
zx=0zy=0
By solving the simultaneous equations, we could find the (x,y)
s. Then plugging in the (x,y)s into the functionz = f(x,y), we find the extremum of z.

extremum problem with restricted condition

The problem is finding the extremum of

z=f(x,y)
where,
ϕ(x,y)=0
By applying Lagrange multiplier method, we define a new function, as:
F(x,y,λ)=f(x,y)+λϕ(x,y)
Then, take the partial derivatives of x
,y,λ
. We get Fx,Fy,Fλ. Make them be 0.
Fx=0Fy=0Fλ=0
Three equations, three unknow variables. The equation set could be solved. By solving the equation set, we get the (x,y), we care nothing about λ.
Then, plugging the (x,y), just solve out, in the function z=f(x,y), we find the extremum of z
=f(x,y)
with restricted condition ϕ(x,y)=0

explanation

as ϕ(x,y) always be 0, F(x,y,λ) will always be equal to f(x,y).

F(x,y,λ)=f(x,y)+λϕ(x,y)ϕ(x,y)=0F(x,y,λ)=f(x,y)
So F(x,y,λ) and f(x,y) have the same 3-d surface, if you thought a=F(x,y,λ) is a function in 3-d space. In fact the function F(x,y,λ) is a function in 4-d space.
What we do is going to find the extremum of the 4-d space function F(x,y,λ). When F(x,y,λ) get its extremum, the conditions exactly fit the origin problem conditions, occasionally, luckily in fact.
Solving the simple 4-d problem solves the complex 3-d problem. “Why not solve the simple problem?”, Lagrange thought.

[MORE DETAILED EXPLANATION COMES SOON.]

reference

1 [youdaoDic]
特別的,我們學過,怎樣找到直線與平面的交點,通過將引數方程帶入平面方程。
And, well, we’ve learned in particular how to find where a line intersects a plane by plugging in the parametric equation into the equation of a plane.
2 拉格朗日乘數法_百度百科