You are on page 1of 6

ECN 2115: Lecture 1. 2.

Mathematics of constrained optimization and its economic interpretation

Optimization without a constraint

For a maximum:

If y= f (x), then f (x) achieves a maximum at

X* if f(x* ) ≥ f(x) for all x.

It can then be shown that if f(x) is a smooth function that achieves its maximum value at x * , then

df(x * ) / dx = 0 first- order condition

d2 f(x*) /dx2 ≤ 0 second – order condition

The first order condition says that the function is flat at X *

The second order condition says that the function is concave near X *.

Both these properties have to hold if X* is a maximum.

For a minimum:

If y = f(X), then f(X) achieves its minimum value at X * if f(X* ) ≤ f(X) for all X

If f(X) is a smooth function that achieves its minimum at X * , then

df (X* ) / dx = 0 first order condition

d2 f(X*) / dx 2 ≥ 0 second order condition

The first order condition says that the function is flat at X *.

The second order condition says that the function is convex near X *.

Example 2.1:

You are given a firm that wishes to maximize profits (∏). The total revenue function of the firm is;

1
R= 4000Q – 33 Q2 . The total cost function is C=2Q3 – 3Q2 + 400Q +5000.

Where Q= quantity. Since Q=0 is out, we assume Q > 0.

How do we go about finding the point of maximum profits for the firm?

(a) We set up the profit function,

∏= R - C

∏ = 4000Q – 33Q2 – (2Q3 – 3Q2 + 400Q + 5000)

= - 2Q3 -30Q2 + 3600Q – 5000

(b) Take the first derivative of the profit function and set it equal to zero and solve for Q.

d∏ / dQ = -6 Q2 – 60Q + 3600 = 0

= -6(Q2 + 10Q – 600) = 0

= - 6 [ (Q+30) (Q-20) ] = 0

We solve for the two critical points. These are Q = -30 and Q = 20.

( c ) We take the second derivative.

We take the second derivative and evaluate it at the positive critical point

Since we are talking about positive amounts, we ignore the negative critical point. It is uninteresting for
our purposes. In other words, it has no economic significance

We then check the sign for concavity to be sure it is a relative maximum. Thus,

d2∏/dx2 = - 12Q – 60.

We evaluate this at Q = 20. Thus we have,

d2 ∏ / dx2 = - 12 (20) – 60

= 300 < 0.

Thus the slope at the critical point is concave. Therefore the point Q= 20 is a relative maximum.

Therefore, profits are maximized at Q = 20. Where profits total is,

∏ (20) = -2(20)3 - 30(20)2 + 3600(20) – 5000

= 39,000.

2
Constrained Optimization with Lagrange multiplier

In economic problems, we are always faced with constraints. We are going to have a maximization or
minimization problem. This problem with faced with a constraint. We use the concept of the Lagrange
multiplier to solve this sort of problem.

Using the Lagrange multiplier we can maximize or minimize a function subject to a constraint.

We are given a function f(X,Y) to be either maximized or minimized. This is subject to a constraint g(X,Y)
= k.

We can form a new function F. This can be done by going through three steps:

1) We set the constraint equal to zero.

2) We define λ as the Lagrange multiplier. We multiply the new function in (1) by λ.

3) We add the product in (2) to the original function, f(X, Y).

Thus, we have a new function F,

F( X, Y, λ ) = f (X,Y) + λ [ k – g (X,Y) ]

F ( X,Y, λ ) is the Lagrangian function

f(X, Y) is the original function or sometimes referred to as the objective function.

g (X, Y) is the constraint

Notice that since k – g(X,Y) = 0

Then λ [k – g (X, Y) ] = 0.

So the addition of λ [ k – g (X, Y)] = 0 to the objective function does not change the value of the
objective function.

So the critical values of F( X, Y, λ) are X 0 , Y0, λ0 at which the function is optimized.

How do we find these values? We find these values by taking the partial derivatives of the F function
with respect to all the independent variables. Set the equations to zero and then solve them
simultaneously.

Please remember that if we have a function F(X). We can write the first derivative as

dF(X)/dx or Fx . . Thus we can write the partial derivatives and the first order conditions of the F (X, Y,
λ ) as:

3
Fx ( X, Y, λ ) = 0

Fy ( X , Y, λ ) = 0

Fλ ( X, Y, ) = 0.

Example 2.2:

Example of Constrained optimization

You are given an objective function f (X, Y) = 4 X 2 + 3XY + 6 Y2 and the constraint on the function in
the form of X + Y = 56. You are to optimize f(X, Y) subject to the constraint.

We go through the following steps:

1) We set the constraint equal to zero

56 – X – Y = 0.

2) We multiply the constraint in (1) by λ and add the product to the objective function in order to
form the Lagrangian function F.

F = 4 X2 + 3XY + 6Y2 + λ ( 56 –X –Y )

3) We now take the first derivatives with respect to the independent variables. Set the partial
derivatives and set them equal to zero.

Fx = 8X + 3Y - λ = 0

Fy = 3X = 12Y - λ = 0

F λ= 56 – X – Y = 0

4) Solve the simultaneous equations for the critical values of the independent variables

We get X= 36 , Y=20 , λ= 348

If we solve for the optimal value of F, we get F = 9744.

We can generalize our analysis. We wish to find the values of X 1, X2 , ……. , Xn that maximize

Y = f( X 1 , X2 , ….., Xn ). Subject to the constraint g ( X 1 , X2 , … Xn )

We set up the Lagrangian,

L = f ( X1 , X2 , ….. Xn) + λg( X1 , X2 , ….. Xn )

We solve for first order conditions

4
L x1 = f1 + λ g 1 = 0

Lx2 = f2 + λ g 2 = 0

Ln = f + λg n = 0

L λ = g ( X 1 , X2 , … X n) =0

Example 2:3

Suppose f(X, Y) = XY. Find the maximum value of f, if X and Y are constrained to sum to 1.

You can use the Lagrangian multiplier.

Thus max f(X, Y) = XY subject to X +Y = 1

L = XY + λ (1 – X- Y)

Lx = Y - λ = 0

L y= X -λ = 0

Lλ = 1- X –Y =0

Solve for X and Y. From the first order conditions λ= X = Y

Then X = Y.

We then solve from the constraint;

1= X + Y

We have therefore X= ½ and Y = ½

The significance of the Lagrange multiplier

The Lagrange multiplier, λ, approximates the marginal impact on the objective function caused by a
small change in the constant of the constraint.

For if we take our earlier problem

5
F = 4X2 + 3 XY +6 Y2 subject to the constraint X+Y = 56. We got the solution to the maximization problem
as X =36, Y= 20 and λ = 348.

With λ = 348, if, for instance, there is a one unit increase (decrease) in the constant of the constraint,
this would cause F to increase (decrease) by 348 units.

Lagrangian multipliers are therefore often referred to as shadow prices. When we later on discuss utility
maximization under consumer theory, we shall notice that λ will estimate the marginal utility of an extra
Kwacha of income.

Let us demonstrate a unit change in the constraint by looking at a new problem. Thus we have a
problem to maximize f = 4X2 +3XY +6Y2 subject to the constraint X+Y= 57. Please notice that the
constraint has been relaxed by one unit.

So we have the Lagrangian,

F = 4X2 + 3XY + 6Y2 +λ ( 57 –X-Y).

We get first order conditions;

Fx = 8X + 3Y - λ = 0

Fy = 3X +12Y - λ = 0

Fλ = 57 – X – Y = 0

If we solve simultaneously, we get,

X=36.64; Y=20.36 and λ = 354.2

Substituting these values into F, we get,

F= 10,095.

This is 351 units larger than the original F of 9744.

Thus 351 is approximately equal to 348 as suggested by λ.

Exercise 2.

You are given the function Z= XY and a constraint M= 5X + 10Y. Find the first order conditions for
the maximization problem.

You might also like