Vous êtes sur la page 1sur 7

LAGRANGE MULTIPLIERS

Problem 1
Find the optimum of f = x 2 + xy + y 2 subject to the constraint x + y = 1 using Lagrange multipliers.

optimize
f = x 2 + xy + y 2
subject to
x + y =1
J = x 2 + xy + y 2 + ( x + y 1)
J
= 2x + y + = 0
x
J
= x + 2y + = 0
y
2x + y = x + 2 y
x= y
x + y = 1 = 2x
1
x= y=
2
optimum J = x 2 + xy + y 2 = 3x 2 =

3
4

Problem 2
Find the shortest distance from the origin to the ellipse

x2 y 2
+
=1
a 2 b2

( a < b) .

x2 y 2
+
=1
a 2 b2
x2 y2
J = ( x 2 + y 2 ) + 2 + 2 1
b
a

J
x
= 2 x + 2 2 = 0 (1)
x
a
J
y
= 2 y + 2 2 = 0 ( 2 )
y
b

minimize l 2 = ( x 2 + y 2 ) subject to

(a < b)

from (1) and ( 2 )

2 x 1 + 2 = 0 ( 3)
a

2 y 1 + 2 = 0 ( 4 )
b
from ( 3) , x = 0 or = a 2
if x = 0,

x2 y2 y2
+
=
= 1 y = b and l = b
a 2 b2 b2
if = a 2 , then from ( 4 )

a2
2 y 1 2 = 0 and y = 0 because a < b
b
x2 y 2 x2
+
=
= 1 x = a and l = a
a 2 b2 a 2
it is desired to find the minimum length
x = a, y = 0 and l = a

Problem 3
Find the optimum of f = xy 2 z subject to x + 2 y + 3z = 6 using the Lagrange multiplier method.

optimize
f = xy 2 z
subject to
x + 2 y + 3z = 6
J = xy 2 z + ( x + 2 y + 3z 6 )
J
= y 2 z + = 0 (1)
x
J
= 2 xyz + 2 = 0 ( 2 )
y
J
= xy 2 + 3 = 0 ( 3)
z
from (1) and ( 2 )
y 2 z = xyz
y=x
from ( 2 ) and ( 3)
3 xyz = xy 2
3z = y
x + 2 y + 3z = 6
y + 2y + y = 6
4y = 6
y= x=3 2
z =1 2
optimum f
3 9 1 27
f = xy 2 z = =
2 4 2 16

Problem 4
Use the matrix formulation of the Lagrange multiplier method to minimize 5 x12 + 6 x1 x2 + 2 x22 subject
to x1 + 2 x2 = 10 .

5 3
A=

3
2

1
B=
2
= [10]

2 3
A =

3
5

4
1
A B=
7
1

4
B A B = [1 2] = 10
7
-1
4 1
4
-1
T -1
x = A B ( B A B ) = 10 =
7 10
7
T

J min =

(B

A B ) = 10
-1

-1

Problem 5
Use the matrix formulation of the Method of Lagrange multipliers to minimize x12 + x22 + x32 subject to
the linear constraints 3x1 + 5 x2 = 10 and 4 x1 + 5 x3 = 5 .

x12 + x22 + x32


1 0 0
A = 0 1 0
0 0 1
3 x1 + 5 x2 = 10
4 x1 + 5 x3 = 5
3 4
B = 5 0
0 5
10
=
5
3 4
A 1B = 5 0
0 5
3 4
3
5
0

5 0 = 34 12
BT A 1B =

12 41
4 0 5

0 5
1
1 41 12
( BT A 1B ) = 1250
12 34

1
1 70 1 7
1 41 12 10
=
( BT A 1B ) = 1250
12 34 5 250 10 = 25 1




1
1 7
J min = T ( BT A 1B ) = [10 5] = 3
25 1
3 4
5
7

1
1
x = A 1B ( BT A 1B ) = 5 0 = 7
25 1
5
0 5
1

LINEAR PROGRAMMING
Problem 6
Maximize J = 30 x1 + 20 x2 subject to x1 + x2 5 and 2 x1 + x2 10 where x1 , x2 0 .
J = 30 x1 + 20 x2 J 30 x1 20 x2 = 0
x1 + x2 5 x1 + x2 + x3 = 5
2 x1 + x2 10 2 x1 + x2 + x4 = 10
xi 0, i = 1, 2,3, 4
initial simplex table:
J
x1
x2 x3 x4 b
1 30 20 0 0 0
0 1
1 1 0 5

0 2
1 0 1 10
initial basic feasible solution: xT = [ 0 0 5 10] and J = 0
element in second column and third row is the pivot element.
1 0 5 0 15 150
1 0 5 0 15 150
R1 + 15 R3 R1

0 2 2 2 0 10 R2 + R 3 R2 0 0 3 2 1 20

2 R2 R2
0 2 1 0 1 10
0 2 1 0 1 10
non-basic variables: x2 , x4
basic variables: x1 , x3
next basic feasible solution: xT = [5 0 10 0] and J = 150

next pivot element is the element in the second row and the third column
1 0 5 0 15 150 3R1 R1 3 0 15 0 45 450
0 0 3 2 1 20 5R R 0 0 15 10 5 100
2

0 2 1 0 1 10 15R3 R3 0 30 15 0 15 150
3 0 0 10 50 550
R1 + R2 R1
0 0 15 10 5 100
R3 R2 R3
0 30 0 10 10 50
The process is finished since there are no more negative elements in the first row
basic variables: x1 , x2
non-basic variables: x3 , x4
The basic feasible solution is xT = [5 3 20 3 0 0] and J = 550 3

the maximum value of J is 550 3 and occurs at x1 = 5 3 and x2 = 20 3

Problem 7
Minimize J = 5 x1 20 x2 subject to 2 x1 + 10 x2 5 and 2 x1 + 5 x2 10 where x1 , x2 0 .
J = 5 x1 + 20 x2 J + 5 x1 20 x2 = 0
2 x1 + 10 x2 5 2 x1 + 10 x2 + x3 = 5
2 x1 + 5 x2 10 2 x1 + 5 x2 + x4 = 10
xi 0, i = 1, 2,3, 4
initial simplex table:
J x1
x2 x3 x4 b
1 5 20 0 0 0
0 2 10 1 0 5

0 2
5 0 1 10
basic variables: x3 , x4 non-basic variables: x1 , x2

initial basic feasible solution: xT = [ 0 0 5 10] and J = 0


element in third column and second row is the pivot element
J x1 x2
x3 x4 b
1 5 20 0 0 0
1 5 20 0 0 0
0 2 10 1 0 5 2 R R 0 2 10 1 0 5
3

0 2
0 4 10 0 2 20
5 0 1 10
1 1 0 2 0 10
R1 + 2 R2 R1
0 2 10 1 0 5

R3 R2 R3
0 6 0 1 2 15
basic variables: x2 , x4 non-basic variables: x1 , x3
basic feasible solution: xT = [ 0 1 2 0 15 2] and J = 10

The process is finished since there are no more negative elements in the first row
The maximum value of J is 10 and occurs at x1 = 0 and x2 = 1 2
The minimum value of J is 10 and occurs at x1 = 0 and x2 = 1 2

Vous aimerez peut-être aussi