lecture-notes for quantitative methods - hem | … · lecture-notes for quantitative methods ......
TRANSCRIPT
1
Katarina Katz*
Karlstad University
Lecture-notes for Quantitative Methods
Spring 2014
Katarina Katz,,
Karlstad University, Universitetsgatan 2, 651 88 Karlstad
Tel. 054-700 2018
2
Contents
PART 1 INTRODUCTION ...................................................................................................... 4
Why learn maths? .................................................................................................................. 4
Formal Logic: ........................................................................................................................ 6
Economic models .................................................................................................................. 7
Arithmetic .............................................................................................................................. 8
Real numbers and the number line .................................................................................... 8
Brackets (parentheses): ..................................................................................................... 9
Important arithmetic rules: .............................................................................................. 10
Functions ............................................................................................................................. 11
Power functions and power rules .................................................................................... 12
Polynomials: .................................................................................................................... 14
Linear equations .............................................................................................................. 17
Linear functions: ................................................................................................................. 21
Difference quotients: ....................................................................................................... 21
To find the equation of a straight line/linear function: .................................................... 22
PART 2. DERIVATIVES - DIFFERENTIATION ................................................................. 23
The slope of a non-linear function? ..................................................................................... 23
Definition of the derivative ................................................................................................. 26
Notations for describing change: ..................................................................................... 28
A slightly closer look at limits: ........................................................................................... 28
Rules of differentiation ........................................................................................................ 29
Composite functions ............................................................................................................ 32
The chain rule of differentiation ...................................................................................... 32
Elasticities ........................................................................................................................... 34
Increasing/decreasing functions .......................................................................................... 35
Inverse functions ................................................................................................................. 37
Exponential functions and logarithmic functions ................................................................ 39
Using logarithms to simplify. .......................................................................................... 44
The general exponential function ax, a>0 ........................................................................ 45
Differentiation of composite functions involving exponentials: ..................................... 45
PART 3 OPTIMISATION ...................................................................................................... 46
Extreme points ..................................................................................................................... 47
Higher order derivatives ...................................................................................................... 55
3
Convexity and concavity ................................................................................................. 56
Second order-conditions for maximum/minimum: ......................................................... 60
PART 4. FUNCTIONS OF MORE THAN ONE VARIABLE .............................................. 63
n-dimensional space ............................................................................................................ 63
Level curves ........................................................................................................................ 63
Partial derivatives ................................................................................................................ 66
Taking partial derivatives ................................................................................................ 66
The chain rule for functions of several variables and total derivatives ........................... 68
A special case of the chain rule ....................................................................................... 71
Second order conditions for a function of two variables: ............................................... 77
Optimisation under constraints: .......................................................................................... 83
The Lagrange method ...................................................................................................... 86
Reading instructions
The mathematics part of the course includes lectures (6*3 hours) and exercises. The purpose
of the exercises is for students to work, jointly or individually on exercises in the workbook
which is available on the course webpage. During the exercise periods, the teacher is
available for questions and individual tutoring. The main literature for the lectures, are these
notes. Sections marked “*” are not required.
It is a good idea to have a more complete textbook for reference and to find more exercises
and solved problems. There is a number of good “mathematics for economists”-books which
you can buy or borrow from the University library. For example:
Mik Wisniewski: Introductory Mathematical Methods in Economics
Knut Sydsäter: Matematisk analys för ekonomer
Knut Sydsaeter & Peter Hammond: Essential Mathematics for Economic Analysis
Knut Sydsaeter & Peter Hammond: Mathematics for Economic Analysis
R. L: Thomas: Using Mathematics in Economics
Ian Jacques: Mathematics for Economics and Business
Jonas Månsson: Grundläggande matematik för samhällsvetare och ekonomer
The two last are easier to read but they do not include all the topics covered in the course.
4
PART 1 INTRODUCTION
Why learn maths?
In order to:
read economic literature
be able to critically assess economic theory
see logical implication of assumptions
discover contradictions in assumption
organise quantitative data and highlight structure
isolate a particular factor
But do not:
o Let the mathematics “take over”
o Take assumptions for granted
o Forget that a mathematical model is no better than its assumptions
o Confuse mathematical/statistical relations with causality
How to learn maths?
Mathematics is a science:
o Learn rules and definitions precisely.
o Remember the logic of the arguments.
Mathematics is a craft:
o Practise!
Mathematics is formalised logic
o It consists of deductions from assumptions - not of statements of fact and it
cannot tell you anything about causality
5
6
Formal Logic:
Mathematics uses implications and equivalences, sufficient conditions and necessary
conditions.
Implication: P Q
this is read as “P implies Q” or “If P then Q”
where P and Q are statements.
Ex 1. If (I drop the pen) then (the pen falls to the floor)
This implication is true if it is not false:
The implication is not true (false):
If I drop the pen and it does not fall to the floor,
Therefore the implication is true:
If I drop the pen and it falls to the floor
If I do not drop the pen and it doesn’t fall to the floor.
If I do not drop the pen and it falls to the floor anyway.
Ex 2, If (it snows) then (it is cold outside) It snows it is cold outside.
The implication is true:
If it is snowing and it is cold.
If it is not cold and not snowing.
If it is cold and not snowing.
The implication is false:
If it is snowing even though it isn’t cold.
P Q means that if P is true, then Q must always be true too. It is enough to know that P is
the case to be certain that Q is the case too. When P Q, P is said to be a sufficient
condition for Q. consequently the implication is false if and only if P can be true and at the
same time Q is not.
Example 1 is true also if I don’t drop the pen and example 2 is true on a day without snow.
Note the difference between saying “the statement P is false” and saying “the implication P
Q is false”.
7
But if I drop the pen and it is tied by a string to my finger or if I hold my hand above a desk,
the implication in example 1 is false. If it snows on a warm summer day the implication in
example 2 is false.
P Q is the same as Not Q Not P. This means that if P is a sufficient condition for
Q, then Q is always a necessary condition for P.
If we know that we implication in example 2 is true we know that if it snows it is cold, but
also that if it is not cold, then it is not snowing. If the temperature is +10 C, it isn’t necessary
to look out the window to know that it isn’t snowing outside.
If P Q and Q P they are said to be equivalent: P Q
This is read as “P (Q) is equivalent to Q (P)”, “P if and only if Q”
Example: I stand in front of the whiteboard the whiteboard is behind me
Note that logical implications are not causal explanations: It snows it is cold but the snow
is not the cause of or the reason for cold.
Economic models
Elements of a model:
Exogenous variables – values are given, “drop from the sky”
Endogenous variables – values are determined by the model
Parameters - constants (fixed numbers) in the relations that make up the model.
Equations that are part of the model may have different roles. They can be:
Behavioural equations
Equilibrium equations (conditions)
Identities
Static models – a snapshot of something at a given moment
Comparative statics – use a static model to find and compare conditions
for different values of one or more exogeneous variables (“at different
moments)
Dynamic models – show also the process of change from one condition to another
8
Example: A simple national income model
Y = C + I (1)
I = I0 (2)
C = a + bY 0<a 0<b<1 (3)
Arithmetic
Real numbers and the number line
The real numbers can be represented on a number line. Every real number corresponds to a
point on the line and every point on the line corresponds to a real number. If the point
corresponding to the number A is to the left of the point corresponding to the number B on
the number line, then A<B. (For example, - 1000 < - 1)
The distance from a to the point zero is the absolute value of a, a
The distance between a and b is a-b = b - a
If a≥ 0 then a-0=a= a
If a ≤ 0 then a= -a
-(-a) = a
a= -a
A connected piece of the number line is called an interval. A bounded interval begins and
ends in two points on the number lines. If we call the points a and b, and assume that a<b,
then the closed interval [a, b] is the set of all numbers, which are equal to or larger than a
and equal to or smaller than b. The open interval (a, b) is the set of all numbers, which are
0
1 -1 2
-2
9
strictly larger than a and strictly smaller than b. (You may also see open intervals written as
]a, b[.) a and b are called the end points of the interval. The set of numbers that are in the
intervals, but are not end points makes up the interior of the interval. A closed interval
includes its end points, an open interval does not.
An interval which is not bounded goes to plus or minus infinity (or both). Infinity is
represented by the symbol ∞. For example, the interval (3, ) consists of all real numbers
which are strictly larger than 3.
All real numbers can be added, subtracted and multiplied with any real number. All real
numbers can be divided by any real number EXCEPT ZERO.
Brackets (parentheses):
The basic rule for performing several arithmetical operations is that multiplication and
division are performed first, then addition and subtraction. BUT if any part of an arithmetical
expression is written within brackets, those operations take priority and are done first of all.
Example:
2 + 410-7 = 2 + 40 – 7 = 35 BUT 2 + 4(10-7) = 2 + 43 = 14
Multiply an expression within brackets with a number: a(2b +c) = 2ab + ac
3(4+x) = 12 + 3x
Multiply out a factor from inside brackets: 2ab + ac = a(2b + c)
12+3x=34+3x=3(4+x)
Multiply expressions within brackets: (2a+3b-c)(d-2e) = 2ad -4ae+3bd-6be-cd+2ce
10
Important arithmetic rules:
-(-a) = a
a(-b) = (-a)b = -ab
(-a)(-b) = ab
a(b+c) = ab + ac distributive law
(a+b)(a+b)=(a+b)2=a
2+2ab+b
2 rules of squares
(a-b)(a-b)=(a-b)2=a
2-2ab+b
2
(a+b)(a-b)=a2-b
2 rule of conjugates
db
bcad
d
c
b
a
addition of quotients
d
c
b
a
d
c
b
a
multiplication of quotients
division of quotients
c
d
b
a
d
cb
a
Do not divide by zero!
Example: If 4 kilos of apples cost 60 SEK, what is the price per kilo?
If ¼ of a kilo of cherries cost 16 SEK, what is the price per kilo?
Did you use the same method of calculation in both cases?
Exercise:
How do real wages change if:
a) Prices increase by 5% and nominal wages by 7%?
b) Prices increase by 300% and nominal wages by 200%?
11
Functions
Def. A function (mapping) f is a rule which assigns to every element x of a particular set, the
domain of f, one, and only one, value f(x). The set of all such values is called the range of f.
Domain (Df) Range (Vf)
f(x) = f(z) =y
f(w) = u
“f maps x and z onto y and w onto u”
A function can be seen as a “pairing rule” such that for any element of the domain (any value
of the variable) that we pick, we can unambiguously name one element of the range and say
that this is the value of the function for this value of the variable.
For each x in the domain there is one and only one y in the range such that y = f(x) BUT for
one element, y, in the range there can be several different elements (say, x and z) in the
domain such that y=f(x) AND y=f(z).
Example 1 g(y) = 3y3 – 2 g(10) = 3 000 – 2
g(2) = 3*(23) – 2 = 3*8-2 = 22 g(3y) = 3*(3y)
3-2=81y
3-2
Ex. 2 Function Domain Range
y = x – 1 all real numbers, R R
y = x2 R y≥0
xy
1
1 x1 y0
Some functions are such that to each element in the range corresponds only one element in
the domain. In other words, with these functions it cannot happen that f(x)=f(y) unless x=y.
Such functions are said to be one-to-one.
x
z
w
y
u
12
Power functions and power rules
, where a is a constant, is a power function
Power rules:
For positive integers m and n and real numbers x:
1.
x)factors(n
... xxxxn
2.
3.
4.
5.
6.
7. nmmn
xx odd mand/or 0for x
For x>0 the rules are valid for all real values of n and m.
m x is read as ”the mth
root of x”. xxm
m . In other words, the mth
root of x raised
to m makes x. The second root (square root) 2 x is usually written simply as x .
Note that from rule 3 it follows that
n
n
nn
x
xxx
1
11)(
axxf )(
mnxmxnx
0för 1
xnx
nx
yn
xn
xyn
mnxmnx
0för x 10
x
13
To see why these rules are reasonable:
2. According to Rule 1. x
n• x
m = x• x•x•.... •x • x• x•.... •x
(As an example, write 23•2
2 = 2
5 divided into factors.)
3. According to Rule 2. xm
•x-n
= xm-n
. But nm
n
m
n
m xx
x
xx
1 since we can foreshorten,
dividing by n factors x in both numerator and denominator. Since multiplying by 1/xn and
multiplying by x-n
lead to the same result, they have to be equal if we want Rule 2 to apply to
negative integers as well as positive. (As an example show that 36•3
-4= 3
2.)
4. nnnyxyyyxxxxyxyxyxy ......... . n factors xy is the same as n factors x
and n factors y. Since multiplication is commutative we can let the factors change place
without changing the value of the product. (As an example, calculate (2•3)4=
2•2•2•2•3•3•3•3= 24•3
4.)
5. nmnnnnnnmn xxxxxx ...... According to Rules 1. and 2. ((xn)m
means m factors xn
multiplied by each other. (As an example, calculate (52)3.)
6. By Rule 2 xn•x
0 0 x
n+0 = x
n for all integers n. Thus, multiplying a number by x
0 produces
the same result as multiplying the number by the number 1. In order for Rule 2 to be valid we
must define x0 to be equal to one for all x, except the number zero. (0
0 is not defined.)
7. Let x be a positive number and m an integer. The mth
root of x is defined as the number
which is equal to x when raised to the power of m. For example, the square root (the second
root) of x is the number the square of which is equal to x. But according to Rule 5
xxxxx m
mm
m
m
m
1
11
. Therefore x1/m
is the mth
root of x. (If m is an odd number,
this is true also for negative values of x. If m is an even number and x is negative, the mth
root
of x is not a real number.)
m factors x n factors x
n+m factors x
14
Polynomials:
where an, an-1, …, a1, a0 are constant, real numbers and an 0, is a polynomial of degree n in
x.
A zero of the polyomial p is a value of x such that p(x) = 0.
A polynomial of degree n has at most n real zeroes.
The factor theorem: The number r is a zero of the polynomial p (i. e. p(r) = 0) if and only if
there is a polynomial q such that p(x) = (x-r)q(x) for all values of x. If p is of degree n, q must
be of degree n-1.
Another way of expressing that there is a polynomial q such that p(x) = (x-r)q(x) is to say that
the polynomial p can be divided by (is divisible by) (x-r) (by the first order polynomial x-r).
Polynomials
Degree: Form Example
Zero a 3
One ax + b 4x – 9.7
Two ax2+bx+c 3Q
2-4Q+10
ax + b has the zero x = -b/a
ax2+bx+c = 0 has
no real root if b2<4ac
the two roots
if b2
> 4ac
the double root a
bx
2 if b
2 = 4ac
axaxaxaxaxan
nn
nn
nxp
012
22
21
1...)(
a
acbb
a
acb
a
bx
2
4
4
4
2
2
2
2
15
Alternatively to get a simpler formula to memorise: Divide both sides of ax2+bx+c = 0 by
a.
Solve x2+px+q = 0 where p = b/a and q = c/a
x2+px+q = 0
2
4
2
2 qppx
if p
2 4q
*Optional: To prove the rule: Complete the square and use the first rule of squares!
qpp
x
qpp
xqpp
x
qpp
xp
xqpxx
2
2222
2222
22
220
22
0222
20
Example
0
6
1
6
1
016
2
2
xx
xx
Formula solution: p = 1/6 and q = -1/6
1/36 > -4/6 so the solution is
12
5
12
1
2
6
5
12
1
2
36
25
12
1
2
36
24
36
1
12
1
2
)6
4(
6
1
2
61
2
x =
4/12 1/3
= -6/12 = -1/2
*Alternative method or check: Complete the square:
Finally, check that these values satisfy the original equation:
013
1
3
21
3
1
9
61
3
1)
3
1(6 2 and 01
2
1
2
31
2
1
4
161
2
1
2
16
2
Exercise: According to the factor theorem 6x2+x-1 = 6(x – 1/3)(x+1/2). Check this!
16
Double roots: Take s(x) = x2 + 8x + 16. p = 8 and q = 16.
042
6464
2
8
2
1648
2
8 2
x
Thus, the polynomial has the double root x = -4 and according to the Factor´Theorem:
s(x) = [x – (-4))(x – (-4)] = (x + 4)(x +4). Check this as an exercise!
Example. Take the polynomial x2-5x+6. The formula for solving the equation x
2-5x+6=0
shows that the roots are x = 2 and x = 3.
Factor theorem: (x-2)(x-3) = x2-3x-2x+(-2)(-3) = x
2-5x+6
Golden rules for solving equations
Do the same thing to both sides
Do not divide by zero
Check your answer by inserting the values you’ve found into the
original equation!!
Ex.: 5x – 10 = 20 But: x2 – 5x = 10x
x – 2 = 4 x(x-5) = 10x
x = 6 x-5=10 or x=0
17
Linear equations
A linear equation in n variables:
a1x1+ a2x2+ a3x3+ …+ an-1xn-1+ anxn=b
Examples:
1. The total revenue (TR) of a firm that sells two products
2211 QpQpTR
2. The budget of a consumer with income m, buying 3 goods:
mxpxpxp 332211
3. The budget of a consumer buying n goods:
p1x1+ p2x2+ p3x3+ …+ pn-1xn-1+ pnxn=m
Methods of solving systems of (simultaneous) linear equations:
1. Graphically (approximately)
2. Substitution
3. Elimination
Example: Supply/demand equilibrium
:
QD = a – bP a, b, d > 0 (1)
QS = c + dP c < 0 (2)
QD = Q
S (3)
Exercise: Make sure that you understand the connection between the signs of a, b, c, d and
the diagram!
S
P D
Q
18
The system x+y = 1 (1)
of equations 3x+2y = 3 (2)
is LINEAR with 2 variables and 2 equations.
2. SUBSTITUTION: According to (1) y = 1- x. Replace (substitute) y by 1-x in (2):
2x + (1-x) = 2
2x + 1 – x =2
x + 1 =2
x=1
Insert this value of x into (1) to get y=1-1=0
3. ELIMINATION
Multiply both sides of (1) by 2
2x+2y=2 (1’)
Subtract the left side of (1’) from the left side of (2) and the right side of (1’) from the right
side of (2)
(2x+y) – (3x+2y) = 2 – 3 (3)
2x - 3x + 2y - 2y = -1
-x = -1
x = 1
Insert x = 1 into (1) 1+y =1 y = 0
We can subtract the same amount from both sides of an equation. To get (3) we subtracted
the left side of equation (1’) from the left side of (2) and the right side of (1’) from the right
side of (2). Since (1’) is an equation, its right side and its left side are equal. Therefore we
have subtracted the same from both sides of (2). This is called piece-wise subtraction.
x+y=1
3x+2y=3
1. GRAPHICAL SOLUTION
Approximate
grafosk
19
Exercise: Demand and supply for a good is given by the system of equations:
D: q = 50 – 2p
S: q = -20 + 1.5p
Find the equilibrium price and demand.
Example: National income model:
Y = C + I (1)
I = I0 (2)
C = a + bY 0<a 0<b<1 (3)
C
With a public sector (government expenditure and tax) included in the model:
Y = C + I + G (1)
I = I0 (2)
C = a + bYD 0<a 0<b<1 (3)
YD = Y – T (4)
T = tY 0<t<1 (5)
C = a + b(Y – tY) = a+b(1-t)Y (6)
Y = a+b(1-t)Y+ I0+G (7)
Y – b(1-t)Y = a+ I0+G
(1-b(1-t))Y=a+ I0+G
)1(1
0
tb
GIaY
Exercise: Determine C and T
20
A general system of m linear equations in n variables can be written as:
a11x1+ a12x2+ a13x3+ …+ a1nxn=b1
a21x1+ a22x2+ a23x3+ …+ a2nxn=b2
.
.
.
am1x1+ am2x2+ am3x3+ …+ amnxn=bm
Nr of solutions
Eq./var.
0 1
m=n x+y=1
3x+3y=2
x+y=1
x+2y=2
x+y=1
2x+2y=2
m<n x+y+z=1
2x+2y+2z=3
____
x+y=1
n<m x+y=1
x+2y=2
x+3y=1
x+y=1
x+2y=2
2x+3y=3
x+y=1
2x+2y=2
3x+3y=3
The examples show that it is not automatically the case that there is unique solution if and
only if there as as many equations as unknown variables. It depends on the relationship
between the equations.
In the example x+y=1
3x+3y=2
the equations contradict each other and no values of x and y can satisfy both simultaneously.
In the example x+y=1
2x+2y=2
all the information contained in the second equation is already contained in the first one. The
two equations are said to be dependent. With two variables and only one independent
condition, there are infinitely many values of x and y that satisfy the two equations. In the
example at the bottom of the third column there are three equations, but the third can be
deduced from the two first. It does not add any new information, doesn’t impose any new
restriction of the variables.
21
Systems of linear equations have either a unique solution, no solution or infinitely many
solutions. With non-linear equations there are more possibilities.
x2 + 1= 0 No solution
x2 - 1= 0 Two solutions
x4 = 0 One solution
(x-1) 2
+ (y-3) 2
= 1 Infinitely many solutions
(x-1) 2
+ (y-3) 2
= 0 One solution
Linear functions:
Examples:
y = ax + b a, b constants
b intercept
a slope
C = 0.8Y + 10 (aggregate consumption)
Q = 100 – 0.75P (demand for a good)
Difference quotients:
Let (x1; y1) and (x2; y2) be two points on the straight line y = ax + b
We can form the difference quotient:
axx
xxa
xx
baxbax
xx
yy
x
y
)(
)()()(
12
12
12
12
12
12
Example:
abaxbaax
xx
baxbxa
xx
xyxy
11
)()1(
)1(
)()1(
The change in the dependent variable y when the independent variable x is increased by one
is exactly a. Linear functions have the same slope at each point of the graph.
If a>0 x ↑ ==> y ↑
If a<0 x ↑ ==> y ↓
If a=0 y constant
If │a1│<│a2│ y = a2x +b2 is steeper than y = a1x +b1
22
To find the equation of a straight line/linear function:
Assume that (x1,y1) och (x2, y2) are two points on y=ax+b . There are two methods of
finding the equation of the line from knowing only two points.
Method 1. Slope a and intercept
Method 2. Solve the system of equations for a and b
Example 1: Find the straight line through (1, 3) and (3, -5)
1. and
2 .
Piece-wise subtraction:
Insert =-4 into either equation to get b=7
The equation of the line is y = 7 - 4x
CHECK THE ANSWER!
7 - 4*1 = 3 and 7 - 4*3 = -5
Example 2: A firm sells 380 units of its product at a price of 30 SEK/unit. When it increases
the price to 40 SEK, sales drop to 340 units. The demand function the firm faces can
reasonably be assumed to be approximately linear in the price range [25, 50].
a) Find the demand function.
b) How much would the firm have been able to sell with p =35? At p = 45?
Answer: Let q(p) = a + bp. The points we know are (30, 380) and (40, 340).
The slope b = the difference quotient (340 – 380) / (40-30) = -4
Thus, 380 = a -4*30 a = 500. The demand function is q(p) = 500 – 4p
p = 35 q = 500 – 4*35 = 360
p = 45 q = 500 – 4*45 = 320
12
12
xx
yya
11 axyb
22
11
ybax
ybax
42
8
13
35
a
743)4(3 b
53
31
ba
ba
48-2a8(-5)-33a-a a
23
PART 2. DERIVATIVES - DIFFERENTIATION
The slope of a non-linear function?
How does one determine the slope of a non-linear function? Lets compare with the linear
function y=ax+b. If we start from one given point (x, y), pick some other point and calculate
the difference quotient we always get the value a, whatever second point we choose. a is the
slope of the function at (x, y). The slope of a straight line is the same at every point so if we
repeat the exercise with any starting point we get the same result. If we do the same with
different points on the graph of a non-linear function we get different values for different
points because the slope of the function varies. The slope of a non-linear function is different
at different points.
Example: Take y(x)=x2
Obviously, the slope of this graph varies. To the left of zero it is negative, to the right of zero
it is positive. Far from zero, the slope is steep, near zero, the graph is almost flat. No single
number describes the slope of the whole graph. But can we attach values to the slope at each
point? For example, the slope of y(x)=x2 at x0=1?
y0 = y(x0) = 12 = 1
-2
-1,95
-1,9
-1,85
-1,8
-1,75
-1,7
-1,65
24
Difference quotients:
x x0+x= x1 y1= x12
y
=
1 2 4 3 3 =2+1
-1 0 0 -1 1 =2-1
½
=2+½
-½ ½
=2-½
¼
=2+¼
-¼
=2-¼
Geometric interpretation:
As we choose Δx smaller and smaller in absolute value, the straight lines through (1, 1) and
(1+Δx, (1+Δx)2
) “cut off” smaller and smaller pieces of the graph. The smallest piece that
can conceivably be cut from a line is a single point.
Two straight lines always intersect, unless they have the same slope (are parallel). If we want
to draw a straight line through (1, 1) which does not intersect the graph we should also be
looking for a line with the same slope as y=x2.
The difference quotients, as Δx approached zero seem to approach the number two. The
straight line through (1, 1) with slope two is y = 2x – 1. If we draw the line it passes through
(1, 1) which is on the graph of y = x2 but does not intersect (“cut through”) it. This is the red
line in the diagram below.
x
y
23
49
45
2
5
21
45
41 4
3
2
3
21
43
45
1625
169
4
9
43
169
167
4
7
101
1011
100121
10021
10
21
1012
101
109
10081
10019
10
1910
12
25
Definition: A line which includes one point of a curve but does not intersect the curve is
called a tangent to the curve (graph).
If the line is tangent to the graph y=f(x) at the point x
the slope of the graph at x = the slope of the tangent.
In the example:
The slope of the graph in (1, 1) is equal to the slope of the tangent at that point. In the
diagram the line y = 2x-1 appears to be the tangent of y=x2
in (1, 1).
-8
-6
-4
-2
0
2
4
6
8
10
-3-2
,8-2
,6-2
,4-2
,2 -2-1
,8-1
,6-1
,4-1
,2 -1-0
,8-0
,6-0
,4-0
,2
-1,3
88E-1
60,
20,
40,
60,
8 11,
21,
41,
61,
8 22,
22,
42,
62,
8 3
x2
2x-1
-8
-6
-4
-2
0
2
4
6
8
10
-3 -2,8
-2,6
-2,4
-2,2 -2 -1
,8-1
,6-1
,4-1
,2 -1 -0,8
-0,6
-0,4
-0,2
-1,388E-1
6 0,2 0,4 0,6 0,8 1 1,2 1,4 1,6 1,8 2 2,2 2,4 2,6 2,8 3
x2
2x-1
26
Algebraically:
Can we use algebra to find support for the geometric interpretation?
xx
xx
xxx
x
xxx
yy
xy
22)(2
212)(1221
1)1(
212)1(
01
01
If Δx is near zero (“almost nothing”), the difference quotient must be near two, “almost equal
to two”.
For any point x=a:
kakakakkaa
aka
aka
afkaf
x
y
kk
k
2
22
22)(2
2
22)()()(
Definition of the derivative
Generally: To find the derivative of a function f at point a:
(VERY informally)
1. Let k be a small number h≠0 and form the difference quotient
k
afkaf )()(
2. Do this for different numbers k, all different from zero but nearer and nearer zero.
3. See if you can find some number which the difference quotient approaches.
If there is such a number, it is called the derivative of f at a.
Notation for the derivative of the function y = f(x) at the point x = a:
, ,
Formally, the derivative is the limit of the difference quotient as the distance between the
points approaches zero. This is written as:
Formally if the limit exists
If it doesn’t, f does not have a derivative at the point a. It is not differentiable at a.
)(' af )(afD)(a
dx
dy)(a
dx
df
h
afhafaf
h
)()()(' lim
0
27
Examples: If f is not continuous at a point a, f is not differentiable at a.
A continuous function can be seen, intuitively, as one whose graph can be drawn “without
lifting the pen from the paper”.
If f has “a sharp corner” at point a, f is not differentiable at a.
Since the slope of a non-linear function is different at different points, the derivative takes
different values at different points in the domain of f. This means that: if is a differentiable
function of x, the derivative, f’ is also a function of x. Note the difference between the
derivative (a function) and the derivative at a point (a number).
The derivative, considered as a function, can be written
'f )(' xf fD dx
dy
dx
df
28
Notations for describing change:
(Assume that y = f(x) is a function and a and b are points in the domain of f)
Concept Mathematically
1. Change, difference y; f(a+h)-f(a); f
2. Average (relative) change ,
x
y
, x≠0
3. Change per unit ab
bfaf
)()(,
h
afhaf )()( ab, h0
4. Instantaneous change , ,
5. Relative rate of change
6.. Elasticity y
x
dx
dy (point elasticity)
y
x
x
y
(arc elasticity)
A slightly closer look at limits:
Examples
x f(x)=x2
x
1,9 3,61 0 1
1,99 3,9061 0,5 0,5858
1,999 3,9006001 0,9 0,5132
2 4 0,99 0,5013
2,001 4,004001 0,999 0,5001
2,01 4,0401 1 ---
2,1 4,41 1,001 0,4999
1,01 0,4988
1,1 0,4881
1,5 0,4495
2 0,4142
)(' afdx
dy x
y
x
lim
0
y
y
y
dx
dy
af
af
;;)(
)('
1 x
,1
1)(
x
xxf
29
In the example to the left we could have found the limit of f as x approaches 2 by calculating
f(2) = 22 = 4. But in the example to the right f(1) does not exist – to calculate it we would
have had to divide by 1 – 1 = 0 and that is not possible. It looks as if the limit were the
number 0.5. We can check using the rule of conjugates and the fact that 1 = 12 and x = (x )
2
For x≠1
2
1
11
1
1
1
11
1
1
1
1
1)(
22
xxx
x
x
x
x
xxf as x→1
“Definition” (intuitive): If we can arbitrarily make any choice we want of how far f(x) may
be from A and ensure that it keeps within that limit by keeping x sufficiently close to a (but
not equal to a) then we say that
Rules of differentiation
Assume that f and g are differentiable functions with the same domain, D.
1. If for all x in D h(x)=c∙f(x) where c is a constant then h’(x) = c∙f’(x)
2. If for all x in D h(x)=f(x) + g(x) then h’(x)=f’(x) + g’(x) (analogously for subtraction)
3. . If for all x in D h(x)=f(x) ∙g(x) then h’(x)=f’(x) ∙g(x) + f(x) ∙g’(x) (Product rule)
4. If 0g(x) such that Din x allfor )(
)()(
xg
xfxh then
)(
)(')()()´()('
2xg
xgxfxgxfxh
(Quotient rule)
Examples:
1. Real and nominal GNP-growth
Y(t) = P(t)Q(t)
where t – time Y – nominal GNP
P – price level Q – real production
By the product rule:
Y’(t) =P’(t)Q(t) + P(t)Q’(t)
Axfax
)(lim
Nominal growth
Real growth
Inflation
30
Relative change in prices )(
)('
tP
tP
Relative real growth )(
)('
tQ
tQ
Relative GNP growth )(
)('
tY
tY
In “dot-notation” (which is used mainly in macroeconomics literature) the derivative of a
function is written as the symbol for the function with a dot above it:
Q
Q
P
P
PQ
QP
PQ
QP
PQ
QPQP
Y
Y
2. Average and marginal cost
Let Q represent the level of production of a firm, C(Q) the total cost of production and
AC(Q) average cost, i.e. Q
QCQAC
)()(
This is a quotient of two functions so we use the quotient rule.
The derivative of C(Q) is C´(Q). The derivative of Q(Q) = Q?
The same as the derivative of f(x) = x. “How much does production change when production
changes by one unit?” By one unit!
)-(1'1'1)()(')((
22ACMC
AC
Q
C
C
Q
QC
Q
QCQQC
dQ
QACd
The derivate of AC is positive if and only if MC > AC
3, The derivative of a polynomial. The polynomial
is a sum of terms, each of which is a functions of the form akxk. According to rule 2.the
derivative of the polynomial is the sum of the derivatives of the terms.
Since ak is a constant the derivative of akxk is ak times the derivative of x
k, according to rule
1. So, if we know the derivative of xk, we will be able to differentiate any polynomial.
axaxaxaxaxan
nn
nn
nxp
012
22
21
1...)(
31
We have found in the examples that
The derivative of x = x1 is 1 = 1∙x
0 = 1∙x
1-1
The derivative of x2 is 2x = 2x
1 = 2∙x
2-1
What is the derivative of x3? x
3= x∙x
2. The product rule tells us that the derivative of this is:
D[x3] = D[x] x
2+x∙D[x
2] = 1∙x
2 + x∙2x = 3x
2 = 3∙x
3-1
Analogously D[x4] = D[x] ∙ x
3+x∙D[x
3] = 1∙x
3 + x∙3x
2 = 4x
3 = 4x
4-1
Assume that for some arbitrarily chosen positive (>0) integer k, the derivative D[xk ] = kx
k-1
Then D[xk+1
] = D[x∙xk] = 1∙x
k + x∙ D[x
k ] = x
k + x(k)x
k-1 = x
k + k
x
k = (k+1) x
k
Since the rule is true for k = 1 it is true for k = 2, since it is true for k= 2 it is true for k=3 etc.
In fact, for any k≠ 0 (not only integers): The derivative D[xk] = kx
k-1
Exercise: Assume that it is known that the derivative of f(x) = xn is f’(x) = nx
n-1 for all
positive integers n. Use the quotient rule to find the derivative of g(x) = xk where k is a
negative integer.
Example 4 a). f(x) = 3x4 – 5x
2 +7
f’(x)=4*3*x3-5*2x
1+0 = 12x
3-10x
b). f(x) = (x2-1)(x
4-2x
2+1)
f’(x)=2x(x4-2x
2+1)+(x
2-1)(4x
3-4x) =
= 2x5-4x
3+2x+4x
5-4x
3-4x
3+4x =
= 6x5-12x
3+6x=6x(x
4-2x
2+1 ) = 6x(x
2-1)
2
c). y(x) = (x3 – x)(5x
4+x
2)
y’(x) = (3x2-1)(5x
4+x
2)+(x
3-x)(20x
3+2x) = 35x
6-20x
4-3x
2
d.) )(
)(
1
1)(
2
xh
xg
x
xxf
where g(x)=x2+1 and h(x)=x+1
g’(x)=2x h’(x)=1
2
2
2
22
2
2
21
12
1
122
1
1)1()1(2
)(
)(')()()(')('
x
xx
x
xxx
x
xxx
xh
xhxgxhxgxf
32
e). 253)(
xxxy
2
222)2(
)2(
1
)2(
5363
)2(
)53(1)2(3)('
x
xx
xx
x
xxxy
5. The equation for the tangent of
1
1)(
2
x
xxf
at x=1?
The slope is equal to the derivative of f at this point. Inserting x = 1 into the derivative
calculated in 4 d) we get
2
1
4
2
)11(
1121
2
2
The tangent passes through the point x=1, y(1) = 1 on the graph
y=0.5x+b where 1=0.5+b. Therefore b=0.5
Composite functions
Let g(y) be a function defined for all y in a set Dg and y=f(x) be a function defined for all x in
a set Df such that the range of f, Vf is a subset of Dg.
The function z= h(x) = g(f(x)) = is the composite of g and f.. It can be written as h = g◦f
f is called the inner function
g is called the outer function
The chain rule of differentiation
The chain rule: If h(x) = g(f(x)) and g and f are differentiable, then
dx
dy
dy
dz
dx
dz
x)fxfgxy)f g(x) h
)(')((')('(''
g f
h
33
Example 1. a) y = (x+2)2
The function can be written as y = z2 where z = (x+2). Applying the chain rule gives us
42)2(212 xxzdx
dz
dz
dy
dx
dy
To check, we can note that y = x2 + 4x + 4. Differentiating this directly, we get
y’(x) = 2x + 4.
b) y = (2x+1)2
482)12(222 xxzdx
dz
dz
dy
dx
dy
Check: y(x) = 4x2 + 4x + 1 y’(x) = 8x +4
Example 2 y = (5x3 + 2x – 7)
17.
In Example 1, it was equally easy to apply the chain rule and to differentiate directly. In this
case, although both methods work the chain rule is much easier. According to the chain rule
y’(x) = 17(5x3 +2x – 7)
16*(15x
2+ 2)
To avoid using the chain rule, one has to calculate (5x3 + 2x – 7)
17 as a polynomial of the 51
st
degree…
Example 3: Value Marginal Product
Assume that a firm faces a demand curve: p=15-q, where p is the price and q the quantity
demanded.
Total revenue: R= p∙q = (15-q) ∙q = 15q-q2.
Marginal revenue R’(q)= 15-2q
Assume that the firm’s production function (with fixed capital equipment) is:
q=q(L)=10√L = 10L1/2
where L = the amount of labour time used
MPL=
2
11
2
1
52
110
5
2
10LL
LLdL
dq
MPL is the marginal productivity of labour, or the rate of increase in production when labour
time is increased.
What about R’(L)? The rate of increase in revenue when labour time is increased.
34
Express R as a function of L:
R(L)=15q-q2=15 ∙10√L-(10√L)
2=150√L-100L
Example 4
)12( 5 xxz
122
25)25(
2
1
12
5
44
5
xx
xx
ydx
dy
dy
dz
dx
dz
xxy
yz
If you prefer writing square roots as power functions:
2
1
5 )12( xxz 2
1
yz where 125 xxy
2
1
5
442
1
542
1
)12(2
)25()25()12(
2
1)25(
2
1
xx
xxxxxy
dx
dy
dy
dz
dx
dz
Elasticities
Let y = y(x)
The elasticity of y w.r.t. (with respect to) x: ”The percentage change in y relative to the
percentage change in x”.
ARC ELASTICITY, E
Y
X
X
Y
X
X
Y
Y
(preliminary definition)
Problems with this definition:
dL
dq
dq
dRq
LL
L
L
L
L
L
LLdL
dR
)215(5
)10215(5
1007510075100
2
150
35
1. it takes different values for change from X1 to X2 and for change from X2 to X1
2. if Y isn’t linear it takes different values for the same value of X but different ΔX so we
cannot speak of the elasticity at a given point.
(To see that this is true, take a demand function q = 100 – 5p. Calculate q when p = 5, p = 6
and p = 10. Then use the formula to calculate the price elasticity of demand when
a. price increases from 5 to 10
b. price decreases from 10 to 5
1. To avoid the first problem modify the definition of arc elasticity to
)(
)(
)(
)(
12
12
12
12
YY
XX
XX
YY
Y
X
X
YE
2. Define also POINT ELASTICITY
Y
X
dX
dY
Y
Y
X
X
is a good approximation for ”small” ΔX
Important elasticities:
Q
P
dP
dQp
price elasticity (of demand)
(P, Q, price and quant. of same good)
Q
I
dI
dQI
income elasticity (of demand)
(Q, quant. of good, I inc.)
X
Y
Y
Xp
Q
P
dP
dQY
cross price elasticity
(X, Y are quantities of two goods)
Increasing/decreasing functions
The graph of an increasing function points ”upwards to the right”, that of a decreasing
function “downwards to the right”.
36
increasing functions decreasing functions
If x<y f(x) < f(y) f is strictly increasing
If x<y f(x) > f(y) f is strictly decreasing
If x<y f(x) f(y) f is increasing
If x<y f(x) f(y) f is decreasing
If a function is decreasing in its whole domain or increasing in its whole domain it is
monotonic.
Examples:
Increasing: QS = -100 + 5p y=x2 for x>0, y=4x
3
Decreasing: QD = 300 – 2p y=x2 for x<0 y= 1/x for x>0
If y=f(x) and z=g(y) are two increasing functions, the composite z=g(f(x)) is increasing.
Assume that x2 x1. Then f(x2) f(x1) since f is increasing. But then g(f(x2)) g(f(x1)) since
g is increasing.
”The function f is differentiable in the interval I” means that for every point x in I, the
derivative f’(x) exists.
Let f be a function which is differentiable in the interval I:
In other words, a derivative which is strictly positive (in an interval) is a sufficient condition
for the function to be strictly increasing (in that interval), but not a necessary condition
1. If f'(x)>0 for all x in I then f is strictly increasing in I.
2. If f'(x)<0 for all x in I then f is strictly decreasing in I.
37
because a function can be strictly increasing even though the derivative is zero at some point.
(For example the function y=x3 at the point x=0.)
A strictly negative derivative is a sufficient condition for the function to be strictly decreasing
but not a necessary condition because a function can be strictly decreasing even though the
derivative is zero at some point. For example the function y=-x3 at the point x=0.)
But since a negative derivative is sufficient for the function to be strictly decreasing, a non-
negative derivative is necessary for it to be increasing:
Example: The function f(x) = x3 – 5/2 x
2 – 2x + 3 is
strictly increasing on (-, -1/3) and (2, )
increasing on (-, -1/3] and [2, )
strictly decreasing on (-1/3, 2)
decreasing on [-1/3, 2]
Figure f(x) = x3 – 5/2 x
2 – 2x + 3 for -1.5 < x < 3.5
Inverse functions
Example: Assume that a firm which is not a price taker faces a demand function:
-4
-3
-2
-1
0
1
2
3
4
5
6
-1,5
-1,3
-1,1
-0,9
-0,7
-0,5
-0,3
-0,1 0,1 0,3 0,5 0,7 0,9 1,1 1,3 1,5 1,7 1,9 2,1 2,3 2,5 2,7 2,9 3,1 3,3
x
f(x
)
f(x)
If f is increasing on the interval I then f'(x) ≥ 0 for all x in I.
If f is decreasing on the interval I then f'(x) 0 for all x in I
38
Q= 2000 – 50 p (1)
Q = Q(p) is the quantity that can be sold at price p.
How much will be sold if p=16?
p=16 Q=2000 – 50 ∙16 = 2000 – 800 = 1200
What price should the firm set in order to sell 1200 units?
Q= 2000 – 50 p 50p = 2000 – Q
Q=1200 p = 40 – 24 = 16
p(Q) defines price as function of quantity.
Q(p) defines quantity as function of price.
Q(p) is the inverse of p(Q)
For every price p0 and quantity Q0
Q(p(Q0))=Q0 and p(Q(p0))= p0
Q p(Q0)= Q0 & p Q(p0)= p0
In the example: p(Q(16)) = p(1200) = 16
Q(p(1200)) = Q(16) = 1200
The composite of the two inverse functions is a function that maps each element in the
domain on itself.
Let f be a function. If f is invertible f the inverse (function) of f is written as f-1
.
f-1 f (x) = x for all x in the domain of f.
f f-1
(x) = x for all x in the domain of f-1
A function f is invertible if and only if it is a one-to-one function, that is if f(x1) cannot be
equal to f(x2) for different values x1 and x2 of the variable.
5040
5050
2000 Qp
Qp
x1
x2
Df
y1
Vf=Df-1
39
Examples:
1. If f(x) = x + 1 and g(y) = y – 1 then f and g are inverses (of each other).
f(g(y)) = f(y-1) = (y-1)+1 = y for all values of y.
(Show yourself that g(f(x)) = x for all x.)
2. f(x) = x2, x≥0 and g(y) = y , y≥ 0 are inverses.
3. Find the inverse of f if .
For x1
Thus, the function is the inverse of f.
A function f is invertible if and only if it is strictly monotonic
If f is differentiable at a and f’(a)0, then f-1
is differentiable at f(a) with derivative
)('1af
*(Optional): Let h(x) = f -1 f(x). Since h(x) = x for every x, h’(x) =1.
But according to the chain rule, )()()(1
ydy
dfx
dx
dfx
dx
dh
where y = f(x)
Exponential functions and logarithmic functions
The function f(x) = ax (where a is a constant>0) is an exponential function (with base a).
Typical example: Kt=K0(1+r)t where K0 is an amount of initial capital, r is the interest rate,
and Kt is capital after t years.
The bigger x is, the bigger is ax for a>1 if a>1 then a
x is a strictly increasing function of x
The bigger x is, the smaller ax for a<1 if a<1 then a
x is a strictly decreasing function of x
Example: 2x with x=1,2, 3, 4 is equal to 2, 4, 8, 16
and (½)x with x = 1, 2, 3, 4 is equal to ½, ¼, 1/8, 1/16
For any a>0, f(x) = ax passes through the point (0, 1) because a
0=1.
1 x,1
)(
x
xxf
yyxyxyxxyyxxxyx
xy
)1()1(
1
1)(
y
yyg
40
For all numbers a > 0
If a > 1 If 0 < a < 1
x<0 ax < 1 x<0 a
x > 1
x = 0 ax = 1 x = 0 a
x = 1
x > 0 ax > 1 x > 0 a
x < 1
For any numbers a and b such that a < b and a, b > 0
ax < b
x if x > 0
ax = b
x = 1 if x = 0
bx < a
x if x < 0
Figure: 2x and 3
x, -1<x<2.5
x <0 = 0 >0
2x > 3
x 2
x = 3
x 2
x < 3
x
What is the slope of the graph of an exponential function f(x)=ax?
At x=0 the slope of y=2x is a little less than one and that of y=3
x a little more than one. There
is a number e, 2<e<3 such that the slope of ex is equal to one if x = 0.
0
2
4
6
8
10
12
14
16
-1-0
,9-0
,8-0
,7-0
,6-0
,5-0
,4-0
,3-0
,2-0
,1
3,192E-1
60,1 0,2 0,3 0,4 0,5 0,6 0,7 0,8 0,9 1
1,1 1,2 1,3 1,4 1,5 1,6 1,7 1,8 1,9 22,1 2,2 2,3 2,4
2x
exp
3x
41
Slope of y=2x, y=e
x, y=3
x and y=x+1 at x=0
But at x = 0, ex = 1 so the value of the function = the value of the derivative. For this
particular function, this is true for all values of x.
For the function f(x) = ex, f(x) = f’(x) for any number x!
This function has an inverse: The natural logarithm, y = ln x
”The ( natural) logarithm of y is the exponent to which e must be raised in order to attain the
value y”.
It follows from the definition that
eln y
= y and ln ex = x
0
0,5
1
1,5
2
2,5
-0,6 -0,6 -0,5 -0,5 -0,4 -0,4 -0,3 -0,3 -0,2 -0,2 -0,1 -0 0 0,05 0,1 0,15 0,2 0,25 0,3 0,35 0,4 0,45 0,5 0,55 0,6
2x
exp
3x
y=x+1
y = ex x = ln y
42
Example: Assume that inflation is constant at 3 % per year. How should that be
visualised graphically? The diagrams show three different options.
Rate of inflation
Price level
Logarithm of price level
The third graph conveys the visual impression of something that changes (unlike the first) but
at an even pace (unlike the second).
Rate of inflation
0
0,005
0,01
0,015
0,02
0,025
0,03
0,035
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
Year
Inflati
on
Serie1
Price level
0
2
4
6
8
10
12
14
16
18
20
1 4 7 10 13 16 19 22 25 28 31 34 37 40 43 46 49 52 55 58 61 64 67 70 73 76 79 82 85 88 91 94 97
Year
Serie1
ln P
0
0,5
1
1,5
2
2,5
3
3,5
0 3 6 9 12 15 18 21 24 27 30 33 36 39 42 45 48 51 54 57 60 63 66 69 72 75 78 81 84 87 90 93 96
ln P
43
Properties of the exponential and logarithmic functions
ex ln y (y, z>0)
1. Dex = ]- ; [ ; Vex = ] 0; [ 1. Dln y= ]0; [;Vln y =]-;[
2. e0 = 1; e
1 = e 2. ln 1 = 0 ; ln e = 1
3. ex is strictly increasing 3. ln y is strictly increasing
4. er = e
s r=s 4. ln y = ln z y=z
5. er+s =
ere
s 5. ln y + ln z = ln yz
6. er-s =
er/e
s 6. ln y - ln z = ln y/z
7. (er)s = e
rs 7. ln y
p = p ln y
8.D(ex) = e
x , all x .D(ln y) =
y
1, y>0
Explanations:
1. Since ln y is the inverse of ex, Dln y=Ve
x and conversely. e
x can take all positive values but
not be zero or negative so the range of the exponential function and the domain of the
logarithm is the positive numbers. ex is defined for all values of x so the logarithm can take
any real number as its value.
2. According to the definition of an inverse function:
ln 1 = ln e0 = 0 ln e = ln e
1= 1
3. The inverse of a strictly increasing function is always strictly increasing!
44
4.Since the ln-function is strictly increasing it is one-to-one. Therefore the same value of the
function (the same logarithm) cannot correspond to two different values of the variable.
(Analogously, of course, for the exponential function.)
5. Take any two numbers x, y >0. By the definition of ln and the usual power rules
. But by definition. Therefore, .
Since the exponential function is one-to-one this means that
ln x + ln y = ln xy.
6. Analogous to the proof of point 5. Try to show it as an exercise!
7. according to the power rules.
Since ex is one-to-one it follows that the two exponents must be equal.
8. According to the rule for the derivates of inverse functions
Using logarithms to simplify.
Taking logarithms can make calculations easier because exponential relations are replaced by
products and products/ quotients by sums/differences.
Example 1. Cobb Douglas-function. (Used both for production- and utility functions.)
You get a linear relation between the variables ln K, ln L och ln N
Example 2. Wage functions. Assume that on average the wage of a person increases p
percent with each year of schooling and r percent with each year of work experience. The
wage of someone with s years of schooling and x years of work experience is expected to be:
w = w0 (1+p)s(1+r)
x
Empirically it is easier to estimate:
ln w = ln w0 + s ln(1+p)+ x ln (1+r) because this is a linear relation between s and x.
yxyx eeexy lnlnlnln xyexy ln xyyx ee lnlnln
pxpxppx eexxep )(lnln)ln( )()(
yeedx
de
dy
dy
dy
d
xx
x 111)(ln)(ln
NLKAQNLAKQ lnlnlnlnln
45
The general exponential function ax, a>0
Let f(t)=at.
The relative change from time t to t+1 is independent of t.
f increases at a constant rate of (a-1)∙100 percent/unit of time.
According to the chain rule
Example:
xx
e
ue
dx
du
du
dv
dv
dz
dz
dy
dx
dy
xu
uv
vz
eeey
xy
xx
z
zxx
x
52
2)2ln5(
52
)2ln5(
52
1)2(ln
5
2ln
2)(
5)5)(2(ln
)5)(2(ln52ln
5
1)1(1
)(
)()1( 11
aa
aa
a
aaa
a
aa
tf
tftf
t
t
t
tt
t
tt
axxax eeaxf lnln )()(
aaaexf xax lnln)(' ln
Differentiation of composite functions
involving exponentials:
f(x)=eg(x)
f’(x)=g’(x)eg(x)
=g’(x)f(x)
46
PART 3 OPTIMISATION
To optimise – to find the value/those values of exogenous variables for which a function
takes its largest or smallest value.
Typical micro-economic optimisation problems:
Which level of production leads to maximum profit for a firm?
Or which combination of products?
Which combination of inputs allows the production of a particular quantity of a good
at the lowest possible cost?
What level of savings maximises life-time utility for a consumer?
How should a person divide her time between work and leisure in order to maximise
utility?
Assume that there is one variable input F in a production process. (We can assume that there
are other inputs but that they are fixed in the short run.) The graph shows production (Q) as a
function of this input.
F*
For example, let Q be the grain produced on a certain area as a function of the amount of
fertiliser. (We assume that all other inputs to production such as land, water and labour are
constant.) Up to a certain level, adding more fertiliser increases production, but to a smaller
and smaller extent. At some point, the soil is over-fertilised and crops actually decrease if
Qmax
F
Q
47
more is added. This means that crops can be maximised with this amount of fertiliser. The
maximum output Qmax
is obtained with F* kilograms of fertiliser.
But inputs usually have a cost. The next graph shows average cost for a firm (still assuming
one variable input). The firm wants to produce as cheaply as possible. At low levels of
production there is usually some slack, so average cost decreases when more is produced
since unused capacity is utilised. There are economies of scale. If production is increased
even more, at some stage there will be bottle-necks, machine capacity, floor space or the time
of workers with special skills become scarce and so on. Average cost increases and we have
the typical U-shaped average cost-curve with a minimum point.
Economies of scale bottlenecks
In these examples the functions had one maximum or minimum point, but of course that is
not always the case,
Extreme points
Definition: Let f be a function and c a point in Df.
If for all other points x in the domain of f
f(c)≤f(x) then c is a (global) minimum point of f and f(c) is the minimum value of f
If for all other points x in the domain of f, f(c) ≥ f(x) then c is a (global) maximum point of
f, and f(c) is the maximum value of f
(If ≥ is changed to > and ≤ to < then c is a strict maximum/minimum.)
AC
48
If for all points x in some open interval which includes the point c:
f(c) ≤ f(x)
then c is a local minimum point of f.
If for all points x in some open interval which includes the point c:
f(c) ≥ f(x)
then c is a local minimum point of f.
In both the examples there was a ”peak” or a ”low point” which could easily be seen to be a
global maximum or minimum for the function, whatever the value of the variable. But the
graph of a function may very well have several peaks or low points, where the function takes
different values. Such points are maximum or minimum points for the function within some
part of the domain.
It may be that we are only interested in the largest and smallest values of a function in some
particular interval, for instance when a firm tries to maximize profit by choosing a level of
production between zero and a capacity limit.
f(x)
x
This function has three local maximum points, one of which is a global maximum. It has two
local minimum points, but neither of them is a global minimum since the function takes
smaller values for very large and very small (large negative) values of the variable. Choose
49
different intervals on the x-axis och find the largest and smallest values of f in each interval.
It turns out that they are all either in one of the end points of the interval or in one of the peak
or low points. At a “peak” the slope of the function changes from positive (for smaller values
of x) to negative (for larger values of x). At a “low point” the slope of the graph changes
from negative (for smaller values of x) to positive (for larger values of x). Thus, the slope
and, hence, the derivative, changes sign at these points. If the derivative is continuous it has
to be equal to zero at the point where it changes its sign.
(Why? Assume that you are supposed to draw the graph of a function in the system of
coordinates below. The function should be continuous – that is to say, you should draw the
graph as one contiguous line. The value of the function should be above zero for all numbers
to the left of c and below zero for all numbers to the right of c. This means that the graph
must be contained in the shaded areas. Is there any way of drawing it so that it goes from the
striped field to the dotted without passing through (c, 0)?)
Definition A point c where f is differentiable and f’(c)=0 then c is called a stationary point
or a critical point of f
Example: 11243
7
25)( 2
345
xxxxx
xf
c
50
If you draw a tangent to this graph at some point where x > 3 it is sloping upwards to the
right, in other words the derivative is positive. At points to between 2 and 3, the tangent is
downward sloping, i.e. the derivative is negative. At x =3 (and at x=2, x= -1 and x= -2) the
tangent is horizontal. Its slope the derivative - is zero.
If f takes a largest/smallest value in an interval I, this happens either:
at an end point of the interval
at a stationary point
at a point where f is not differentiable
Examples: 1. 2,1 1
)( xx
xf
Largest and smallest
values at the end points
of the interval
-30
-20
-10
0
10
20
30
40
50
Serie1
51
2. 1,1- x)( 2 xxf
Maximum at x=1 and x=-1 (end points)
Minimum at x=0 (stationary point)
3. Minimum at x=0 where f is not differentiable
BUT not all stationary points are extreme points!
Example: f(x)=x3 f’(x)=3x
2
As the graph below shows, f’(0)=0 but f does not have a minimum or maximum at x=0.
y=x2
0
0,5
1
1,5
2
2,5
-1,2 -1,1 -1 -0,9 -0,8 -0,7 -0,6 -0,5 -0,4 -0,3 -0,2 -0,1 0 0,1 0,2 0,3 0,4 0,5 0,6 0,7 0,8 0,9 1 1,1 1,2 1,3 1,4
Serie1
y=│x│
52
Zero is an inflection point of f. (We’ll return to the definition of an inflection point later.)
Assume that c is a stationary point of the function f. Then:
If the function f is increasing to the left of c and decreasing to the right of c then
c is a local maximum point of f.
If the function f is decreasing to the left of c and increasing to the right of c then
c is a local minimum point of f.
If f is differentiable, its derivative can be used to determine whether a stationary point is a
maximum, a minimum or an inflection point.
Let c be a point such that f'(c)=0. If c is inside an interval (a, b) where f is differentiable and
1. [a≤x≤c f'(x) ≥ 0] and [c≤x≤b f'(x) ≤ 0] then x is a local maximum point of f.
2. [a≤x≤c f'(x) ≤ 0] & [c≤x≤b f'(x) ≥0] then x is a local minimum point of f.
3. If f'(x)>0 for all x, a≤x≤b, x≠c (or f'(x)<0 for all x a≤x≤b, x≠c), c is an inflection point of f.
(As an exercise, formulate the conditions in words!)
1. Assume that f’(x)≥0 for a≤x≤c. That means that for all points to the left of c (but to the
right of a) the derivative is non-negative (positive or zero), which, in its turn means that the
function is increasing. To the right of c, the derivative is non-positive so the function is
decreasing. Therefore c must be a local maximum.
2. The proof is analogous. Do it yourself as an exercise!
3. The function is strictly increasing for all values of x both smaller and larger than c so it
can’t be either maximum or a minimum point. Analogously, if f is strictly decreasing for
values of x both to the left and to the right of c, c cannot be either a maximum or a minimum
point.
y=x3
-30
-20
-10
0
10
20
30
-3-2
,8-2
,6-2
,4-2
,2 -2-1
,8-1
,6-1
,4-1
,2 -1-0
,8-0
,6-0
,4-0
,2 00,2 0,4 0,6 0,8 1
1,2 1,4 1,6 1,8 22,2 2,4 2,6 2,8 3
Serie1
53
Example 1: The average cost-curve! (See figure and derivative above!) We found that the
derivative of the AC-function equal to )(1
ACMCQ
which is zero where MC=AC, negative
to the left of this point, where MC<AC and positive to the right of it, where MC>AC.
Example 2. : Find and examine all stationary points of f if
f(x)=2x3-27x
2+84x-130
f’(x)=6x2-54x+84 = 6(x
2-9x+14)
f’(x) = 0 (x2-9x+14)=0
(x2-9x+14)=0 x=7 or x = 2
One method of finding the sign of a complicated function is to write it as the product of as
simple factors as possible. Then make a sign diagram which shows the intervals where each
of these factors are positive and negative, respectively. At a point where an odd number of
factors are negative, the product is negative. Where an even number of factors are negative,
the product is positive. Since 2 and 7 are zeroes of f’, f’(x) can be written as f’(x)=6(x-7)(x-2)
according to the factor theorem.
2 7
6 + + +
(x-2) - 0 + +
(x-7) - - 0 +
f’(x) + 0 - 0 +
f(x)
This function does not have any global maximum or minimum.
It has a local maximum for x=2, a local minimum for x=7
54
Figure f(x)=2x3-27x
2+84x-130
f’(x)=6x2-54x+84 f’’(x) = 12x – 54
To find the largest and smallest value of a (continuous) function in an interval [a,b] calculate
the value of f:
at all points in [a,b] where f'=0
at all points in [a,b] where f' does not exist (where f is not differentiable).
at the endpoints a and b.
The biggest/smallest of these is the biggest/smallest value of f on [a,b].
-200
-180
-160
-140
-120
-100
-80
-60
-40
-20
0
-0,5
-0,2 0,1 0,4 0,7 1
1,3 1,6 1,9 2,2 2,5 2,8 3,1 3,4 3,7 44,3 4,6 4,9 5,2 5,5 5,8 6,1 6,4 6,7 7
7,3 7,6 7,9 8,2 8,5
x
y Serie1
-100
-80
-60
-40
-20
0
20
40
60
80
100
-2-1
,6-1
,2-0
,8-0
,4 00,
40,
81,
21,
6 22,
42,
83,
23,
6 44,
44,
85,
25,
6 66,
46,
87,
27,
6 88,
48,
89,
29,
6 1010
,410
,8
Serie1
-100
-50
0
50
100
150
200
250
-2-1
,6-1
,2-0
,8-0
,4
6,38
4E-1
60,
40,
81,
21,
6 22,
42,
83,
23,
6 44,
44,
85,
25,
6 66,
46,
87,
27,
6 88,
48,
89,
29,
6 1010
,410
,8
x
y Serie1
55
Example 1 : Find the smallest and largest value of
f(x)=2x3-27x
2+84x-130 in the interval [1, 5]
1. Stationary points. x=2 and x=7 but 7 is not in [1, 5].
f(2) = 223-272
2+842-130=16-108+168-130= -54
2. Points where f is not differentiable? Polynomials are always differentiable!
3. Endpoints: f(1)=2-27+84-130=-71
f(5) =250-675+420-130=-135
Largest value: f(2) = –54 and smallest vaue f(5) = -135
Example 2 Profit maximization.
Assume that the profit of a firm is given by the differentiable function Π(Q).
Π(Q) = R(Q) – C(Q) 0≤ Q ≤ Qmax
Q- quantity produced R – revenue C – cost
Qmax – maximum capacity
Π’(Q) = R’(Q) – C’(Q)
Π’(Q) = 0 R’(Q) – C’(Q) = 0 R’(Q) = C’(Q)
If there is a quantity that maximizes profit it is either:
zero
the maximum capacity
a quantity for which MR = MC (marginal revenue = marginal cost).
Higher order derivatives
The derivative f’ of the function f is also a function.
If f’ is differentiable, its derivative is called the second derivative of f and written as f’’.
If the second derivative is differentiable its derivative is called the third derivative and
written as f(3)
and so on.
Example: f(x)=2x3-27x
2+84x-130
f’(x)=6x2-54x+84 f’’(x) = 12 x – 54 f
(3)(x) = 12
f(4)
(x) = 0 f(5)
(x) = 0 f(6)
(x) = 0*
* As you can see all the derivatives of order four and higher are zero for every value of x. (They are said to be
identically zero.) This means that they are all equal to the constant function y(x) = 0, whose graph is the
56
Convexity and concavity
The first order derivative (the ordinary derivative) shows how the function changes when the
variable changes. The second order derivative shows how the first derivative, the slope of the
function, changes. If, for example, the function represents the distance which a vehicle has
moved, as a function of time, the difference quotient when we compare two points in time,
shows the distance travelled during this time interval, divided by the time it has taken – in
other words, the average speed of the vehicle. The derivative at a particular time t
corresponds to the velocity of the vehicle at that moment. The second derivative represents
the change in the derivative, in this example, the change in velocity – that is to say the
acceleration (or retardation) of the vehicle.
The second derivative indicates how the slope of the graph changes and therefore tells us
something about the shape of the graph.
Let f be twice differentiable in the interval [a,b] (i.e. f’’(x) exists for all x in the interval).
If f''(x) ≥ 0 for all x in [a,b] then f is convex in [a,b]
If f''(x)≤ 0 for all x in [a,b] then f is concave in [a,b]
(If nothing else is said, convex/concave is understood to mean convex/concave to the origin.)
If f''(x) = 0 for all x in [a,b] ? Since f’’ is the derivative of f’ and f’’=0 for all x in the interval,
f’ must be constant. But if f’ – the slope of f – is constant, then f must be a linear function.
Thus, a function is both convex and concave in an interval if and only if it is linear in the
interval.
If f''(x) > 0 for all x in [a,b] then f is strictly convex in [a,b]
If f''(x) < 0 for all x in [a,b] then f is strictly concave in [a,b]
horizontal axis. It does not mean that these derivatives don’t exist! Every polynomial is differentiable any
number of times.
57
A convex function:
(with some of its tangents)
As x increases from left to right, the graph changes from “sloping steeply downwards to the
right” to “sloping downwards to the right but not so steeply”, to flat at the minimum point, to
“sloping upwards to the right but not steeply”, to “sloping steeply upwards to the right”. The
slope of the graph and of its tangents increases from "large negative" to "small
negative" to "small positive" to "large positive".
A concave function
(with some tangents)
The slope of the tangents (the derivative) is decreasing
A convex/concave function can be either increasing or decreasing
convex & increasing convex & decreasing
58
concave & increasing concave & decreasing
Note: A function can be convex in one interval and concave in another.
Where a function is strictly convex:
Tangents at all points of the graph are below the graph.
Every line from one point on the graph to another point on the graph (secant) is above
the graph.
If the function has a local extreme point, it must be a local minimum.
To understand the first, start from a point c on the graph. (For simplicity, assume that the
function is increasing – the reasoning is analogous but less simple if it is decreasing*.) Follow
the tangent at that point rightwards. The slope of the tangent is f’(c). But f’’>0 at c and at all
points to the right of c. So if you follow the graph instead, the slope starts at f’(c) and gets
bigger and bigger. You can think of the slope of the linear tangent as the velocity of a car,
which is going at a constant pace, and the slope of the graph with a positive second derivative
as the velocity of a car that is accelerating. If they have the same speed to begin with, the
accelerating car must be getting ahead of the car, which keeps going at the constant speed.
The graph must be going more steeply upwards than the tangent.
Proofs of the other two are too complicated for this course, those who are interested are
referred to a text book in calculus.
* If the function is decreasing and you want to keep the car-metaphor, the car has a negative velocity - you have
to think of it as reversing. If the second derivative is positive the velocity is increasing. But when a negative
number increases, it gets “smaller negative”, the “graph car” is reversing but more and more slowly while the
“tangent car” keeps reversing at a constant speed and gets further behind on the road.
59
Where a function is strictly concave:
Tangents at all points of the graph are above the graph.
Every line from one point on the graph to another point on the graph (secant) is below
the graph.
If the function has a local extreme point, it must be a local maximum.
A point where the function changes from convex to concave (or from concave to convex) is
called an inflection point.
For a twice differentiable function, an inflection point is where f’’ is zero and changes sign.
Example: f(x)=x4 and g(x)=x
3
f'(x)= 4x3 and g'(x)=3x
2
f''(x)=12x2 and g''(x)=6x.
f’’(0) = g’’(0) = 0 but only g’’ changes sign. f’’ is positive both for small negative and for
small positive numbers.
g’’(x) = 6x - 0 +
f’’(x) = 12x2
+
0
+
x=0 is an inflection point of y=x3 but not of y=x
4.
x=0 is also a stationary point of both y=x3 and y=x
4 Thus, it is a stationary point as well as an
inflection point of y=x4. But an inflexion point does not have to be stationary, just as a
stationary point does not have to be an inflexion point. For example, x=1 is an inflexion point
of the function y = x3-3x
2 but it is not a stationary point. (Check both statements as an
exercise!)
60
Second order-conditions for maximum/minimum:
If f is twice differentiable in an interval I and c is a point inside I (not an end point) and
f'(c)=0 then:
f''(c)<0 c is a local maximum
f''(c)>0 c is a local minimum
If f''(c)=0 too, c may be a local minimum, local maximum or an inflection point.
The second derivative helps us determine the character of a stationary point, c.
Intuitively: Assume that f is twice differentiable and f’’> 0 on both sides of c.
f''>0 means that f' is strictly increasing.
If f'(c) = 0 and f' is strictly increasing f' must be less than zero (f decreasing) for values of x a
little smaller than c (to the left of c). And f' must be larger than f'(c)=0 to the right of c (f
increasing). But that means that c is a local minimum.
Analogously, if f’’<0 on both sides of c, c is a local maximum.
c
f’’ > 0 > 0
f’ 0 (and )
f’ < 0 > 0
f Min.
61
Example 1: Let x
exxf2
)( Does it have any local maxima or minima?
Let g(x) = x2
and h(x)=ex. Then f=gh and.g'(x) = 2x and h'(x)= e
x. According to the product
rule for derivatives:
xexx
xexx
xex
xxe
xhxgxhxgxf
)2()2
2(2
2
)(')()()(')('
f'(x)=0 x=0 or 2+x= 0 or ex=0 x=0 or x= -2
f’(x)=u(x)v(x) where. 2
2)( xxxu and x
exv )(
xexx
xexx
xex
xvxuxvxuxf
)2
42()2
2()22(
)(')()()(')(''
021)002(0
)2
0042()0('' ef
x = 0 is a local minimum.
02
22
)482(2
)2
)2()2(42()2(''
eeef
x = -2 is a local maximum
As an exercise, show this using a sign diagram!
Example 2: f(x)=2x3-27x
2+84x-130
f’(x)=6x2-54x+84 f’’(x) = 12 x – 54
We have found that f’(x) = 0 implies x = 2 or x = 7
f’’(2) = 24 – 54 = -30 < 0 x = 2 is a local maximum
f’’(7) = 84 – 54 = 30 > 0 x = 7 is a local minimum
Inflection points? 12x -54 = 0 x = 4.5
x<4.5 f’’< 0 and x>4.5 f’’>0.
x = 4.5 is an inflection point. (As we see, an inflection point doesn’t have to be a stationary
point.)
Example 3. Assume that the owner of a forest wants to determine when to cut the wood. If
he does it today he gets K SEK K>0. If he waits t years the value will be V=Ke√t
. On the
other hand, when he waits he looses interest the interest that he gets when the wood is sold.
Discounting to present value the value of cutting at time t is
62
t
t
r
ketV
)1()(
Method 1: Differentiate directly using the quotient rule and the chain rule.
Method 2: Use the logarithm
We will use Method 2. The logarithm is an increasing function.
a > b ln a > ln b.
The value of t that maximises lnV(t) also maximises V(t) and vice versa.
))1(ln(4
1
)1ln(
12
)1ln(2
10)('
)1ln(2
1)('
)1ln(ln)1ln(lnlnln)(
2rt
rt
rt
tY
rt
tY
rttKreKVtY tt
Is it a max or
min? 0
4
1)(''
23
t
tY
What we have found is a maximum point.
63
PART 4. FUNCTIONS OF MORE THAN ONE VARIABLE
n-dimensional space
In economics, as in all social sciences, practically all phenomena we want to study depend on
many more factors than one. To use functions of one variable in a model, we must be sure
that it is meaningful and reasonable to disregard all exogenous variables except one, or to
keep them constant. But very often this is not the case and we have to model economic
relations as multivariate functions. For instance, consumers with high income may not only
buy different quantities of a particular good at each price, than consumers with low income. It
may also be that their demand curve has a different slope.
Example: Assume that demand, q, for a good depends both on its price, p and on the
consumers’ income, y. This can be written as
q=q(p, y)
and is read as ”q is a function of the ordered pair (p, y)”.
If demand for the good is a function of its own price p1 and the prices of n-1 other goods, and
we call the prices of the other goods p2, p3, …,pn, then q may be written as:
q=q(p1, p2, …,pn)
”q is a function of the n variables p1, p2, …,pn”
” q is a function of the ordered n-tuple (p1, p2, …,pn)”
(”q is a function of the (n-dimensional) vector p=(p1, p2, …,pn)”)
Level curves
An ordered pair of real numbers can be seen as a point in two-dimensional system of
coordinates.
A function of one variable can be illustrated by a graph (a line) in two dimensions.
A function of two variables can be illustrated by a graph (a surface) in three dimensions but
also by a two-dimensional representation by using level curves.
Definition Let the function f be defined as z=f(x, y).
For each number k in the range of f, the corresponding level curve consists of all the points
(x, y) such that f(x, y) = k.
64
Examples: Altitude on maps, isobars on weather maps, isocost curves, indifference curves,
isoquants.
Three level curves of
the utility function U(x, y)
where x and y denote
quantities consumed of two
different goods.
Examples
1. Let G(x, y) = x2y – 2y
What is the value of G for x=2 and y= 4?
Answer: G(2, 4) = 22*4-2*4 = 4*4 – 8 = 8
2. Let utility 31
21
),( yxyxU where x and y are the quantities consumed of two goods.
Which of the following three “consumption baskets” gives the consumer the highest utility?
x=25 y=8
x = 4 y = 125
x = 12.25 y= 27
Answer: U(25; 8) = 5*2 =10 U(4, 125) = 2*5 = 10 U(12.25, 27) = 3.5*3 = 10.5
The two first bundles are on the same indifference curve but (12.25, 27) is on a higher one.
(Remember that z = x1/2
z2 = x and z = y
1/3 z
3 = y)
3. Let yxF(x, y) ln
3
1ln
3
2
a) What is the domain of F?
b) Determine and draw the level curve F(x,y)=0.
Answer: F is defined for all (x, y) such that ln x and ln y exist so the domain is all
(x, y) such that x>0 and y>0.
For x>0 and y>0
3
1
3
2
3
1
3
2
lnlnlnln3
1ln
3
2yxyxyx
ln u = 0 if and only if u=1.
65
for x>0.
The function 2
1
xy
4. The point (2, 4) is located on a level curve, of the function G in example 1, which
corresponds to the value 8. What other points are on this level curve? What is the shape of the
level curve?
Answer: On the level curve x2y – 2y = 8. Therefore,
)2(
88)2(
2
2
xyyx for
x≠√2
2
23
3
3
1
3
2
3
1
3
21
1110),(x
yyxyxyxyxF
0
0,5
1
1,5
2
2,5
3
3,5
4
4,5
Serie1
The level curve G=8
-30
-20
-10
0
10
20
30
40
-4,5 -3,9 -3,3 -2,7 -2,1 -1,5 -0,9 -0,3 0,3 0,9 1,5 2,1 2,7 3,3 3,9 4,5
The level curve G=8
66
Partial derivatives
Taking partial derivatives
Let f be a function of two variables defined in a point (a, b).
Keep y=b fixed but allow x to vary. Then we can interpret the function as a function of only
x, given that y=b. (y is treated as a parameter.)
Choose a value x=a+h where h is near zero.
If the difference quotient has some limit when h→ 0, we say that f
is differentiable with respect to x at (a,b) and the limit is called the partial derivative of f
with respect to x at (a,b).
Analogously, h
bafhbaf
h
),(),(lim
0
is called the partial derivative of f with respect
to y at (a, b). (If the limit exists.)
Thus, the procedure for taking partial derivatives is the same as for ordinary derivatives – but
when partially differentiating w. r. t. x, one treats y as a constant, and vice versa.
In a 3-dimensional system of coordinates, the graph of the function is a surface and the partial
derivative of f w. r. t. x at (a, b) is the vertical slope (“upwards slope”) of the surface when
you move along it from (a,b) parallel with the x-axis. (Or along the tangent plane of the
surface at (a, b).
NOTE: Like derivatives of functions of one variable, partial derivatives are functions. Both
the partial derivative w. r. t. x at the point (a, b) and the partial derivative w. r. t. y at the point
(a, b) depend on the two values a and b.
h
bafbhaf ),(),(
67
Notation: The partial derivative of f w. r. t. x can be written as fx
'
or f'
1 or
x
f
and the
partial derivative of f w. r. t. y as fy
'
or f'
2 or
y
f
.
Example 1: Let 23),( yxyxyxf
Find the partial derivatives with resp. to x and y at the points (2, 1), (2, 2) and (1, 2).
yx
f
3 413)1,2(
x
f 523)2,2(
x
f
yxy
f2
4122)1,2(
y
f 6222)2,2(
y
f
If f is a function of more than two variables:
Let z=f(x1, x2,….,xn) be defined at x1=a1, x2=a2,…., xn=an. If the limit
h
aaaaaafaahaaaafniiiniii
h
)...,,...,()...,,...,(lim
1,1211,121
0
exists it is called the
partial derivative of f with respect to xi at (a1, a2, …, an)
Don’t forget that the partial derivative of f with respect to xi at (a1, a2, a3…., an) is a function of
all the n variables x1, x2, x3…., xn and therefore depends on all the n values a1, a2, a3…., an.
Example 2: z = xt + 3y
2t
2
1
3)(ln
6
yxxt
z
tyy
z
txx
z
t
t
Example 3: Partial derivatives of the Cobb-Douglas production function Q = AKL
LAKK
Q 1
1
LAKL
Q
68
As with derivatives of functions of one variable, we can differentiate partial derivatives to get
higher order partial derivatives.
If z=f(x, y) there are four second order partial derivatives: 2
222
2
2
,,,y
z
xy
z
yx
z
x
z
or
'''''''' ,,,yyyxxyxx
ffff
or ''
22
''
21
''
12
''
11,,, ffff
Example 4: Second order derivatives of Q(K, L) = AKL
LAKK
Q 1
1
LAKL
Q
11
2
''
2
2
2
''
11
2
''
2
2
2
''
´
)1(´
´
)1(´
LAKK
Q
LKL
LAKK
Q
KK
LAKL
Q
KLK
LAKL
Q
LL
KL
KK
LK
LL
Note that the two “mixed” derivatives are equal.
That is always the case if they are continuous (according to Young’s theorem).
The chain rule for functions of several variables and total derivatives
Example 1 z = xy where x = 3t and y = s2 – s
ydt
dx
x
z
t
z3
)12(
sx
ds
dy
y
z
s
z
In this example, using the chain rule for the function very similar to doing it for a function of
only one variable. That is because y is independent of t and x is independent of s. If we
illustrate by a box diagram it looks like this:
t
s
x
y
z
69
Example 2 Write GNP as Y = Y(I) where investment is I =I(r) where r is the rate of interest.
Y(I(r)) is a composite function which can be illustrated by a box diagram. (In this model
everything else that has an impact on Y is assumed to be constant.)
Chain rule: dr
dI
dI
dY
dr
dY
If we extend the model to allow Y to be determined by both investment and consumption?
The derivative of Y w.r.t. (with respect to) r is now a partial derivative:
dr
dI
I
Y
r
Y
But what if C = C(r) (that is, if consumption is also a function of r, perhaps because of its
impact on housing costs)?
r determines Y “through two channels”, I and C and the total impact is the sum of the two
partial ones.
dr
dC
C
Y
dr
dI
I
Y
dt
dY
The total derivative of Y w. r. t. r
r I Y
r
C
Y
r
I
C
Y
I
70
More generally:
Let z=z(x, y) where x=x(t) and y=y(t).
The total derivative of z w. r. t. t is
Example: Let
Find the total derivative when z=F(x,y), x=e3t
and y = e-3t
Solution: The relations can be illustrated with a box diagram
The total derivative is dt
dy
y
z
dt
dx
x
z
dt
dz
xx
z 1
3
2
yy
z 1
3
1
t
edt
dx 33 t
edt
dy 33
11231
3
13
1
3
23
1
3
13
1
3
2 3
3
3
3
33
t
t
t
t
tt ee
ee
ey
exdt
dy
y
z
dt
dx
x
z
dt
dz
dt
dy
y
z
dt
dx
x
z
dt
dz
yx F(x, y) ln3
1ln
3
2
dt
dz
y
t
x
z
71
A special case of the chain rule
which is important in many economic applications:
Assume that z=f(x, y(x))
The total derivative of z with respect to x is:
''
2
'
1
''' yzzyzzdx
dy
y
z
x
z
dx
dzyx
Example: Take a utility function U(x, y(x)) and a level curve U=k. (k is some constant
number.) Suppose that the level curve has the shape that indifference curves are usually taken
to have in economics. It is enough to assume that the marginal utility functions are strictly
positive and strictly decreasing. (Examples of such utility functions are the Cobb-Douglas
functions.) Then for a given value of x, x0>0 there cannot be more than one point on the level
curve with the x-coordinate x0 . Therefore there can only be one value of y, say y0, such that
(x0, y0) is on the indifference curve. The same reasoning can be applied to any positive
number x, for each x there is only one y such that (x, y) is on the indifference curve and we
can define a function y(x) by saying that “y(x) is the value of y for which U(x, y) = k”.
y
x
The graph can be interpreted as ”an indifference curve of U(x, y)” but also as ”the graph of a
function y(x)”.
x
y
z
72
Thus, we have defined a function y(x) such that U(x, y(x)) = k and we can write U(x, y(x)) on
the indifference curve. Therefore, on the indifference curve U can be seen as a constant
function which depends only on the variable x.
Take the total derivative of U w.r.t. x on the level curve U(x, y)= k
'' '2
'1
'' yUUyUUdx
dy
y
U
x
U
dx
dUyx
But
0dx
dU since U = k, constant for (x, y) on the indifference curve.
This implies that
2
1
'
2
'
1
'
2
'
1
''
)('
0''
MU
MU
U
Uxy
yUUyUUyx
which is the marginal rate of substitution,
MRS, between the goods 1 and 2 at this point on the indifference curve.
Example. Let
4
1
2
1
4),( yxyxU What is the value of U and what is MRS when x=16 and
y=81?
Answer: 4834481164)81;16( 4
1
2
1
U
8
81
16
812
22
1
2
4
14
2
14
11)
4
3(
4
1
2
1
2
1
4
3
2
1
4
1
2
1
'
'
x
yyxyx
yx
yx
U
UMRS
y
x
If we solve for y on the indifference curve we have
73
8
81
4
32
4
342
4
342)16('
2)('
1248
1
4
1
484
2
4
6
44
32
44
3
4
2
4
2
1
2
1
4
1
2
1
4
1
12
12
y
xxy
xy
xx
y
Uxy
which confirms that the slope of the indifference curve is equal to the MRS.
74
Total partial derivatives
Taking total derivatives means adding all the different ways in which one variable impacts on
a function.
A partial derivative measures the effect of a change in one variable when there are also other
variables than this that determine the value of the function. The opposite of “a partial
derivative” is “an ordinary derivative”, not “a total derivative”.
Total derivatives can be either ordinary or partial.
Example: Y = Y(C, I, G) and C = C(r, G) and I = I(r) where
Y = GNP, C = aggregate consumption, I = investment, G = public expenditure, r = the rate of
interest
The total derivative of Y w.r.t. r must include both the effect through I and through C. But it
is still a partial derivative since Y depends also on G, which is not a function of r.
r
C
C
Y
dr
dI
I
Y
r
Y
The derivative of Y w. r. t I is a partial derivative because Y also depends on C and G.
But note that the derivative of I w. r. t.is an ordinary derivative, since I is determined
exclusively by r while the derivative of C w. r. t. r is partial since C depends on both r and G.
The total derivative of Y w. r. t. G is G
C
C
Y
G
Y
C
Y
r
G
I
C Y
75
Optimisation of functions of several variables
Example: Assume that a firm produces two goods.
QB1B = the quantity of good 1 QB2B = the quantity of good 2
Π(QB1B, QB2B) is the firm’s profit function
1. Assume that there is some choice of production, a combination ),( *2
*1 QQ such that
),(),( 21*2
*1 QQQQ for all combinations (QB1B, QB2)B that it is possible for the
firm to produce and that the firm is not operating at its limit of capacity when producing
),( *2
*1 QQ .
2. Assume that both partial derivatives of Π exist at ),( *2
*1 QQ .
3. Define a function ),()( *2QQQP
In other words, P is equal to the firm’s profit as a function of the production of good 1 when
production of good 2 is held constant at the level Q2*. Since Q2 doesn’t vary, P is a function
of Q1 only, that is to say, only of the level of production of good 1.
According to the definition of a partial derivative ),()( *2
'1
' QQQP
P(Q) must take its maximum value when *1QQ because if )()( *
1QPQP then
),(),( *2
*1
*2 QQQQ which contradicts the assumption that ),( *
2*1 QQ is the maximum
point of Π.
But P is a function of one variable, it is differentiable and takes its maximum value at a point
*1Q which is not an end point of the interval where P is defined. Therefore *
1Q must be a
stationary point of P:
0),()( *2
*1
'1
*1
' QQQP
In the same way, one can show that 0),( *2
*1
'2 QQ
76
IF F IS A DIFFERENTIABLE FUNCTION OF N VARIABLES, A LOCAL
MAXIMUM OR MINIMUM POINT OF F IS A STATIONARY POINT OF F.
A STATIONARY POINT OF A FUNCTION OF SEVERAL VARIABLES IS A POINT
WHERE ALL PARTIAL DERIVATIVES ARE ZERO SIMULTANEOUSLY.
Example: Find the stationary points of f when
f(x, y)=xP
2P+xy-x+yP
2P+4y-7
42),(
12),(
'
'
yxyxf
yxyxf
y
x
A stationary point is one where:
042),(
012),(
'
'
yxyxf
yxyxf
y
x
42
12
yx
yx
3
2
y
x
(2, -3) is the only stationary point of f.
If f is a function of n variables with a local extreme point in a (inner) point
a = (a1, a2, …,an) in its domain when at the point a either
at least one partial derivative of f does not exist
all n partial derivatives are zero
The last means that a=(aB1B, aB2B, …., aBnB) is a solution to the system of n simultaneous
equations:
These equations are called the first order (necessary)
conditions for an extreme point. (FOC).
0 ) (
.
.
0 ) (
.
.
0 ) (
1
a x
f
a x
f
a x
f
n
i
77
As for functions of one variable, the FOC are necessary conditions for a maximum or
minimum but not sufficient. A stationary point can be a local maximum, a local
minimum or a saddle point. To know if a point is a maximum, minimum or saddle point of
a differentiable function of several variables we need:
1. To know that it is a stationary point
2. To check second order conditions that involve all the second order derivatives,
including the mixed.
The second order conditions for functions of n variables are complicated to learn by heart
even for n=2 and it is not required for this course. What is required is to know that such
conditions exist, that they involve all n2 second order partial derivatives of the function and to
be able to look them up and apply them for functions of two variables, when it is needed.
Second order conditions for a function of two variables:
Assume that c = (c1, c2) is a stationary point of a function of two variables, f(x, y). (And
assume that all four second order derivatives exist and are continuous):
0''11 f and 2''
12''
22''
11 fff at c c is local minimum
0''11 f and 2''
12''
22''
11 fff at c c is local maximum
2''12
''22
''11 fff c is a saddle point
If 2''12
''22
''11 fff c can be either an extreme point or a saddle point.
*Footnote: 2''12
''22
''11 fff ''
11f and ''22f have the same sign so we could just
as well have written:
0''22 f and 2''
12''
22''
11 fff at c c is local minimum
0''22 f and 2''
12''
22''
11 fff at c c is local maximum
2''12
''22
''11 fff c is a saddle point
The first order and second order conditions together are sufficient conditions for
maximum or minimum.
78
In economic applications it is often reasonable to assume that functions are convex
everywhere (”bowl-shaped”) or concave everywhere (”bell-shaped”). This makes it easier to
find the optimum because it is only necessary to verify the first order conditions.
If f is convex in its whole domain, any stationary point is a global minimum.
If f is concave in its whole domain, any stationary point is a global maximum.
Example 1: f(x, y)=xP
2P+xy-x+yP
2P+4y-7
42),(
12),(
'
'
yxyxf
yxyxf
y
x
2
1
2
''
''''
''
yy
yxxy
xx
f
ff
f
2>0 and 2*2>1P
2P so (2, -3) is a minimum point.
Example 2: Price discrimination
A firm produces a good which is sold in two separate markets. The firm is not a price taker
and maximizes profit.
X = quantity sold in market 1
Y = quantity sold in market 2
P = price set in market 1
Q = price set in market 2
Demand in market 1 X=600-8P (1)
Demand in market 2 Y=360 - 4Q (2)
Cost of production: (3)
where Z=X+Y
Calculate prices, production and profits assuming:
a) the firm has to set the same price P in both markets
b) the firm is able to price discriminate
200224170 ZZC
79
Solution:
a) We get total demand by adding demand in the two markets. Adding the left side of
equation (1) to the left side of equation (2), and the right side of (1) to the right side of (2)1
we get:
X+Y=Z=960 - 12 P (4)
P=80 - Z/12 (5)
Total revenue (6)
Marginal revenue
(7)
Marginal cost:
(8)
MR=MC (9)
(9) Z=120. Z=120 and (5) P=70
400)20012012024
112070(12070)()()( YXCYXTRYX
b)
(10)
)(12
170)(2
24
1701 YXYX
X
CMC
In this case MRB1B≠ MRB2B
(1) XP 6008 8
600 XP
(2)
4
360 YQ
.
1 Since the LS of (2) is equal to the RS of (2), we have added the same amount to both sides of equation (1),
only expressed in two different ways.
12
280 ZZPZTR
680 ZMR
1270 ZMC
1270
680 ZZ
200224170 ZZC
2002)(241)(70 YXYXC
)(12170
2YX
YCMC
80
875
8
6002
1
XXX
XTR
.
and
To maximise profits, the firm must have MR=MC in each market/
)(12170
290
)(12170
475
YXY
YXX
X=60 Y=60 P=67,5 Q=75.
=TR(X+Y)-C(X+Y) = 8550-8000=550
*To check that this stationary point really is a maximum point, we use the 2nd
order sufficient
conditions. The partial derivative of w.r.t X is
The partial derivative of w.r.t Y is
12
5
1220))(
12
170(
290
22
YXYX
YMCMR
(after simplification)
12
52
2
YC
A<0 and 0144
1
72
5
12
1
12
5
6
12
2
BAC
The sufficient conditions for maximum are satisfied.
*Example 3: Least squares regression.
In an earlier example the wage of each individual was assumed to be a baseline wage, w0,
augmented by a certain percentage for each year of schooling, and some percentage for each
year of experience. This multiplicative model was equivalent to a linear model for the
4
290
4360
2YYYYQYTR
4
290
8
275 YYXXTR
475
1X
XTRMR
290
2Y
YTRMR
1265))(
12170(
4X - 75
1MC -
1MR YXYX
61
2
2
X
A12122
XYYXB
81
logarithm of the wage. Now, for simplicity, assume that we model the wage as a function
only of education. The predicted wage for individual i is given by where si is
this person’s years of schooling beyond compulsory school, α is the log of the wage that a
worker with only compulsory school would get and β-1 is the percentage increase in wage for
an additional year of schooling.
The model predicts that all workers with the same length of education would receive the
same wage. If this was true and we would plot wage and education for a number of
individuals, all observations would show as points on a straight line.
ln w
α+ βs
s
In reality, a lot of other factors, besides education, influence individual wages – firm,
industry, experience, tenure, gender, location and different abilities. Even if it were true that,
all else equal, a worker earns β-1 percent more if she or he has one year more of schooling,
all else isn’t equal when we compare different individuals. The plot won’t be a nice linear
graph, it will be a lot of points scattered over the page. But if there is an “all else equal”
linear relation the scattered points will be scattered around the linear graph.
The labour economist normally doesn’t know the true values of α and β. He or she knows the
wages and the level of schooling of a large number of workers and tries to answer the
question: Which linear equation – in other words which values of α and β - is closest to or
most likely to capture the real relation between wages and education?
(si; lnw i ) represents the real wage and schooling of individual i. (si ; α+βsi) represents
schooling and the wage predicted by the model. One good bet for α and β could be the pair a,
b which are such that if we calculate the distance di between (si; lnw i ) and (si ; a+bsi) for
each individual and add all those distances, we would get the smallest value possible. In other
words, we could solve an optimisation problem in two variables a and b:
Minimise Σ di = Σ(si; lnw i )- si ; a+bsi)
82
A better choice – because it has a number of nice statistical properties – is to minimise the
sum of the square of these distances2. According to Pythagoras theorem the distance between
the points (x1; y1) and (x2; y2) is
√ and the square
y
(x1 ;y1)
y1
y2 d
(x2 ;y2)
x1 x2 x
This makes our minimisation problem:
Find the values of a and b that minimise the sum
S(a, b) = (ln w1 – a – bs1)2+(ln w2 – a – bs2)
2+...+(ln wn – a – bsn)
2
As usual we take partial derivatives to find stationary points:
And solve for the values of a and b for which these partial derivatives are zero. To do this
with the algebra that is available to us in this course is, of course, possible, but it is quite
tedious and messy. It is much easier to do if one uses a more advanced mathematical
notation, vector and matrix algebra. Therefore we will not write the solution explicitly here.
(You will find it in textbooks in statistics and econometrics.)
2 For proof that the a and b that minimize the sum of squared distances give what is called a Best Linear
Unbiased Estimate of α and β, under certain assumptions, see any econometrics or statistics text book.
83
Optimisation under constraints:
In economics the problem is usually not to find the best solution that can be imagined but to
find the optimal choice under certain restrictions or constraints. The consumer who
maximises utility is constrained by not having an infinite amount of money, the worker who
chooses how many hours per week to work is constrained by not having an infinite amount of
time. The firm which maximises profits can be constrained by liquidity, by consumer
demand, by limited availability to inputs in the short run and so on. A typical economic
problem very often has the following mathematical form:
Find the largest/smallest value of f(xB1B, xB2B, xB3,....B, xBnB)
under the constraint that (subject to)
g(xB1B, xB2B, xB3,....B, xBnB)=c.
g(xB1B, xB2B, xB3,....B, xBnB)=c defines a level curve of g.
A typical example could be a consumer who maximises utility under a budget constraint. Let
U be a utility function which depends on the quantity consumed of two goods, x and y.
Assume that the prices of x and y are, respectively, px and py and that the consumer’s budget
is m kronas. The consumer obtains the greatest utility attainable by consuming quantities x
and y that solve the mathematical problem
Find the largest value of U(x, y)
under the constraint B(x, y) = pxx + pyy =m
In introductory microeconomics courses this problem is analysed graphically and the optimal
choice for the consumer is found to be the point of tangency, P, between the budget line and
an indifference curve.
84
P
The slope of the budget line is
y
x
p
p
since xp
p
p
mymypxp
y
x
y
yx
When we took the total derivative of U with respect to x on an indifference curve we found
that the slope of the indifference curve at the point P is equal to the marginal rate of
substitution:
y
x
MU
MUMRS
Intuitively, this can be explained by saying that the slope
shows how much of the two goods the consumer can exchange for each other without
experiencing a change in her level of utility. That proportion must be the reverse of the ratio
between the marginal utilities – if the marginal utility of a small unit of good x is twice as
large as the marginal utility of a small unit of good y, then the consumer will be indifferent to
an exchange of one unit of x for two units of y.
y
U
x
U
U
U
x
y x
y
x
when the changes in x and y approach zero.
The consumer attains the highest utility possible from her money if she consumes quantities
that are such that MRS is equal to the relative price. (Remember that marginal utilities – and
therefore also MRS – depend on the quantities consumed.) If one unit of x costs twice as
much as one unit of y and the consumer’s marginal utility from x is more than twice as large
as her marginal utility from a unit of y, she would gain from buying more of x and less of y.
Budget line
Indifference curves
Point of tangency P
85
If the MRS is less than two, she would increase her utility by giving up some x and buying
more y. Therefore the optimal choice must be the point P where the slope of the budget
function and the slope of the indifference curve are equal.
This condition can be formalized as y
x
y
x
p
p
MU
MU or as
yyy
Bx
B
y
Ux
U
since the partial
derivative of B with respect to x is px and the partial derivative of B with respect to y is py.
Back to the general problem:
Find the largest/smallest value of f(xB1B, xB2B, xB3,....B, xBnB)
under the constraint that (subject to)
g(xB1B, xB2B, xB3,....B, xBnB)=c.
The constraint g(xB1B, xB2B, xB3,....B, xBnB)=c means that we can choose only among those points that
are located on a particular level curve of the function g, the level curve where g is equal to c.
At the same time, every point has to be on some level curve of f. The problem is to find the
level curve for f which has some point in common with the level curve g(xB1B, xB2B, xB3,....B, xBnB)=c
and at the same time corresponds to the highest/largest value of f.
If f and g are functions of two variables we can illustrate graphically:
f(x, y)=z*
g(x, y)=c P
86
Suppose that we want to find a level curve of f which is as far away from the origin as
possible. By reasoning graphically, analogously to the argument in the utility maximisation
case, we can conclude that the optimal point cannot be one where g(x,y) intersects a level
curve of f. It would be possible to attain a point on a level curve of f which is further out.
The solution has to be a point where the level curves are tangent to each other. But if they are
tangent to each other, they have the same slope. We found the slope of a level curve of the
utility function by taking the total derivative. If we follow the same procedure with f and g
we find that
on a level curve of f and on a level curve of g
'
2
'
1
'
2
'
1
''
)('
0''
f
fxy
yffyff yx
'
2
'
1
'
2
'
1
''
)('
0''
g
gxy
yggygg yx
Since the slopes of the two level curves are the same at the point of tangency, the two
functions y(x) defined by the level curves must have the same derivative at that point.
Therefore '
2
'
1
'
2
'
1
g
g
f
f at the point which solves the constrained optimisation problem.
This is the idea behind the ULagrange method
The Lagrange method
To solve the problem: Find the largest/smallest value of f(xB1B, xB2B, xB3,....B, xBnB) under the
constraint (subject to) g(xB1B, xB2B, xB3,....B, xBnB)=c.
1. Write the Lagrange function
L(xB1B, xB2B, xB2,....B, xBnB, ) =
= f(xB1B, xB2B, xB3,....B, xBnB)-( g(xB1B, xB2B, xB3,....B, xBnB)-c)
2. Calculate all n+1 1st order partial derivatives.
87
3. Set up the system of n+1 equations (the First Order Conditions, FOC)
0),...2,1(
0
.
.
.
0222
0),...2,1(1
),...2,1(1
) ,n x..., ,2 x,1(x1
cnxxxgLnxg
nxf
nxL
xg
xf
xL
nxxxxg
nxxxxf
xL
and find all solutions – in other words, all the stationary points of L
4. Check points where the method may not work.
Points where g(xB1B, xB2....B, xBnB)=c and 0' ig for all i=1, 2,...n
Points where g(xB1B, xB2....B, xBnB)=c but some partial derivative of g or of f is not defined or
not continuous.
If there is a solution to the problem, it will be a point that you find in step 3 or step 4.
Justification for the method in the two-variable case.
Why does the Lagrange method work? Why do we find the constrained optimum of one
function by looking for a stationary point of another function? For functions of more than two
variables, the proof is complicated but for functions of two variables it is not so hard to see
that the Lagrange method is a way of finding exactly those points where '
2
'
1
'
2
'
1
g
g
f
f .
L'BxB and L'ByB=0
0)('
)('
0)('
)('
PygPyf
PxgPxf
)(')('
)(')('
PygPyf
PxgPxf
the level curves have the same slope-
)('
)('
)('
)('
)('
)('
)('
)('
Pyg
Pxg
Pyf
Pxf
Pyg
Pyf
Pxg
Pxf
88
Example 1. A consumer has the utility function U=4x P
0.5PyP
0.25
The price of x is 2.5 and the price of y is 4. The consumer’s income is 50. What choice of
consumption maximizes utility?
Solution: The problem can be written as:
Maximise 41
21
4),( yxyxU subject to 2.5x+4y = 50
The Lagrangefunction is : )5042
5(4),,( 4
12
1 yxyxyxL
Its partial derivatives: First order (necessary) conditions
5042
5
44
14
2
5
2
14
43
21
41
21
yxL
yxy
L
yxx
L
)3(
)2(
)1(
5042
5
4
2
52
43
21
41
21
yx
yx
yx
)6(
)5(
)4(
(4) 41
21
5
4yx
and (5) 4
32
1
4
1 yx
xyyxyx
5
16
4
1
5
4 43
21
41
21
Substituting this into (6) (the constraint) we get y = 25/6 and x = 40/3
To check that the method works, we also calculate the MRS. For any (x,y)
x
yyxyx
MU
MUMRS
yxMUy
U
yxMUx
U
y
x
y
x
22
2
43
21
41
21
43
21
41
21
At the point which satisfies the FOC: y
x
p
pMRS
8
5
40
3
12
502
MRS = the slope of the indifference curve
(Minus) the price ratio = the slope of the budget constraint.
89
Example 2. Use the Lagrange-method to solve the problem:
Find the smallest value of f(x, y) = x P
2P + xy + yP
2P subject to
g(x, y) = x + 2y=6
Solution: The Lagrange function is L(x, y, λ) = xP
2P + xy + yP
2 – λ(x + 2y-6)
Partial derivative FOC
w.r.t.. x 2x+y-λ 2x+y = λ (1)
w.r.t. y x+2y-2λ x+2y=2λ (2)
w.r.t. λ -x - 2y+6 x + 2y = 6 (3)
(1) and (2) imply that 4x + 2y = x + 2y which, in turn, implies that x = 0. Inserting this
value into (3) shows that y = 3.
An alternative method of solution if the objective and constraint functions are ”reasonably
simple” is substitution. In this example, the only permitted solutions are points where
x+2y=6 x = 6 – 2y. Substituting this into f gives us (6-2y)2 + (6-2y)y + y
2 which is a
function of only one variable. Let
h(y) = (6-2y)2 + (6-2y)y + y
2=36-24y+4y
2+6y-2y
2+y
2=36-18y+3y
2
h’(y) = -18+6y and h’(y) = 0 y=3
y = 3 and x = 6 – 2y x = 0.
h’’(y) = 6 > 0 so this does indeed give us the smallest value of f subject to the constraint.
Example 3 A firm produces two goods in quantities X and Y. Its cost function is
C(X, Y) = 10X + XY + 10Y
and the prices P and Q it can charge are
P = 50 - X + Y (1)
Q = 30 + 2X - Y (2)
The firm is committed to delivering a total of 15 units. Thus:X + Y = 15 (3)
How much should the firm produce of each good to maximize profits?
(It is enough to find the FOC).
Maximise (X,Y)
s. t. X+Y=15
90
Total revenue is TR=PX+ QY =(50-X+Y)X+(30+2X-Y)Y =50X-XP
2P+30Y+3XY-YP
2P
Profit is:(X,Y)=TR(X,Y)-C(X,Y)=
=50X-XP
2P+3XY+30Y-YP
2P-10X-XY-10Y =40X-XP
2P+2XY+20Y-YP
2
The Lagrange function is
L(X, Y; ) =40X-XP
2P+2XY+20Y-YP
2P - (X + Y - 15)
The FOC are
015),,(
02220),,(
02240),,(
''
''
''
YXYXL
YXYXL
YXYXL
y
x
The only solution is X=10, Y=5 (=30). The largest value of is 400-100+100+100-25=475
Here it is also possible to use substitution of Y = 15 –X into (X,Y) as an alternative method
of solution.
Let F(X) = 40X – X2 + 2X(15-X)+20(15-X) – (15-X)
2= 80X-4X
2+75=475
F’(X)=80-8X has the zero X=10 which implies that Y = 15-10 = 5 and F(10) = 475.
Since Y’’(X)= -8<0 this is a maximum.