Optimisation¶

Outline¶

Part 1:

• Equality constraints
• Lagrangian
• Interpreting the Lagrange multiplier
• Intuition
• Comparative statics and the Envelope Theorem

Part 2:

• Inequality constraints
• Kuhn-Tucker method
• Intuition of complementary slackness
• Non-negativity constraints

Optimisation Part 1: Equality constraints¶

$f(x) = x^2 + 6x - 20$

What is $f'(x)$ ?

What is $f''(x)$ ?

In [17]:
graph('x**2 + 6*x - 20', -20, 20)

In [18]:
graph('2*x + 6', -20, 20)


Multivariable functions¶

$z = f(x,y)$

(Local) Maximum: \begin{align*} f_x, \ f_y &= 0 \\ f_{xx}, \ f_{yy} &< 0 \\ f_{xx}, \ f_{yy} &> (f_{xy})^2 \\ \end{align*}

(Local) Minimum: \begin{align*} f_x, \ f_y &= 0 \\ f_{xx}, \ f_{yy} &> 0 \\ f_{xx}, \ f_{yy} &> (f_{xy})^2 \\ \end{align*}

Exercise¶

🐑 Find the critical points and test whether the function is at a relative maximum or minimum, given:

\begin{align*} z = 2y^3 - x^3 + 147x - 54y + 12 \end{align*}

Need more details on finding the maximum or minimum of a function?

What if the function has more than one variable?

See page 86 of Dowling.

Equality constraints¶

Lagrangian¶

Maximise $f(x,y)$ subject to $g(x,y) = k$.

We use the Lagrangian function:

$$L(x,y,\lambda) = f(x,y) - \lambda[g(x,y)-c]$$

Two forms $+$ or $-$. Which do you use? How do you remember?

Step 1: Write down $L$

Step 2: Differentiate $L$ with respect to $x$ and $y$, and equate to $0$.

Step 3: These two equations and the constraint give you three equations.

$$L_x = f_x - \lambda g_x = 0 \\ L_y = f_y - \lambda g_y = 0 \\ g(x,y) = c$$

Solve these three equations for the three unknowns $x$, $y$, and $\lambda$.

Exercises¶

Sydsæter, Hammond, and Strøm Page 498-502 Example 1-4

Sydsæter, Hammond, and Strøm Page 507 Example 1 for multiple solutions.

Intepreting the Lagrange Multiplier¶

$x^*$ and $y^*$ are the optimal solutions.

If we change the constraint, $c$, these optimal solutions will change: $$x^* = x^*(c) \\ y^* = y^*(c)$$ Plug these back into the objective function and we get the value function: $$f^*(c) = f(x^*(c),y^*(c))$$ and if we differentiate the value function with respect to $c$, we find: $$\dfrac{d f^*(c)}{dc} = \lambda(c) = \lambdaˆ*$$

Refer to page 504 of Sydsæter, Hammond, and Strøm for the proof.

Intuition¶

Watch this Khan Academy video on constrained optimisation.

Page 509-511 in Sydsæter, Hammond, and Strøm have a geometric and analytic explanation.

Comparative statics and the Envelope Theorem¶

Start with unconstrained optimisation problem of maximise $U = f(x,y,\phi)$.

Plug the solutions back into the objective function to find a maximum value function (indirect objective function).

Take the derivative of the value function with respect to an exogenous parameter.

What do you find?

Best explanation is for unconstrained optimisation by Chiang and Wainwright on Page 428.

Exercises¶

13.30, 13.31, 13.32 of Dowling

Homework¶

🐑 SHS Page 502, Exercises 1-10

Inequality Constraints¶

Kuhn-Tucker method¶

Problem to maximise $f(x,y)$ subject to $g(x,y) \leq c$.

Step 1: Define the Lagrangian $$L(x,y) = f(x,y) - \lambda (g(x,y)-c)$$

Step 2: Equate the partial derivatives to zero: $$L_x = f_x - \lambda g_x = 0\\ L_y = f_y - \lambda g_y = 0$$

Step 3: Introduce the complementary slackness condition. $$\lambda \geq 0 \\ \lambda \cdot [g(x,y)-c] = 0$$ Step 4: The solution must satisfy the constraint. $$g(x,y) \leq c$$

Motivation for complementary slackness¶

Work through Chiang and Wainwright Page 404 Step 2

Non-negativivity constraints¶

We could treat non-negativity constraints as normal and introduce additional Lagrange multipliers.

Working from Sydsæter, Hammond, and Strøm Page 538, let's try this out on the board.

How could we simplify the first order conditions? (Hint: By removing the additional Lagrange multipliers.)

Show the graphical intuition Chiang and Wainwright Page 403, Figure 13.1.

First order conditions: $$L_x = f_x - \lambda g_x \leq 0 \\ x \cdot L_x = 0 \\$$ $$L_y = f_y - \lambda g_y \leq 0 \\ y \cdot L_y = 0 \\$$ Complementary slackness: $$\lambda \geq 0 \\ \lambda \cdot [g(x,y)-c] = 0 \\$$ Constraints: $$g(x,y) \leq c \\ x \geq 0 \\ y \geq 0$$

Exercises¶

Sydsæter, Hammond, and Strøm Page 538-539 Example 1.

Homework¶

🐑 SHS Page 531, Section 14.8, Exercise 1

🐑 SHS Page 532, Section 14.8, Exercise 3

🐑 SHS Page 536, Section 14.9, Exercise 1

🐑 SHS Page 541, Section 14.10, Exercise 1