Lagrange multiplier method examples. Lagrange multiplier method


Description of the method

Where .

Rationale

The following justification for the Lagrange multiplier method is not a rigorous proof of it. It contains heuristic considerations that help to understand the geometric meaning of the method.

Two-dimensional case

Level lines and curve.

Let it be required to find the extremum of some function of two variables under the condition specified by the equation . We will assume that all functions are continuously differentiable, and this equation defines a smooth curve S on surface . Then the problem reduces to finding the extremum of the function f on the curve S. We will also assume that S does not pass through points where the gradient f turns to 0.

Let's draw function level lines on the plane f(that is, curves). From geometric considerations it is clear that the extremum of the function f on the curve S there can only be points at which tangents to S and the corresponding level line coincide. Indeed, if the curve S crosses the level line f at a point transversally (that is, at some non-zero angle), then moving along the curve S from a point we can get to the level lines corresponding to a larger value f, and less. Therefore, such a point cannot be an extremum point.

Thus, a necessary condition for an extremum in our case will be the coincidence of the tangents. To write it in analytical form, note that it is equivalent to the parallelism of the gradients of the functions f and ψ at a given point, since the gradient vector is perpendicular to the tangent to the level line. This condition is expressed in the following form:

where λ is a nonzero number that is a Lagrange multiplier.

Let's now consider Lagrange function, depending on and λ:

A necessary condition for its extremum is that the gradient is equal to zero. In accordance with the rules of differentiation, it is written in the form

We have obtained a system, the first two equations of which are equivalent to the necessary condition for a local extremum (1), and the third is equivalent to the equation . You can find it from it. Moreover, since otherwise the gradient of the function f vanishes at the point , which contradicts our assumptions. It should be noted that the points found in this way may not be the desired points of the conditional extremum - the considered condition is necessary, but not sufficient. Finding a conditional extremum using an auxiliary function L and forms the basis of the Lagrange multiplier method, applied here for the simplest case of two variables. It turns out that the above reasoning can be generalized to the case of an arbitrary number of variables and equations that specify the conditions.

Based on the Lagrange multiplier method, it is possible to prove some sufficient conditions for a conditional extremum, which require analysis of the second derivatives of the Lagrange function.

Application

  • The Lagrange multiplier method is used to solve nonlinear programming problems that arise in many fields (for example, in economics).
  • The main method for solving the problem of optimizing the quality of encoding audio and video data at a given average bitrate (distortion optimization - English. Rate-Distortion optimization).

see also

Links

  • Zorich V. A. Mathematical analysis. Part 1. - ed. 2nd, rev. and additional - M.: FAZIS, 1997.

Wikimedia Foundation.

2010.

    See what “Lagrange Multipliers” are in other dictionaries: Lagrange multipliers - additional factors that transform the objective function of an extremal problem of convex programming (in particular, linear programming) when solving it using one of the classical methods, the method of resolving multipliers... ...

    Economic-mathematical dictionary Lagrange multipliers - Additional factors that transform the objective function of an extremal convex programming problem (in particular, linear programming) when solving it using one of the classical methods, the method of resolving multipliers (Lagrange method).... ...

    Technical Translator's Guide Mechanics. 1) Lagrange equations of the 1st kind, differential equations of mechanical motion. systems, which are given in projections onto rectangular coordinate axes and contain the so-called. Lagrange multipliers. Obtained by J. Lagrange in 1788. For a holonomic system, ... ...

    Physical encyclopedia Mechanics ordinary differential equations of the 2nd order, describing the movements of mechanical. systems under the influence of forces applied to them. L.u. established by J. Lag range in two forms: L. u. 1st kind, or equations in Cartesian coordinates with... ...

    Mathematical Encyclopedia Mechanics. 1) Lagrange equations of the 1st kind, differential equations of mechanical motion. systems, which are given in projections onto rectangular coordinate axes and contain the so-called. Lagrange multipliers. Obtained by J. Lagrange in 1788. For a holonomic system, ... ...

    1) in hydromechanics, the equation of fluid (gas) motion in Lagrange variables, which are the coordinates of the medium. Received French scientist J. Lagrange (approx. 1780). From L. u. the law of motion of the medium is determined in the form of dependencies... ...

    A function used in solving problems on the conditional extremum of functions of many variables and functionals. With the help of L. f. the necessary conditions for optimality in problems on a conditional extremum are written down. In this case, it is not necessary to express only variables... Mechanics ordinary differential equations of the 2nd order, describing the movements of mechanical. systems under the influence of forces applied to them. L.u. established by J. Lag range in two forms: L. u. 1st kind, or equations in Cartesian coordinates with... ...

    Method for solving problems on Conditional extremum; L.M.M. consists in reducing these problems to problems on the unconditional extremum of an auxiliary function, the so-called. Lagrange functions. For the problem of the extremum of the function f (x1, x2,..., xn) for... ...

    Variables, with the help of which the Lagrange function is constructed when studying problems on a conditional extremum. The use of linear methods and the Lagrange function allows us to obtain the necessary optimality conditions in problems involving a conditional extremum in a uniform way... Mechanics ordinary differential equations of the 2nd order, describing the movements of mechanical. systems under the influence of forces applied to them. L.u. established by J. Lag range in two forms: L. u. 1st kind, or equations in Cartesian coordinates with... ...

    1) in hydromechanics, the equations of motion of a fluid medium, written in Lagrange variables, which are the coordinates of particles of the medium. From L. u. the law of motion of particles of the medium is determined in the form of dependences of coordinates on time, and from them... ... Great Soviet Encyclopedia

Multiplier methodLagrange(in English literature “LaGrange's method of undetermined multipliers”) ˗ is a numerical method for solving optimization problems that allows you to determine the “conditional” extremum of the objective function (minimum or maximum value)

in the presence of specified restrictions on its variables in the form of equalities (i.e., the range of permissible values ​​is defined)

˗ these are the values ​​of the function argument (controllable parameters) on the real domain at which the function value tends to an extremum. The use of the name “conditional” extremum is due to the fact that an additional condition is imposed on the variables, which limits the range of permissible values ​​when searching for the extremum of the function.

The Lagrange multiplier method allows the problem of searching for a conditional extremum of an objective function on a set of admissible values ​​to be transformed into the problem of unconditional optimization of a function.

In case the functions And are continuous along with their partial derivatives, then there are such variables λ that are not simultaneously equal to zero, under which the following condition is satisfied:

Thus, in accordance with the Lagrange multiplier method, to find the extremum of the objective function on the set of admissible values, I compose the Lagrange function L(x, λ), which is further optimized:

where λ ˗ is a vector of additional variables called undetermined Lagrange multipliers.

Thus, the problem of finding the conditional extremum of the function f(x) has been reduced to the problem of finding the unconditional extremum of the function L(x, λ).

And

The necessary condition for the extremum of the Lagrange function is given by a system of equations (the system consists of “n + m” equations):

Solving this system of equations allows us to determine the arguments of the function (X) at which the value of the function L(x, λ), as well as the value of the target function f(x) correspond to the extremum.

The magnitude of the Lagrange multipliers (λ) is of practical interest if the constraints are presented in the form with a free term in the equation (constant). In this case, we can consider a further (increase/decrease) value of the objective function by changing the value of the constant in the equation system. Thus, the Lagrange multiplier characterizes the rate of change in the maximum of the objective function when the limiting constant changes.

There are several ways to determine the nature of the extremum of the resulting function:

First method: Let be the coordinates of the extremum point, and be the corresponding value of the objective function. A point close to the point is taken and the value of the objective function is calculated:

If , then there is a maximum at the point.

If , then there is a minimum at the point.

Second method: A sufficient condition from which the nature of the extremum can be determined is the sign of the second differential of the Lagrange function. The second differential of the Lagrange function is defined as follows:

If at a given point minimum, if , then the objective function f(x) has a conditional maximum.

Third method: Also, the nature of the extremum of the function can be determined by considering the Hessian of the Lagrange function. The Hessian matrix is ​​a symmetric square matrix of second partial derivatives of a function at the point at which the elements of the matrix are symmetric about the main diagonal.

To determine the type of extremum (maximum or minimum of a function), you can use Sylvester’s rule:

1. In order for the second differential of the Lagrange function to be of positive sign it is necessary that the angular minors of the function be positive. Under such conditions, the function at this point has a minimum.

2. In order for the second differential of the Lagrange function to be negative in sign , it is necessary that the angular minors of the function alternate, and the first element of the matrix must be negativesv. Under such conditions, the function at this point has a maximum.

By angular minor we mean the minor located in the first k rows and k columns of the original matrix.

The main practical significance of the Lagrange method is that it allows you to move from conditional optimization to unconditional optimization and, accordingly, expand the arsenal of available methods for solving the problem. However, the problem of solving the system of equations to which this method reduces is, in the general case, no simpler than the original problem of finding an extremum. Such methods are called indirect. Their use is explained by the need to obtain a solution to an extremal problem in analytical form (for example, for certain theoretical calculations). When solving specific practical problems, direct methods are usually used, based on iterative processes of calculating and comparing the values ​​of the functions being optimized.

Calculation method

1 step: We determine the Lagrange function from the given objective function and system of constraints:

Forward

In order to add your comment to the article, please register on the site.

Today in lesson we will learn to find conditional or, as they are also called, relative extremes functions of several variables, and, first of all, we will talk, of course, about conditional extrema functions of two And three variables, which are found in the vast majority of thematic problems.

What do you need to know and be able to do at the moment? Despite the fact that this article is “on the outskirts” of the topic, not much is required to successfully master the material. At this point you should be aware of the basic surfaces of space, be able to find partial derivatives (at least at an average level) and, as merciless logic dictates, to understand unconditional extremes. But even if you have a low level of preparation, do not rush to leave - all the missing knowledge/skills can really be “picked up along the way”, and without any hours of torment.

First, let’s analyze the concept itself and at the same time carry out a quick repetition of the most common surfaces. So, what is a conditional extremum? ...The logic here is no less merciless =) The conditional extremum of a function is an extremum in the usual sense of the word, which is achieved when a certain condition (or conditions) are met.

Imagine an arbitrary "oblique" plane V Cartesian system. None extremum there is no trace of it here. But this is for the time being. Let's consider elliptical cylinder, for simplicity - an endless round “pipe” parallel to the axis. Obviously, this “pipe” will “cut” out of our plane ellipse, as a result of which there will be a maximum at its upper point, and a minimum at its lower point. In other words, the function defining the plane reaches extrema given that that it was crossed by a given circular cylinder. Exactly “provided”! Another elliptical cylinder intersecting this plane will almost certainly produce different minimum and maximum values.

If it’s not very clear, then the situation can be simulated realistically (though in reverse order): take an ax, go outside and cut down... no, Greenpeace won’t forgive you later - it’s better to cut the drainpipe with a grinder =). The conditional minimum and conditional maximum will depend on at what height and under what (non-horizontal) the cut is made at an angle.

The time has come to dress the calculations in mathematical attire. Let's consider elliptical paraboloid, which has absolute minimum at point . Now let's find the extremum given that. This plane parallel to the axis, which means it “cuts” out of the paraboloid parabola. The top of this parabola will be the conditional minimum. Moreover, the plane does not pass through the origin of coordinates, therefore, the point will remain irrelevant. Didn't provide a picture? Let's follow the links immediately! It will take many, many more times.

Question: how to find this conditional extremum? The simplest way to solve is to use the equation (which is called - condition or connection equation) express, for example: – and substitute it into the function:

The result is a function of one variable that defines a parabola, the vertex of which is “calculated” with your eyes closed. Let's find critical points:

- critical point.

The next easiest thing to use is second sufficient condition for extremum:

In particular: this means that the function reaches a minimum at point . It can be calculated directly: , but we will take a more academic route. Let's find the “game” coordinate:
,

write down the conditional minimum point, make sure that it really lies in the plane (satisfies the coupling equation):

and calculate the conditional minimum of the function:
given that (“additive” is required!!!).

The considered method can be used in practice without a shadow of a doubt, however, it has a number of disadvantages. Firstly, the geometry of the problem is not always clear, and secondly, it is often unprofitable to express “x” or “y” from the connection equation (if there is any way to express anything at all). And now we will consider a universal method for finding conditional extrema, called Lagrange multiplier method:

Example 1

Find the conditional extrema of the function with the specified equation of connection to the arguments.

Do you recognize the surfaces? ;-) ...I'm glad to see your happy faces =)

By the way, from the formulation of this problem it becomes clear why the condition is called connection equation– function arguments connected an additional condition, that is, the found extremum points must necessarily belong to a circular cylinder.

Solution: in the first step you need to present the connection equation in the form and compose Lagrange function:
, where is the so-called Lagrange multiplier.

In our case and:

The algorithm for finding conditional extrema is very similar to the scheme for finding “ordinary” extremes. Let's find partial derivatives Lagrange functions, while the “lambda” should be treated as a constant:

Let's compose and solve the following system:

The tangle is unraveled as standard:
from the first equation we express ;
from the second equation we express .

Let’s substitute the connections into the equation and carry out simplifications:

As a result, we obtain two stationary points. If , then:

if , then:

It is easy to see that the coordinates of both points satisfy the equation . Scrupulous people can also perform a full check: for this you need to substitute into the first and second equations of the system, and then do the same with the set . Everything must “come together”.

Let us check the fulfillment of a sufficient extremum condition for the found stationary points. I will discuss three approaches to solving this issue:

1) The first method is a geometric justification.

Let's calculate the values ​​of the function at stationary points:

Next, we write down a phrase with approximately the following content: a section of a plane by a circular cylinder is an ellipse, at the upper vertex of which the maximum is reached, and at the lower vertex the minimum. Thus, a larger value is a conditional maximum, and a smaller value is a conditional minimum.

If possible, it is better to use this method - it is simple, and this decision is counted by teachers (a big plus is that you showed an understanding of the geometric meaning of the problem). However, as already noted, it is not always clear what intersects with what and where, and then analytical verification comes to the rescue:

2) The second method is based on the use of second order differential signs. If it turns out that at a stationary point, then the function reaches a maximum there, but if it does, then it reaches a minimum.

Let's find second order partial derivatives:

and create this differential:

When , this means that the function reaches its maximum at the point ;
at , which means the function reaches a minimum at the point .

The method considered is very good, but has the disadvantage that in some cases it is almost impossible to determine the sign of the 2nd differential (usually this happens if and/or are of different signs). And then the “heavy artillery” comes to the rescue:

3) Let’s differentiate the connection equation by “X” and “Y”:

and compose the following symmetrical matrix:

If at a stationary point, then the function reaches there ( attention!) minimum, if – then maximum.

Let's write the matrix for the value and the corresponding point:

Let's calculate it determinant:
, thus, the function has a maximum at point .

Likewise for value and point:

Thus, the function has a minimum at point .

Answer: given that :

After a thorough analysis of the material, I simply cannot help but offer you a couple of typical tasks for self-test:

Example 2

Find the conditional extremum of the function if its arguments are related by the equation

Example 3

Find the extrema of the function given the condition

And again, I strongly recommend understanding the geometric essence of the tasks, especially this applies to the last example, where analytical verification of a sufficient condition is not a gift. Remember what 2nd order line sets the equation, and what surface this line generates in space. Analyze along which curve the cylinder will intersect the plane and where on this curve there will be a minimum and where there will be a maximum.

Solutions and answers at the end of the lesson.

The problem under consideration is widely used in various fields, in particular - we won’t go far - in geometry. Let's solve everyone's favorite problem about the half-liter bottle (see example 7 of articleExtreme Challenges ) second way:

Example 4

What should be the dimensions of a cylindrical tin can so that the least amount of material is used to make the can, if the volume of the can is equal to

Solution: consider a variable base radius, a variable height and compose a function of the area of ​​the total surface of the can:
(area of ​​two covers + side surface area)

Consider a linear inhomogeneous differential equation of the first order:
(1) .
There are three ways to solve this equation:

  • method of variation of constant (Lagrange).

Let us consider the solution of a first-order linear differential equation by the Lagrange method.

Method of variation of constant (Lagrange)

In the variation of constant method, we solve the equation in two steps. In the first step, we simplify the original equation and solve a homogeneous equation. At the second stage, we replace the integration constant obtained at the first stage of the solution with a function. Then we look for a general solution to the original equation.

Consider the equation:
(1)

Step 1 Solving a homogeneous equation

We are looking for a solution to the homogeneous equation:

This is a separable equation

We separate the variables - multiply by dx, divide by y:

Let's integrate:

Integral over y - tabular:

Then

Let's potentiate:

Let's replace the constant e C with C and remove the modulus sign, which comes down to multiplying by a constant ±1, which we will include in C:

Step 2 Replace the constant C with the function

Now let's replace the constant C with a function of x:
C → u (x)
That is, we will look for a solution to the original equation (1) as:
(2)
Finding the derivative.

According to the rule of differentiation of a complex function:
.
According to the product differentiation rule:

.
Substitute into the original equation (1) :
(1) ;

.
Two members are reduced:
;
.
Let's integrate:
.
Substitute in (2) :
.
As a result, we obtain a general solution to a first-order linear differential equation:
.

An example of solving a first-order linear differential equation by the Lagrange method

Solve the equation

Solution

We solve the homogeneous equation:

We separate the variables:

Multiply by:

Let's integrate:

Tabular integrals:

Let's potentiate:

Let's replace the constant e C with C and remove the modulus signs:

From here:

Let's replace the constant C with a function of x:
C → u (x)

Finding the derivative:
.
Substitute into the original equation:
;
;
Or:
;
.
Let's integrate:
;
Solution of the equation:
.

The method for determining a conditional extremum begins with constructing an auxiliary Lagrange function, which in the region of feasible solutions reaches a maximum for the same values ​​of variables x 1 , x 2 , ..., x n , which is the same as the objective function z . Let the problem of determining the conditional extremum of the function be solved z = f(X) under restrictions φ i ( x 1 , x 2 , ..., x n ) = 0, i = 1, 2, ..., m , m < n

Let's compose a function

which is called Lagrange function. X , - constant factors ( Lagrange multipliers). Note that Lagrange multipliers can be given an economic meaning. If f(x 1 , x 2 , ..., x n ) - income consistent with the plan X = (x 1 , x 2 , ..., x n ) , and the function φ i (x 1 , x 2 , ..., x n ) - costs of the i-th resource corresponding to this plan, then X , is the price (estimate) of the i-th resource, characterizing the change in the extreme value of the objective function depending on the change in the size of the i-th resource (marginal estimate). L(X) - function n+m variables (x 1 , x 2 , ..., x n , λ 1 , λ 2 , ..., λ n ) . Determining the stationary points of this function leads to solving the system of equations

It's easy to see that . Thus, the task of finding the conditional extremum of the function z = f(X) reduces to finding the local extremum of the function L(X) . If a stationary point is found, then the question of the existence of an extremum in the simplest cases is resolved on the basis of sufficient conditions for the extremum - studying the sign of the second differential d 2 L(X) at a stationary point, provided that the variable increments Δx i - connected by relationships

obtained by differentiating the coupling equations.

Solving a system of nonlinear equations in two unknowns using the Find Solution tool

Settings Finding a solution allows you to find a solution to a system of nonlinear equations with two unknowns:

Where
- nonlinear function of variables x And y ,
- arbitrary constant.

It is known that the couple ( x , y ) is a solution to system of equations (10) if and only if it is a solution to the following equation with two unknowns:

WITH on the other hand, the solution to system (10) is the intersection points of two curves: f ] (x, y) = C And f 2 (x, y) = C 2 on surface XOY.

This leads to a method for finding the roots of the system. nonlinear equations:

    Determine (at least approximately) the interval of existence of a solution to the system of equations (10) or equation (11). Here it is necessary to take into account the type of equations included in the system, the domain of definition of each of their equations, etc. Sometimes the selection of an initial approximation of the solution is used;

    Tabulate the solution to equation (11) for the variables x and y on the selected interval, or construct graphs of functions f 1 (x, y) = C, and f 2 (x,y) = C 2 (system(10)).

    Localize the supposed roots of the system of equations - find several minimum values ​​from the table tabulating the roots of equation (11), or determine the intersection points of the curves included in the system (10).

4. Find the roots for the system of equations (10) using the add-in Finding a solution.

Editor's Choice
We all know the exciting story about Robinson Crusoe. But few people thought about its name, and here we are not talking about a prototype...

Sunnis are the largest sect in Islam, and Shiites are the second largest sect of Islam. Let's figure out what they agree on and what...

In step-by-step instructions, we will look at how in 1C Accounting 8.3 accounting for finished products and costs for them is carried out. Before...

Usually, working with bank statements is configured automatically through the client-bank system, but there is the possibility of integrating client-bank and 1C...
When the duty of a tax agent is terminated in connection with the submission of information to the tax authorities about the impossibility of withholding personal income tax,...
Name: Irina Saltykova Age: 53 years old Place of birth: Novomoskovsk, Russia Height: 159 cm Weight: 51 kg Activities:...
Dysphoria is a disorder of emotional regulation, manifested by episodes of angry and melancholy mood, accompanied by...
You have entered into a relationship with a Taurus man, you feel strong sympathy for him, but it is too early to talk about love. Many women in...
Stones for the zodiac sign Libra (September 24 - October 23) The zodiac sign Libra represents justice, the kingdom of Themis (second wife...