Lecture 2 Optimization with equality constraints

Similar documents
EC5555 Economics Masters Refresher Course in Mathematics September Lecture 6 Optimization with equality constraints Francesco Feri

Constrained Optimization

5 Day 5: Maxima and minima for n variables.

MTAEA Convexity and Quasiconvexity

1. Show that the rectangle of maximum area that has a given perimeter p is a square.

QEM Optimization, WS 2017/18 Part 4. Constrained optimization

(1) Given the following system of linear equations, which depends on a parameter a R, 3x y + 5z = 2 4x + y + (a 2 14)z = a + 2

21-256: Lagrange multipliers

EC422 Mathematical Economics 2

MATHEMATICS II: COLLECTION OF EXERCISES AND PROBLEMS

Lagrange multipliers. Contents. Introduction. From Wikipedia, the free encyclopedia

Lecture 2 - Introduction to Polytopes

Unconstrained Optimization Principles of Unconstrained Optimization Search Methods

Convexity. 1 X i is convex. = b is a hyperplane in R n, and is denoted H(p, b) i.e.,

Applied Lagrange Duality for Constrained Optimization

Machine Learning for Signal Processing Lecture 4: Optimization

Programming, numerics and optimization

REVIEW I MATH 254 Calculus IV. Exam I (Friday, April 29) will cover sections

Unconstrained Optimization

Demo 1: KKT conditions with inequality constraints

Lagrangian Multipliers

Lagrangian Multipliers

Inverse and Implicit functions

Convexity and Optimization

Linear Programming. Larry Blume. Cornell University & The Santa Fe Institute & IHS

minimise f(x) subject to g(x) = b, x X. inf f(x) = inf L(x,

A Short SVM (Support Vector Machine) Tutorial

Convexity and Optimization

Introduction to optimization

Lagrange Multipliers

Functions of Two variables.

Second Midterm Exam Math 212 Fall 2010

Minima, Maxima, Saddle points

Advanced Operations Research Techniques IE316. Quiz 2 Review. Dr. Ted Ralphs

Constrained and Unconstrained Optimization

Introduction to Machine Learning

15.082J and 6.855J. Lagrangian Relaxation 2 Algorithms Application to LPs

R f da (where da denotes the differential of area dxdy (or dydx)

Shiqian Ma, MAT-258A: Numerical Optimization 1. Chapter 2. Convex Optimization

POLYHEDRAL GEOMETRY. Convex functions and sets. Mathematical Programming Niels Lauritzen Recall that a subset C R n is convex if

Lecture 2 September 3

Solution Methods Numerical Algorithms

Chapter 3 Numerical Methods

Convexity Theory and Gradient Methods

Convex sets and convex functions

COLUMN GENERATION IN LINEAR PROGRAMMING

Lecture 25 Nonlinear Programming. November 9, 2009

Computational Methods. Constrained Optimization

Name. Final Exam, Economics 210A, December 2012 There are 8 questions. Answer as many as you can... Good luck!

Introduction to Constrained Optimization

Chapter 5 Partial Differentiation

California Institute of Technology Crash-Course on Convex Optimization Fall Ec 133 Guilherme Freitas

LECTURE 18 - OPTIMIZATION

Elements of Economic Analysis II Lecture III: Cost Minimization, Factor Demand and Cost Function

Math 241, Final Exam. 12/11/12.

Chapter II. Linear Programming

Optimization Methods: Optimization using Calculus Kuhn-Tucker Conditions 1. Module - 2 Lecture Notes 5. Kuhn-Tucker Conditions

Introduction to Modern Control Systems

Lecture 5: Properties of convex sets

Mathematical Programming and Research Methods (Part II)

LECTURE 13: SOLUTION METHODS FOR CONSTRAINED OPTIMIZATION. 1. Primal approach 2. Penalty and barrier methods 3. Dual approach 4. Primal-dual approach

EC 521 MATHEMATICAL METHODS FOR ECONOMICS. Lecture 2: Convex Sets

Key points. Assume (except for point 4) f : R n R is twice continuously differentiable. strictly above the graph of f except at x

Optimization III: Constrained Optimization

Advanced Operations Research Techniques IE316. Quiz 1 Review. Dr. Ted Ralphs

Convex sets and convex functions

MATH3016: OPTIMIZATION

Characterizing Improving Directions Unconstrained Optimization

. Tutorial Class V 3-10/10/2012 First Order Partial Derivatives;...

3.3 Optimizing Functions of Several Variables 3.4 Lagrange Multipliers

Instructions and information

Lecture 2: August 31

COM Optimization for Communications Summary: Convex Sets and Convex Functions

Lecture 1: Introduction

Physics 235 Chapter 6. Chapter 6 Some Methods in the Calculus of Variations

Constrained Optimization and Lagrange Multipliers

Linear methods for supervised learning

Calculus III. Math 233 Spring In-term exam April 11th. Suggested solutions

Optimization Methods. Final Examination. 1. There are 5 problems each w i t h 20 p o i n ts for a maximum of 100 points.

Lecture 2: August 29, 2018

Sparse Optimization Lecture: Proximal Operator/Algorithm and Lagrange Dual

(c) 0 (d) (a) 27 (b) (e) x 2 3x2

Department of Mathematics Oleg Burdakov of 30 October Consider the following linear programming problem (LP):

Convex Optimization MLSS 2015

A small review, Second Midterm, Calculus 3, Prof. Montero 3450: , Fall 2008

Bounded, Closed, and Compact Sets

Math 21a Homework 22 Solutions Spring, 2014

MAC2313 Test 3 A E g(x, y, z) dy dx dz

ISM206 Lecture, April 26, 2005 Optimization of Nonlinear Objectives, with Non-Linear Constraints

Local and Global Minimum

LP-Modelling. dr.ir. C.A.J. Hurkens Technische Universiteit Eindhoven. January 30, 2008

NATIONAL UNIVERSITY OF SINGAPORE MA MATHEMATICS 1. AY2013/2014 : Semester 2. Time allowed : 2 hours

Math 209 (Fall 2007) Calculus III. Solution #5. 1. Find the minimum and maximum values of the following functions f under the given constraints:

1. Suppose that the equation F (x, y, z) = 0 implicitly defines each of the three variables x, y, and z as functions of the other two:

CONSUMPTION BASICS. MICROECONOMICS Principles and Analysis Frank Cowell. July 2017 Frank Cowell: Consumption Basics 1

14.5 Directional Derivatives and the Gradient Vector

The big picture and a math review

Differentiability and Tangent Planes October 2013

Lecture 4: Convexity

1.1 What is Microeconomics?

Transcription:

Lecture 2 Optimization with equality constraints

Constrained optimization The idea of constrained optimisation is that the choice of one variable often affects the amount of another variable that can be used: - if a firm employs more labour, this may affect the amount of capital it can rent if it is restricted (constrained) by how much it can spend on inputs - when a consumer maximizes utility, income provides the constraint. - when a government sets expenditure levels, it faces constraints set by its income from taxes Note that the optimal quantities obtained under a constraint may be different from the quantities obtained without constraint 2

Binding and non-binding constraints In the solution we say that a constraint is binding if the constraint function holds with equality (sometimes called an equality constraint) Otherwise the constraint is non-binding or slack (sometimes called an inequality constraint) When the constraint is binding we can use the Lagrangean technique 3

In general cases we do not know whether a constraint will be binding. Sometime we can use our economic understanding to tell us if a constraint is binding Example: a non-satiated consumer will always spend all her income, so the budget constraint will be satisfied with equality When we are not able to say if constraints are binding we use a technique which is related to the Lagrangean, but which is slightly more general ( Kuhn-Tucker programming) 4

Objectives and constraints - example A firm chooses output x to maximize a profit function π = -x 2 + 10x - 6 Because of a staff shortage, it cannot produce an output higher than x = 4 What are the objective and constraint functions? The objective function: π = -x 2 + 10x-6 The constraint: x 4 π x 4 5

Note that without the constraint the optimum is x = 5 So the constraint is binding (but a constraint of, say, x 6 would not be) π 4 5 x 6

Sometime in the following (and in the textbook) we denote: df x, y = f dx 1 x, y df x, y = f dy 2 x, y more in general df x 1, x 2, x j x n dx j = f j x 1, x 2, x j x n 7

Constrained optimization with two variables and one constraint The problem is: max x,y s. t g x, y = c f(x, y) x, y S To get the solution we have to write the Lagrangean: L(x, y, λ) = f (x, y) λ(g(x, y) c) where λ is a new variable The candidates to the solution are the stationary points of the Lagrangean, i.e. all points that satisfy the following system of equations: f 1 x, y λg 1 x, y = 0 f 2 x, y λg 2 x, y = 0 g x, y = c 8

Intuition about Lagrangean y Using the implicit function theorem dy dx = f 1 x, y f 2 x, y = g 1 x, y g 2 x, y f 1 x, y f 2 x, y = g 1 x, y g 2 x, y f 1 x, y g 1 x, y = f 2 x, y g 2 x, y x 9

f 1 x, y g 1 x, y = f 2 x, y g 2 x, y = λ Using f 2 x,y g 2 x,y = λ we get f 1 x, y λg 1 x, y = 0 Using f 1 x,y g 1 x,y = λ we get f 2 x, y λg 2 x, y = 0 Moreover the solution has to satisfy the constraint g x, y Then the solution has to satisfy the following three equations: f 1 x, y λg 1 x, y = 0 f 2 x, y λg 2 x, y = 0 g x, y = c These equations are the derivatives of the Lagrangean L(x, y, λ) = f (x, y) λ(g(x, y) c) with respect to x, y and λ to be zero The first two equations are know as the first order conditions 10 = c

Proposition (necessary conditions) Let f and g be continuously differentiable functions of two variables defined on the set S, c be a number. Suppose that: (x, y ) is an interior point of S that solves the problem max x,y f(x, y) s. t g x, y = c x, y S either g 1 x, y 0 or g 2 (x, y ) 0. Then there is a unique number λ such that (x, y ) is a stationary point of the Lagrangean L(x, y) = f (x, y) λ(g(x, y) c) That is, (x, y ) satisfies the first-order conditions. L 1 (x, y ) = f 1 (x, y ) λg 1 (x, y ) = 0 L 2 (x, y ) = f 2 (x, y ) λg 2 (x, y ) = 0. and g(x, y ) = c. 11

Procedure for the solution 1. Find all stationary points of the Lagrangean 2. Find all points (x, y) that satisfy g 1 x, y = 0, g 2 x, y = 0 and g x, y = c 3. If the set S has boundary points, find all boundary points x, y that satisfy g x, y = c 4. The points you have found at which f x, y is largest are the maximizers of f(x, y) 12

max x,y Example 1 xa y b s. t x + y = c where a, b > 0 and x a y b is defined for x 0 y 0. 1. L x, y, λ = x a y b λ x + y c x = c a a+b y = ax a 1 y b λ = 0 bx a y b 1 λ = 0 x + y = c c b a+b λ = a+b aa b b a+b 1 ca+b 1 The value of the objective function at the stationary point is: x a y b = aa b b a+b a+b ca+b > 0 13

2. g 1 x, y = 1, g 2 x, y = 1 then no values for which g 1 x, y = 0, g 2 x, y = 0 3. The boundary points of the set on which the objective function is defined is the set of points (x, y) with either x = 0 or y = 0. At every such point the value of objective function is 0 4. Then the solution of the problem is x = 10a a+b y = 10b a+b 14

Interpretation of λ f (c) c = λ (c) the value of the Lagrange multiplier at the solution of the problem is equal to the rate of change in the maximal value of the objective function as the constraint is relaxed. 15

Example 2: max x x2 s. t. x = c solution is x = c so the maximized value of the objective function is c 2. Its derivative respect to c is 2c Now consider the Lagrangean The FOC is 2x λ = 0. L x = x 2 λ(x c) Then x = c and λ = 2c satisfy FOC and the constraint. Note that λ is equal to the derivative of the maximized value of the function with respect to c 16

From example 1: x = c a a+b y = c b a+b λ = aa b b a+b a+b 1 ca+b 1 the maximized value of the objective function is: x a y b = a a b b a + b a+b ca+b its derivative respect to c is a a b b a+b a+b 1 ca+b 1, i.e. λ 17

Conditions under which a stationary point is a local optimum max x,y f(x, y) s. t g x, y = c L x, y = f x, y λ(g x, y c) Borderd Hessian of the Lagrangean H b x, y, λ = = 0 g 1 (x, y) g 2 (x, y) g 1 (x, y) f 11 x, y λg 11 (x, y) f 12 x, y λg 12 (x, y) g 2 (x, y) f 21 x, y λg 21 (x, y) f 22 x, y λg 22 (x, y) 18

Suppose that it exists a value λ such that x, y stationary point of the Lagrangean. is a To check if it is a local maximum 1) Compute the bordered Hessian at the values x, y, λ, i.e. H b x, y, λ 2) Compute its determinant, i.e H b x, y, λ 3) If H b x, y, λ > 0 then x, y is a local maximizer Note, if H b x, y, λ < 0 then x, y is a local minimizer 19

Example 3 max x,y x3 y subject to x + y = 6 x, y > 0 We simplify the problem using a log transformation max x,y 3 ln x + ln y subject to x + y = 6. L x, y = 3 ln x + ln y λ(x + y 6) FOC are: 3 x λ = 0, 1 y λ = 0 x + y = 6 The solution is x = 4.5, y = 1.5, λ = 2 3 20

Borderd Hessian of the Lagrangean is H b x, y, λ = 0 1 1 1 3 x 2 0 1 0 1 y 2 H b 4.5, 1.5, 2 3 = 0 1 1 1 3 4.5 2 0 1 0 1 1.5 2 The determinant is 3 maximizer + 1 4.5 2 1.5 2 > 0, then the solution is a local 21

Conditions under which a stationary point is a global optimum Suppose that f and g are continuously differentiable functions defined on an open convex subset S of twodimensional space and suppose that there exists a number λ* such that (x*, y*) is an interior point of S that is a stationary point of the Lagrangean L(x, y) = f(x, y) λ (g x, y c). Suppose further that g x, y = c. Then if L is concave then (x*, y*) solves the problem max x,y f(x, y) s. t g x, y = c 22

Example 4 Consider example 3 max x,y x3 y subject to x + y = 6 x, y > 0 We found that the solution of the FOC x = 4.5, y = 1.5, λ = 2 3 is a local maximizer. Is it a global maximizer? For a global maximizer we need that Lagrangean is concave L x, y = 3 ln x + ln y λ(x + y 6) Given that constraint is linear we need to check the objective function The Hessian of the objective function is H = 3 x 2 0 0 1 y 2 23

H = 3 x 2 0 0 1 y 2 The leading principal minors are: D 1 = 3 < 0 and D x 2 2 = 3 1 x 2 2 > 0 for all x, y > 0 y Then the Hessian is negative definite, so the objective function is strictly concave, and the point x = 4.5, y = 1.5 is a global maximum. 24

Optimization with equality constraints: n variables, m constraints: necessary conditions Let f and g 1,, g m be continuously differentiable functions of n variables defined on the set S, let c j for j = 1,, m be numbers, and suppose that x is an interior point of S that solves the problem: max x f(x) subject to g j (x) = c j for j = 1,, m Suppose also that the rank of the Jacobian matrix is m J = g 1 g 1 x 1 x n g m g m x 1 x n 25

Then there are unique numbers λ 1,, λ m such that x stationary point of the Lagrangean function L defined by is a m L(x) = f(x) λ j g j x c j j=1 That is, x satisfies the first-order conditions: L i x = f i x m j=1 λ j g j x i x = 0 for i = 1,, n. In addition, g j (x ) = c j for j = 1,, m. 26

Conditions under which necessary conditions are sufficient Suppose that f and g j for j = 1,, m are continuously differentiable functions defined on an open convex subset S of n-dimensional space and let x S be an interior stationary point of the Lagrangean: L(x) = f(x) m j=1 λ j g j x c j suppose further that g j (x ) = c j for j = 1,, m. Then if L is concave then x solves the constrained maximization problem 27

Interpretation of λ Consider the problem max x f(x) subject to g j (x) = c j for j = 1,, m Let x (c) be the solution of this problem, where c = (c 1,, c m ) and let f (c) = f(x (c)). Then we have f (c) c j = λ j (c) for j = 1,, m, where λ j is the value of the Lagrange multiplier on the jth constraint at the solution of the problem. 28

Interpretation of λ The value of the Lagrange multiplier on the jth constraint at the solution of the problem is equal to the rate of change in the maximal value of the objective function as the jth constraint is relaxed. If the jth constraint arises because of a limit on the amount of some resource, then we refer to λ j (c) as the shadow price of the jth resource. 29

Quasi-concave functions Let f(x) be defined on the set S. Then for all pairs x, x S x, x and for all λ 0, 1 : - If f x = f λx + 1 λ x min f x, f x then f(x) is quasi concave - If f x = f λx + 1 λ x > min(f(x), f(x ) ) then f(x) is strictly quasi concave Note these conditions hold even if f(x) = f(x ) A concave function is also quasi-concave, but the opposite is not true If f(x) > f(x ) and f(λx + (1 λ)x ) > f(x ) the function is explicitly quasi concave 30

It is quasiconvex if: f(x ) = f(λx + (1 λ)x ) max(f(x), f(x ) ) Note that a convex function is also quasi-convex The bottom left picture shows that the opposite is not true y y y 31

The importance of concavity and quasi-concavity Consider the problem max f(x) subject to g j(x) = c j for j = 1,, m x and let x be a stationary point of the lagrangean If 1. f(x) is explicitly quasi-concave 2. The constrained set is convex 3. then x is a global maximum If 1. f(x) is strictly quasi-concave 2. The constrained set is convex 3. then x is the unique global maximum 32

Convex sets. A convex set, X, is such that for any two elements of the set, x and x any convex combination of them is also a member of the set. x x' More formally, X is convex if for all x and x X, and 0 λ 1, x = λx + 1 λ x X. Sometimes X is described as strictly convex if for any 0 < λ < 1, x is in the interior of X (i.e. not on the edges) e.g. convex but not strictly convex 33

Convex sets. If, for any two points in the set S, the line segment connecting these two points lie entirely in S, then S is a convex set. U x 2 p 1 x 1 +p 2 x 2 m x 2 U(x) U x 1 34x 1

Non-Convex sets. x 2 U U(x) U x 1 35

A different definition of quasi concavity Let f be a multivariate function defined on the set S. f is quasi concave if, for any number a, the set of points for which f(x) a is convex. For any real number a, the set P a = {x S: f (x) a} is called the upper level set of f for a. The multivariate function f defined on a convex set S quasiconcave if every upper level set of f is convex. is That is, P a = {x S: f (x) a} is convex for every value of a. 36

Example 5 1. f (x, y) = x 2 + y 2. The upper level set of f for a is the set of pairs (x, y) such that x 2 + y 2 a. Thus for a > 0 it the set of point out of a disk of radius a, then the upper level set is not convex 2. f (x, y) = x 2 y 2. The upper level set of f for a is the set of pairs (x, y) such that x 2 y 2 a, or x 2 + y 2 a. Thus for a > 0 the upper level set P a is empty for a < 0 it is the set of points inside a disk of radius a. 37

Checking quasi concavity To determine whether a twice-differentiable function is quasi concave or quasi convex, we can examine the determinants of the bordered Hessians of the function, defined as follows: B = 0 f 1 x f 2 x f n x f 1 x f 11 x f 12 x f 1n x f 2 x f 21 x f 22 x f 2n x f n x f n1 x f n2 x f nn x We have to compute the determinants of the leading principal minors B 1 = 0 f 1 x f 1 x f 11 x, B 2 = 0 f 1 x f 2 x f 1 x f 11 x f 12 x f 2 x f 21 x f 22 x, 38

If f is quasi concave then B x 0 if x is even and B x 0 if x is odd If then B x > 0 if x is even and B x < 0 if x is odd then f is strictly quasi concave If f is quasi convex then B x 0 are negative If B x < 0 then f is strictly quasi convex for all x in the set where function f is defined 39

Envelope theorem: unconstrained problem Let f(x, r) be a continuously differentiable function where x is an n-vector of variables and r is a k-vector of parameters. The maximal value of the function is given by f(x (r), r) where x (r), is the vector of variables x that maximize f and that are function of r. Note that we can write f(x (r), r) as f (r) (because in this function only parameters appear) 40

If the solution of the maximization problem is a continuously differentiable function of r then: df r df x, r = evaluated in x (r), dr i dr i the change in the maximal value of the function as a parameter changes is the change caused by the direct impact of the parameter on the function, holding the value of x fixed at its optimal value; the indirect effect, resulting from the change in the optimal value of x caused by a change in the parameter, is zero 41

Example 6 FOC is p x c = 0 max p ln x cx then x = p c and f p, c = p ln p c p The effect of a change of parameter c on the maximized value is: df p, c = p dc c Consider the derivative of the objective function evaluated at the solution x dp ln x cx = x dc Evaluating it in x = p c we get p c 42

Envelope theorem: constrained problems Let f(x, r) be a continuously differentiable function where x is an n-vector of variables and r is a k-vector of parameters. The maximal value of the function is given by f(x (r), r) where x (r), is the vector of variables x that maximize f and that are function of r. Note that we can write f(x (r)), as f (r), Then df (r) dr i = dl (x, r) dr i evaluated at the solution x (r), where the function L is the Lagrangean of the problem 43

Example 7 max x,y we solve: y λ = 0 xy s. t x + y = B L x, y, λ = xy λ x + y B x λ = 0 x + y = B then x = y = λ = B and 2 f B = B2 4 The effect of a change of parameter c on the maximized value is: df B db = B 2 Consider the derivative of the Lagrangean evaluated at the solution x d xy λ x + y B = B db 2 44