The Lagrange multiplier method is often used to solve the optimization problem.
To give a simple example, f (x) =x2+y2, the constraint is H (x, y) =x+y-1=0, this example is very simple, simple enough to not need to use Lagrange multiplier method to solve.
Figure just to indicate, please ignore the proportion of the wrong place, the red and green lines are the contours of the target function, the Blue line is a constraint, the other lines with arrows represent normals.
Obviously, D0 is the optimal solution to be asked, so let's analyze the characteristics of D0.
- The D0 is on the constraint curve (in this case a straight line), that is H (x, y) = 0, but all points on the constraint curve meet this requirement, so just this requirement is not sufficient, D1,D2 is also on the curve, what is the difference between them and D0?
- The contour of the D0 is tangent to the curve, that is, the normal direction of the contour is parallel to the normal direction of the curve, that is, F ' (x, y) =-λh ' (x, y), or F ' (x, y)-λh ' (x, y) = 0, the two representations are equivalent, in order to facilitate the introduction of Use the latter representation. F ' (x, y)-λh ' (x, y) = 0, i.e. f/?x-λ?h/?x=0,?f/?y-λ?h/?y=0
The points that meet the above two requirements must be the optimal solution. Summing up the above analysis, the most advantages need to meet the following requirements:
H (x, y) =0
? f/?x-λ?h/?x=0
? f/?y-λ?h/?y=0
Next, the Lagrange function is constructed, L (λ,x,y) = f (x, Y) +λ*h (x, y)
The λ,x,y are biased and equal to 0, that is, the above 3 formulas can be obtained.
Lagrange Multiplier method