You are on page 1of 47

Advanced Mathematics for Economics

(4SSMN903)
Lecture 1

Eddy Tam

King’s Business School, King’s College London

January 9, 2022
Optimization

I Optimization: finding the value(s) of independent variable(s)


for which the objective function obtains maximum or
minimum value
I e.g. Firm profit depends on production, and production
depends on factor inputs (labor and capital)
I We find the level of labor and capital to put into use in
production to maximise profit
I e.g. Consumer chooses the amount of goods to purchase and
consume to maximize utility, subject to budget constraint
Optimization

I We find the level of x that maximises or minimises a function


f (x ).
I For y = f (x ), we find x ∗ in which y is greatest or smallest
I General form:
max f (x ) or min f (x )
x x
I x ∗ : maximum/minimum point (also called extreme point).
f (x ∗ ): maximum/minimum value (also called extreme value)
I The choice variable(s) x can be a single variable, or it could
be more than one variables (x1 , ..., xn )
Optimization
e.g. Find the maximum value of f (x ) = −x 2

x ∗ = 0 is the maximum point.


f (x ∗ ) = f (0) = 0 is the maximum value.
Optimization with or without constraint

I Domain is the space over which the independent variable(s) is


defined or relevant for the function/problem.
I Unconstrained and constrained optimization: difference in the
domain.
I Unconstrained optimization
I Optimization without constraint
I Function of one variable: choose x to from the entire real line
I e.g. Find maximum of f (x ) = −x 2 for any value of x
I Constrained optimization
I Optimization with constraint(s)
I Function of one variable: choose x from a closed domain.
I e.g. Find maximum of f (x ) = −x 2 for −3 ≤ x ≤ −1
I Difference in domain could lead to different maximum (and
minimum) point and value.
Constrained Optimization
e.g. Find the maximum value of f (x ) = −x 2 for −3 ≤ x ≤ −1

x ∗ = −1 is the maximum point.


f (x ∗ ) = −(−1)2 = −1 is the maximum value.
Global and local maximum

Let f (x ) be a function of one variable


Definition
(Global maximum) A point x ∗ is global maximum if f (x ∗ ) ≥ f (x )
for any x in the domain

Definition
(Local maximum) A point x ∗ is local maximum if for some  > 0,
x ∗ −  < x < x ∗ +  (with x in the domain), f (x ∗ ) ≥ f (x )
I It is a strict global maximum if strict inequality holds (i.e.
f (x ∗ ) > f (x ) for any x in the domain); similarly for local
maximum.
Global and Local Maximum

x ∗ is a local maximum if there is some  such that f (x ∗ ) ≥ f (x )


for all x in x ∗ −  < x < x ∗ + 
Global and Local Maximum
e.g. Find the global and local maximum of f (x ) = x 3 + x 2 − x + 1
for −2 ≤ x ≤ 2

x = 2 is global and local maximum; x = −1 is local maximum.


Global and local minimum

Let f (x ) be a function of one variable


Definition
(Global minimum) A point x ∗ is global minimum if f (x ∗ ) ≤ f (x )
for any x in the domain

Definition
(Local minimum) A point x ∗ is local minimum if for some  > 0,
x ∗ −  < x < x ∗ +  (with x in the domain), f (x ∗ ) ≤ f (x )
Existence of maximizer

Theorem
(Existence of maximizer)
Continuous function in a closed and bounded domain has a
maximum (and minimum).
I Closed domain (single variable) - the set include the end
points of interval. (e.g. −2 ≤ x ≤ 2, as opposed to
−2 < x < 2)
I Bounded domain (single variable) - there is an upper bound
and lower bound. (e.g. −2 ≤ x < ∞ is not a bounded
domain)
I e.g. There is a maximum for y = x 2 for −2 ≤ x ≤ 2. Is there
a maximum for y = x 2 if x takes any value from
−∞ < x < ∞?
Existence of maximizer
e.g. Is there a maximum for the function y = x 2 for −2 ≤ x ≤ 2?
What about if x takes any value from −∞ < x < ∞?

x ∗ = 2 or x ∗ = −2 are the maximum points for −2 ≤ x ≤ 2.


There is no local or global maximum if the domain is for any x on
the real line.
Existence of maximizer
e.g. f (x ) = −ln(x ) for 0 ≤ x ≤ 2, f (0) = 0

There is no maximum for f (x ) for 0 ≤ x ≤ 2. The theorem does


not apply as the function is not continuous at x = 0.
Examples of optimization in economics
1. Modelling a consumer’s consumption choice =⇒ maximising
utility subject to budget constraint
I We assume a utility function U(x ) = ln(x + 1) that depends
on a single good x , p is price of good and x is the quantity
consumed; m is income available.
I maxx U(x ) = ln(x + 1) s.t. 0 ≤ px ≤ m
I As domain is closed and bounded, there is a quantity x that
maximises utility and solving the problem.
2. Modelling a firm’s behaviour =⇒ maximising profit with
respect to a production function
I We assume a production function q = F (L) = aL with labor
input L, price of output is p, quantity produced is q, wage rate
is w . a > 0.
I maxq,L π = pq − wL for q = aL, or
I maxL π = paL − wL for 0 ≤ L < ∞
I As the domain is not bounded, there need not be a solution to
the problem. (e.g. when pa − w > 0)
Necessary condition for local extreme point

Theorem
(Necessary condition for local extreme point) If an interior point x ∗
is a local maximum or minimum point for a differentiable function
f (x ), then its first order derivative f 0 (x ) is zero at x ∗ , i.e.

f 0 (x ∗ ) = 0

I It is called the first-order condition (FOC)


I x ∗ is an interior point if it is not at the boundary. (e.g. for
−2 ≤ x ≤ 2, x is an interior point if x 6= −2 or x 6= 2)
First order condition
For f (x ) = −x 2 , f 0 (x ) = −2x

We set f 0 (x ∗ ) = −2x ∗ = 0 =⇒ x ∗ = 0.
The first order condition suggest that if there is an interior point
that is a local maximum or minimum, it would be x ∗ = 0.
First order condition
For y = f (x ) = x 2 , f 0 (x ) = 2x

We set f 0 (x ) = 2x = 0 =⇒ x = 0.
The first order condition suggest that if there is an interior point
that is a local maximum or minimum, it would be x ∗ = 0.
Example

I Find the local extreme values of f (x ) = 2x 3 − 0.5x 2 + 2


1. First order derivative: f 0 (x ) = 6x 2 − x
2. (First order condition). Find the points of x such that
f 0 (x ) = 0
I 6x 2 − x = 0 =⇒ x (6x − 1) = 0
I x = 0 or x = 16
1
3. x = 0 or x = 6 are candidates of local maximum or local
minimum.
Example


I We assume a production function q = F (L) = L with labor
input L, price of output is p, quantity produced is q, wage
rate is w .

I maxL π(L) = p L − wL for 0 ≤ L < ∞
1. First order condition is
∂π 1 1
= p L− 2 − w = 0
∂L 2
p 2
=⇒ L∗ = ( )
2w
p 2
2. It implies L∗ = ( 2w ) that satisfy the first order condition is
candidate of local maximum or local minimum.
Is the first order condition sufficient?

I If a point is an extreme point, the first order derivative takes


value zero at this point.
I However, if a point has a zero first order derivative, this does
not necessarily mean it is an extreme point.

Definition
For a function f (x ), a point x ∗ at which the derivative is equal to
zero, i.e. f 0 (x ∗ ) = 0, is called stationary point.
I Stationary point may be an extreme point or point of
inflection
Stationary point

x = 0 is a stationary point and a point of inflection (f 00 (x ) = 0 and


f 00 (x ) changes sign).
How to know if a point is an extreme point or point of
inflection?

Theorem
For function f (x ) that is twice differentiable,
I If f 0 (x ∗ ) = 0 and f 00 (x ∗ ) < 0, x ∗ is a local maximum point
I If f 0 (x ∗ ) = 0 and f 00 (x ∗ ) > 0, x ∗ is a local minimum point

If f 0 (x ∗ ) = 0 and f 00 (x ∗ ) = 0, we need more information to infer if


x ∗ is either minimum, or maximum or a point of inflection.
Example
4
Find the local extreme values of f (x ) = − x4 − x 3 − x 2 + 10
1. Find the stationary points
I f 0 (x ∗ ) = 0
I f 0 (x ∗ ) = −x 3 − 3x 2 − 2x = 0
I =⇒ x (−x 2 − 3x − 2) = 0
Stationary points are x1∗ = 0, x2∗ = −1, x3∗ = −2.
2. Calculate the second order derivative
f 00 (x ) = −3x 2 − 6x − 2
3. At each stationary point, evaluate the value of the second
order derivative. In other words, plug each x ∗ into f 00 (x ).
I f 00 (0) = −2, f 00 (−1) = 5, f 00 (−2) = −2
4. Check if the sufficient conditions determine whether any of
the stationary points is local maximum or minimum
I x = 0, x = −2 are all local maximum, x = −1 is local
minimum.
Example

I We assume a production function q = F (L) = L with labor
input L, price of output is p, quantity produced is q, wage
rate is w . p, w > 0.

I maxL π(L) = p L − wL for 0 ≤ L < ∞
1. First order condition is
∂π 1 1
= p L− 2 − w = 0
∂L 2
p 2
=⇒ L∗ = ( )
2w
p 2
2. It implies L∗ = ( 2w ) that satisfy the first order condition is
candidate of local maximum or local minimum.
3.
∂ 2 π(L∗ ) 1 3 p p −3
= p(− )L− 2 = (− )( ) <0
∂L2 4 4 2w
p 2
4. The second order condition implies that L∗ = ( 2w ) is a local
maximum.
Concavity

Definition
Let x and y be two points on the domain. A function f (x ) is
concave if for all x , y in the domain, with t in [0,1].

f (tx + (1 − t)y ) ≥ tf (x ) + (1 − t)f (y )

It is strictly concave if

f (tx + (1 − t)y ) > tf (x ) + (1 − t)f (y )

for x 6= y and t in between 0 and 1.


Concavity

A function is strictly concave if


f (tx + (1 − t)y ) > tf (x ) + (1 − t)f (y ) for all x and y in the
domain, and for all t in between 0 and 1.
Convexity

Definition
Let x and y be two points on the domain. A function f (x ) is
convex if for all x , y in the domain, with t in [0,1].

f (tx + (1 − t)y ) ≤ tf (x ) + (1 − t)f (y )

It is strictly convex if

f (tx + (1 − t)y ) < tf (x ) + (1 − t)f (y )

for x 6= y and t in between 0 and 1.


Convex function

A function is strictly convex if


f (tx + (1 − t)y ) < tf (x ) + (1 − t)f (y ) for all x and y in the
domain, and for all t between 0 and 1.
Optimization of a concave function

I A function is concave on an interval if f 00 (x ) ≤ 0 for all x in


the domain
I A function is convex on an interval if f 00 (x ) ≥ 0 for all x in
the domain

Theorem
If f (x ) is a concave function defined on an interval, and if x ∗ is an
interior point and f 0 (x ∗ ) = 0, x ∗ is a maximum point for f

Theorem
If f (x ) be a convex function defined on an interval, and if x ∗ is an
interior point and f 0 (x ∗ ) = 0, x ∗ is a minimum point for f
I If the objective function is concave, the interior point that
satisfies the first order conditions is a global (and local)
maximum point.
Concave and convex functions in economics

e.g. Consider a consumer who consume a single good x with utility


function U(x ) = ln(x ) for x > 0
I U 0 (x ) = x1 , U 00 (x ) = − x12 < 0
I Since U 00 (x ) = − x12 < 0 for all x > 0, the utility function is
strictly concave.
e.g. Consider a cost function C (q) = F + cq, where q > 0 is the
quantity produced, F > 0 is a fixed cost and c > 0 is the marginal
cost of production. The average cost is AC (q) = C (q) F
q = q + c.
I AC 0 (q) = − qF2 , AC 00 (q) = 2F
q3
> 0 for q > 0
I As AC 00 (q)
> 0 for all q in the domain, the average cost
function is strictly convex.
Optimization of concave or convex function in economics

e.g. Consider a cost function C (q) = F + c1 q + c2 q 2 , where q > 0


is the quantity produced, F > 0 is the fixed cost, c1 , c2 > 0. Find
the quantity of production that minimise the average cost.
C (q) F
1. The average cost is AC (q) = q = q + c1 + c2 q
2. Find the stationary point, AC 0 (q) = −F
q2
+ c2 = 0, that gives
q
q∗ = F
c2

3. AC 00 (q) = 2F
q3
> 0 for q > 0
4. As AC 00 (q)
> 0 for all q in the domain, the average
q cost
∗ F
function is strictly convex. This implies q = c2 is a
minimum for the average cost function.
Implication of concave function in economics - example
1. Suppose a consumer with utility function U(x ) = ln(x ) face a
lottery that gives 2 unit of goods with probability 12 , and 8
unit of goods with probability 21 . The consumer need to
choose between the lottery, or getting 5 unit of goods for
certain.
I The lottery gives expected amount of 21 2 + 12 8 = 5
I If assume further that consumer make decision based on
expected utility, i.e. the lottery gives the consumer utility
1 1
2 ln(2) + 2 ln(5)
I Since we know the function ln(x ) is concave, this means

1 1
ln(5) ≥ ln(2) + ln(5)
2 2
I The consumer prefer having 5 for certain than choosing the
lottery.
I As ln(x ) is concave, the consumer prefer having for certain the
expected value of any lottery than the lottery itself. We
consider the consumer as risk-averse.
Implication of convex function in economics - example
1. Consider a firm face a cost function C (q) = q 2
I The first derivative is ∂C
∂q = 2q.
I It is the marginal cost of production - the cost for producing
an additional unit at the margin.
I As production increase, how does the marginal cost change?
I
∂MC ∂2C
= =2>0
∂q ∂q 2
I The marginal cost is increasing with quantity produced - the
more is the production, the more expensive to produce the
additional amount.
I It could be because one/some of the input is fixed, it become
more expensive to scale up production (e.g. with a manager, it
need 2 workers to produce a good, when a manager is
occupied, it need 4 workers to produce an additional good).
I As C 00 (q) > 0, the (strict) convexity in cost function also
implies increasing marginal cost.
Maximization under a specific domain - Applications in
economics

I In economic analysis, sometimes we do not care about


negative quantities.
I Consumption decision: e.g. we cannot consume negative
amount of goods
I Sometimes we have to impose limits
I Production decision: e.g. revenue would need to cover a high
fixed cost before a firm could operate to sell a good.
I Policy variable has limits by nature
I Policy decision: Government seek to impose a tax rate to
finance expenditures - a tax rate has to be between 0 and 1.
Conditions for maximization under a specific domain
Theorem
Let the differentiable function f (x ) be defined over the interval
a ≤ x ≤ b. If x ∗ is a maximum for f (x ) over a ≤ x ≤ b, at least
one of the following conditions would hold
1. f 0 (x ∗ ) ≤ 0 and (x ∗ − a)f 0 (x ∗ ) = 0
2. f 0 (x ∗ ) ≥ 0 and (b − x ∗ )f 0 (x ∗ ) = 0

This means if x ∗ is a maximum, and


I If a < x ∗ < b (i.e. x ∗ is an interior point), then f 0 (x ∗ ) = 0.
(both 1. and 2. are true) This is an interior solution.
I If x ∗ = a, f 0 (x ∗ ) is non-positive at a the lower bound. (if 1. is
true, f 0 (a) ≤ 0; if 2. is true, f 0 (a) = 0). This is a corner
solution.
I If x ∗ = b, f 0 (x ∗ ) is non-negative at b the upper bound. (if 1.
is true, f 0 (b) = 0; if 2. is true, f 0 (b) ≥ 0) This is a corner
solution.
Corner solution - example
Find the extreme points of y = x 2 for −2 ≤ x ≤ 1

I At x ∗ = −2 (the lower bound), f 0 (x ∗ ) = f 0 (−2) < 0,


x ∗ = −2 is a candidate of maximum.
I At x ∗ = 1 (the upper bound), f 0 (x ∗ ) = f 0 (1) > 0, x ∗ = 1 is a
candidate of maximum.
I x ∗ = 0 is an interior local minimum, as f 0 (0) = 0 and
f 00 (0) = 2 > 0. It is a candidate of minimum.
Conditions for minimization under a specific domain

Theorem
Let the differentiable function f (x ) be defined over the interval
a ≤ x ≤ b. If x ∗ is a minimum for f (x ) over a ≤ x ≤ b, at least
one of the following conditions would hold
1. f 0 (x ∗ ) ≥ 0 and (x ∗ − a)f 0 (x ∗ ) = 0
2. f 0 (x ∗ ) ≤ 0 and (b − x ∗ )f 0 (x ∗ ) = 0

This means if x ∗ is a minimum


I If a < x ∗ < b (i.e. x ∗ is an interior point), then f 0 (x ∗ ) = 0.
I If x ∗ = a, f 0 (x ∗ ) is non-negative at a the lower bound.
I If x ∗ = b, f 0 (x ∗ ) is non-positive at b the upper bound.
Corner solution - example 2
y = −x 2 for −2 ≤ x ≤ 1

I At x ∗ = −2 (the lower bound), f 0 (x ∗ ) = f 0 (−2) > 0,


x ∗ = −2 is a candidate of minimum.
I At x ∗ = 1 (the upper bound), f 0 (x ∗ ) = f 0 (1) < 0, x ∗ = 1 is a
candidate of minimum.
Constrained optimization: One variable

To find the maximum (or minimum) point(s) of a function f on an


closed and bounded interval a ≤ x ≤ b
1. Find all the stationary points of f in a < x < b, i.e. the
interior points that satisfied the first order condition f 0 (x ) = 0
2. Check the second order condition at the stationary points to
determine if it is a local maximum (or minimum)
3. Evaluate the value of function f at the end point a and b (or
for those that is a candidate for maximum or minimum)
4. Compare the values of function f at the stationary point that
are local maximum, with the values of f at the end point a
and b to find the global maximum. (similar for minimum)
Constrained optimization: One variable - Example
Find the extreme values of f (x ) = x 2 for −1 ≤ x ≤ 2.
1. Find the first order derivative: f 0 (x ) = 2x
2. Search for an interior solution by finding the stationary point
and evaluate the second order derivative
I f 0 (x ∗ ) = 0 =⇒ 2x ∗ = 0 =⇒ x ∗ = 0
I f 00 (x ) = 2, thus, f 00 (0) = 2 > 0. Thus, x = 0 is an interior
minimum.
3. Find the potential corner solution
I Evaluate the first order derivative at the lower and upper
bound of the constraint (a = −1 and b = 2)
I f 0 (−1) = −2 < 0. As the derivative of f at the lower bound is
negative, x = −1 is a candidate of maximum.
I f 0 (2) = 4 > 0. As the derivative of f at the upper bound is
positive, x = 2 is a candidate of maximum.
4. f (0) = 0, f (−1) = 1, f (2) = 4. Therefore, x = 2 is global
maximum, x = 0 is global minimum.
Constrained optimization: One variable - Example
Application 1 - Profit maximization
I A firm with a profit function π(q) = 2q 3 − 0.5q 2 + 2
maximizes its profit. It has to produce at least 0.1 units of q
to cover a fixed cost. It can produce up to 0.2 units due to
environmental regulation. Find the quantities that maximize
the profit.
1. The problem is

max π(q) = 2q 3 − 0.5q 2 + 2


q

s.t. 0.1 ≤ q ≤ 2
2. Calculate the first order derivative: f 0 (q) = 6q 2 − q
3. Search for an interior solution by finding the stationary
point(s)
I Set first order derivative to zero:
6q 2 − q = 0 =⇒ q(6q − 1) = 0
I q = 0 or q = 61 (rule out q = 0 as it is not in the domain)
Profit maximization

4. Evaluate the second order derivative at the stationary point


I f 00 (q) = 12q − 1, f 00 ( 16 ) = 1 > 0
I Thus, 1/6 is a local minimum.
5. Find the potential corner solution(s)
I Evaluate the first order derivative at the lower and upper
bound (The lower bound is a = −1 and the upper bound is
b = 2).
I As f 0 (0.1) = −0.04 < 0, x = 0.1 is a candidate of maximum.
I As f 0 (2) = 22 > 0, x = 2 is a candidate of maximum.
6. As we have two candidates for global maximum, we compare
the value at the objective function
I f (0.1) ≈ 2
I f (2) = 16
I Therefore q = 2 is the quantity the maximize profit (global
maximum).
Application 2 - Cost minimization
I A firm uses labour L for production, and seeks to minimize
the cost. The cost function is C (l) = 10l. Labour has to be
non-negative (l ≥ 0) and no greater than 100 (l ≤ 100). Find
the quantity of labour that minimizes the cost.
1. The problem is min C (l) = 10l s.t. 0 ≤ l ≤ 100
2. The first order derivative: C 0 (l) = 10.
3. Search for an interior solution by finding the stationary point.
As C 0 (l) = 10 > 0 for any l, there is no interior stationary
point/solution.
4. Find the potential corner solution(s)
I At l = 0 (the lower bound), C 0 (0) = 10 > 0, l = 0 is a
candidate of minimum.
I At l = 100 (the upper bound), C 0 (100) = 10 > 0, l = 100 is
not a candidate of minimum.
5. As C (0) = 0, the quantity that minimize cost is q = 0.
Application 3 - Utility maximisation
I Consider a consumer with utility function U(x ) = ln(x + 1).
Utility depends on a single good, with price p. Consumer has
income m.
1. The problem is maxx U(x ) = ln(x + 1) s.t. 0 ≤ px ≤ m, or
0≤x ≤ m p
2. Calculate the first order derivative: U 0 (x ) = x +1
1
> 0 for all x ,
there is no interior stationary point that satisfy U 0 (x ) = 0.
(Consuming more always increase utility)
3. Find the potential corner solutions
I Evaluate the first order derivative at the lower and upper
bound
I As U 0 (0) = 1 > 0, the lower bound x = 0 is candidate of
minimum.
I As U 0 ( mp ) = m 1+1 > 0, the upper bound is candidate of
p
maximum.
4. x = mp is maximum - consumer spend all income when
consuming more is preferred.
Application 4 - Utility maximisation
I Consider a consumer who has utility function that depends on
a single good x and unspent money y . Price of good is p,
income is m. The utility function is U(x , y ) = ln(x + 1) + y ,
with px + y = m.
1. The problem: maxx ,y U(x , y ) = ln(x + 1) + y s.t. px + y = m,
y ≥ 0, x ≥ 0.
2. Substituting px + y = m into U(x , y ) gives

max Ũ(x ) = ln(x + 1) + m − px


x

for 0 ≤ x ≤ mp
3. First order condition is
∂ Ũ 1
= −p =0
∂x x +1
1
=⇒ =p
x +1
4. It suggest the marginal utility ∂U(x
∂x
,y )
= 1
x +1 from x equals the
price the consumer has to pay for x
Application 4 - Utility maximisation

5. It implies x ∗ = p1 − 1 that satisfy the first order condition is


candidate of local maximum or local minimum if x ∗ = p1 − 1
is in the domain.
∂ 2 Ũ(x ∗ ) 1
6. ∂x 2
= − (x +1)2 < 0, the second order condition implies

that x ∗ = 1
p − 1 is a local maximum.
7. x∗ 1
= − 1 is in the domain if 0 ≤
p
1
p −1≤ m
p, or when p ≤ 1
and 1 ≤ m + p
8. The derivative of the objective function Ũ 0 (x ) at the two end
points are Ũ 0 (0) = 1 − p and Ũ 0 ( m 1
p ) = p( m+p − 1)
9. If p > 1, Ũ 0 (0) < 0, x = 0 is candidate of maximum. (x is
"too expensive")
10. If m + p < 1, Ũ 0 ( m
p ) > 0, x =
m
p is a candidate of maximum.

You might also like