拉格朗日乘子法
来源:互联网 发布:韩国melon软件下载 编辑:程序博客网 时间:2024/06/05 16:44
Lagrange Multipliers
The method of Lagrange multipliers is a method for finding extrema of a function of several variables restricted to a given subset.
Let us begin with an example. Find the maximum and minimum of the function z=f(x,y)=6x+8y subject to the constraint g(x,y)=x^2+y^2-1=0. We can solve this problem by parameterizing the circle and converting the problem to an optimization problem with one independent variable, that can be tackled using techniques from single variable calculus. In this section we apply the method of Lagrange multipliers instead.
The key to understanding this technique is the following figure, which plots the constraint function and the level curves of f(x,y).
The constraint function is the circle of radius 1 centered at the origin. Recall that the level curves of f(x,y)=6x+8y are the curves defined by 6x+8y=C, where C is a constant. These curves are the straight lines in the figure . On 6x+8y=C, f(x,y)=C. The value of C is listed on each level curve in the figure. As the plot shows, the function of f(x,y) takes on values between -10 and 10 for points on the circle. Hence, the maximum is 10 and the minimum is -10.
Note that the maximum and minimum occur at points where the constraint curve is tangent to the level curve! There is another way to characterize the extreme points: the maximum and minimum occur at points where the normal to constraint curve and the normal to level curve point in the same direction! The vectors at the max and min in the figure above are the normal vectors.
As discussed previously, the gradient vector
is normal to the level curve of f through (x,y). It turns out that the normal vector to the constraint curve is the gradient of g:
Why is this last fact true? Let z=g(x,y). The constraint curve g(x,y)=0 is a level curve corresponding to 0. Hence, the gradient vector of g(x,y) on the constraint curve is normal to the constraint curve.
At the maximum and minimum points the normal vectors point in the same direction. That means that the normal vectors are multiples of each other:
Here the unknown multiplier
is called the Lagrange multiplier. For the case of functions of two variables, this last vector equation can be written:
For our problem
and
Hence, the above vector equation consists of the following 2 equations
and
These last 2 equations have 3 unknowns: x, y, and lambda. We need a third equation to solve for the 3 variables. The third equation is the constraint equation:
We now solve these last equations. Solving for x and y in the first two equations, we have:
Substituting these expressions for x and y in the constraint equation, we have:
Solving this last equation, we obtain lambda=+5 and lambda =-5. If lambda=5, then x=3/5 and y=4/5 and f(x,y)=10. This is maximum value of f(x,y). If lambda=-5, then x=-3/5 and y=-4/5 and f(x,y)=-10. This is the minimum value of f(x,y).
In general, the equations that must be solved simultaneously are nonlinear, and there is no simple recipe for solving them.
The Lagrange multiplier technique can be applied to problems in higher dimensions. Consider the problem: find the extreme values of w=f(x,y,z) subject to the constraint g(x,y,z)=0. In this case we get the following 4 equations for the 4 unknowns x, y, z, and lambda.
and the constraint equation:
For this problem, the constraint is a surface in xyz space.
- 拉格朗日乘子法
- 拉格朗日乘子法
- 拉格朗日乘子法
- 拉格朗日乘子法
- 拉格朗日乘子法
- 拉格朗日乘子法
- 拉格朗日乘子法
- 拉格朗日乘子法
- 拉格朗日乘子法入门
- 拉格朗日乘子法和KKT条件
- 拉格朗日乘子法和KKT条件
- 优化算法:拉格朗日乘子法
- 拉格朗日乘子法和KKT条件
- 拉格朗日乘子法和KKT条件
- 拉格朗日乘子法和KKT条件
- 拉格朗日乘子法和KKT条件
- 拉格朗日乘子法 - Lagrange multiplier
- 拉格朗日乘子法和KKT条件
- CrackZ的文章:FLEXlm--愚人的商业许可证管理器
- ruby使用推荐文章
- 第八周实验报告任务4 实现分数类中的运算符重载,分数类中的对象可以和整数型进行四则运算,且运算符合交换律。
- 第九周实验报告1
- 第九周实验报告(一)定义Time类中的<<、>>运算符的重载
- 拉格朗日乘子法
- 入门笔记 - IoCallDriver
- 第九周1
- Android中TextVIew一些属性
- log4j原理以及配置
- 分享一个CSS3实现的动态内容标签页切换效果教程
- 第九周 任务一
- php登陆验证
- 关于Android4.0的Alertdialog对话框