Chapter-4_Functions_of_Several_Variables
Chapter-4_Functions_of_Several_Variables
Ephrem Andargie
October 4, 2023
Figure
Example
Consider the function f that, to every pair of numbers (x, y), assigns the
number 2x + x2 y 3 . The function f is thus dened by
f (x, y) = 2x + x2 y 3
What are f (1, 0), f (0, 1), f (−2, 3), and f (a + 1, b)?
Example
A function of two variables appearing in many economic models is
Usually, we assume that F is dened only for x>0 and y > 0. Then F is
generally called a Cobb-Douglas function.
The Cobb-Douglas function is most often used to describe certain
production processes. Then x and y are calledinput factors, while F (x, y)
is the number of units produced, or the output. Also, F is called a
production function.
Example
Determine the domains of the functions given by the following formulas,
xy -plane.
then draw the sets in the
√ √
(a) f (x, y) = x − 1 + y
2 p
(b) g(x, y) = 2 2 1/2
+ 9 − (x2 + y 2 )
(x + y − 4)
¦
¥ £
Í
ð
Ü §
¨
Denition 4.2
The level curves of a function f of two variables are the curves with
equations f (x, y) = k , where k is a constant (in the range of f ).
¦
ìë
¨ §
µãìë
µãìð
µãíë
µãíð
µãîë
µãîð
Example
Consider the function of two variables dened by the equation
z = x2 + y 2 (1)
What are the level curves? Draw a set of level curves in the xy -plane.
Example
Consider the function of two variables dened by the equation
z = x2 + y 2 (1)
What are the level curves? Draw a set of level curves in the xy -plane.
Solution
The variable z can only assume values ≥ 0. Each level curve has the
equation
x2 + y 2 = k
for some k ≥ 0. We see that these are circles in the
√ xy -plane centered at
the origin and with radius k. Figure
§ ¦
½k ë
½k ì
½k í
½k î
½k ï
§
¨
Example
Suppose F (K, L) denotes a rm's output, where K denotes capital input
and L denotes labor input. A level curve for the function is a curve in the
KL-plane given by
Given f (x, y), suppose we let only x vary while keeping y xed, say
y = b, where b is a constant.
g(a + h) − g(a)
fx (a, b) = g ′ (a) = lim
h→0 h
f (a + h, b) − f (a, b)
= lim (2)
h→0 h
f (a, b + h) − f (a, b)
fy (a, b) = lim (3)
h→0 h
If we now let the point vary in (2) and (3), fx and fy become
functions of two variables.
Iff is a function of two variables, its partial derivatives are the functions
fx and fy dened by
f (x + h, y) − f (x, y)
fx (x, y) = lim
h→0 h
f (x, y + h) − f (x, y)
fy (x, y) = lim
h→0 h
∂f ∂ ∂z
fx (x, y) = fx = = f (x, y) = = f1
∂x ∂x ∂x
∂f ∂ ∂z
fy (x, y) = fy = = f (x, y) = = f2
∂y ∂y ∂y
Example
1 If f (x, y) = x3 + x2 y 3 − 2y 2 , nd fx (2, 1) and fy (2, 1).
2 Find the partial derivatives of the following functions:
(a) f (x, y) = x3 y + x2 y 2 + x + y 2
xy
(b) f (x, y) = x2 +y 2
Figure: The partial derivatives of f at (x0 , y0 ) are the slopes of the tangents to
Kx and Ky .
If z = f (x, y), then ∂f /∂x and ∂f /∂y are called rst-order partial
derivatives.
These partial derivatives are, in general, again functions of two
variables.
From ∂f /∂x, provided this derivative is itself dierentiable, we can get
two new functions by taking the partial derivatives w.r.t. x and y .
In the same way, we can take the partial derivatives of ∂f /∂y w.r.t. x
and y .
The four functions we obtain by dierentiating twice in this way are
called second-order partial derivatives of f (x, y).
∂2f ∂2z
∂ ∂f
(fx )x = fxx = f11 = = =
∂x ∂x ∂x2 ∂x2
∂2f ∂2z
∂ ∂f
(fx )y = fxy = f12 = = =
∂y ∂x ∂y∂x ∂y∂x
∂2f ∂2z
∂ ∂f
(fy )x = fyx = f21 = = =
∂x ∂y ∂x∂y ∂x∂y
∂2f ∂2z
∂ ∂f
(fy )y = fyy = f22 = = =
∂y ∂y ∂y 2 ∂y 2
Example
Find the second partial derivative of
f (x, y) = x3 + x2 y 3 − 2y 2
Notice that fxy = fyx in the above example. This is not just a
coincidence.
∂2f ∂2f
=
∂x∂y ∂y∂x
Rn = |R × R ×{z· · · × R}
n−times
= {(x1 , x2 , . . . , xn ) : x1 ∈ R, x2 ∈ R, . . . , xn ∈ R},
Example
Find f1 , f2 , and f3 if f (x1 , x2 , x3 ) = 5x21 + x1 x32 − x22 x23 + x33 .
Example
Find the Hessian matrix of f (x1 , x2 , x3 ) = 5x21 + x1 x32 − x22 x23 + x33 .
dy = f ′ (x) dx (5)
Example
√
Find the dierential dy , given f (x) = x + 3.
Example
√
Find the dierential dy , given f (x) = x + 3.
Solution
dx
dy = f ′ (x)dx = √ □
2 x+3
Example
√
Find the dierential dy , given f (x) = x + 3.
Solution
dx
dy = f ′ (x)dx = √ □
2 x+3
Example
Compare the values of ∆y and dy if y = f (x) = x3 + x2 − 2x + 1 and x
changes (a) from 2 to 2.05 and (b) from 2 to 2.01.
Solution
(a) We have
f (2) = 23 + 22 − 2(2) + 1 = 9
f (2.05) = (2.05)3 + (2.05)2 − 2(2.05) + 1 = 9.717625
∆y = f (2.05) − f (2) = 0.717625
In general,
dy = f ′ (x)dx = (3x2 + 2x − 2)dx
When x=2 and dx = ∆x = 0.05, this becomes
Solution (continued )
(b)
When dx = ∆x = 0.01,
Example
(a) If z = f (x, y) = x2 + 3xy − y 2 , nd the dierential dz .
(b) If x changes from 2 to2.05 and y changes from 3 to 2.96, compare
the values of ∆z and dz .
Solution
(a) (6) gives
∂z ∂z
dz = dx + dy = (2x + 3y)dx + (3x − 2y)dy
∂x ∂y
∂f ∂f ∂f
dy = dx1 + dx2 + · · · + dxn
∂x1 ∂x2 ∂xn
n
X ∂f
= dxi (7)
∂xi
i=1
Hence, dy can in the nal analysis vary only with x. In view of this,
we have
∂(dz) ∂(dz)
d2 z = d(dz) = dx + dy
∂x ∂y
∂ ∂
= (fx dx + fy dy)dx + (fx dx + fy dy)dy
∂x ∂y
= (fxx dx + fyx dy)dx + (fxy dx + fyy dy)dy
= fxx dx2 + fyx dydx + fxy dxdy + fyy dy 2
= fxx dx2 + 2fxy dxdy + fyy dy 2 [fxy = fyx ] (8)
n
X
dy = f1 dx1 + f2 dx2 + · · · + fn dxn = fi dxi
i=1
n n
n X
∂ [ ni=1 fi dxi ]
X P X
2
d y= dxj = fij dxi dxj
∂xj
j=1 j=1 i=1
d2 y = dxT Hdx
dy = f ′ (x) dx
d2 y = f ′′ (x) dx2
They will, in this new context, be shaped like domes and bowls,
respectively. (See Figure )
Figure
dz = fx dx + fy dy
fx = fy = 0 (10)
At point C, both Tx and Ty have zero slopes, but this point does not
qualify as an extremum: Where as it is a minimum when viewed
against the background of the yz plane, it turns out to be a maximum
when looked at against the xz plan.
Figure
2
fxy 2
fxy
d2 z = fxx dx2 + 2fxy dxdy + dy 2 + fyy dy 2 − dy 2
fxx fxx
! !
f 2 f 2
2f xy xy xy
= fxx dx2 + dxdy + 2 dy 2 + fyy − dy 2
fxx fxx fxx
2 2
fxx fyy − fxy
fxy
= fxx dx + dy + (dy 2 )
fxx fxx
fx = fy = 0
2
fxx > 0 and fxx fyy − fxy >0 for a local minimum
2
fxx < 0 and fxx fyy − fxy >0 for a local maximum
Example
Find stationary values of f (x, y) = x2 + y 2 − 2x − 6y + 14, and determine
whether each stationary point is a local maximum, minimum, or saddle
point.
Example
Find stationary values of f (x, y) = x2 + y 2 − 2x − 6y + 14, and determine
whether each stationary point is a local maximum, minimum, or saddle
point.
Solution
The rst-order conditions are
fx = 2x − 2 = 0
fy = 2y − 6 = 0
These partial derivatives are equal to 0 when x=1 and y = 3, so the only
critical point is (1, 3).
Solution (continued )
The second-order partial derivatives are
Since fxx > 0 and fxx fyy − fxy2 = 4 > 0 for all x and y , the stationary
point (1, 3) yields a unique minimum of the function and the minimum of
the function is
∂z ∂z
dz = dx + dy
∂x ∂y
¦
ìë
¨ §
µãìë
µãìð
µãíë
µãíð
µãîë
µãîð
dy
Rearranging this equation gives us
dx :
The gradient of the level curve of the function z = f (x, y) at any point
(x, y) is given by:
∂z
dy fx
= − ∂x
∂z
=−
dx ∂y
fy
dy
Rearranging this equation gives us
dx :
The gradient of the level curve of the function z = f (x, y) at any point
(x, y) is given by:
∂z
dy fx
= − ∂x
∂z
=−
dx ∂y
fy
Example
The above Figure shows the function z = x2 + 2y 2 .
(i) Which level curve passes through the point where x=2 and y = 1?
At (2, 1), z = 6, so the level curve is x2 + 2y 2 = 6.
Example
(ii) Find the gradient of the isoquant at this point.
∂z ∂z
dz = dx + dy = 0
∂x ∂y
=⇒ 2x dx + 4y dy = 0
dy x
=⇒ =−
dx 2y
g(x1 , x2 ) = 0
Figure
The answer can be seen in Figure: (a) , but it emerges more clearly in
Figure: (b) .
The level curve labeled f∗ is clearly the highest level curve of f that
can be reached while remaining on the curve G, and so the point
(x∗1 , x∗2 ) is the solution to the problem: it gives the highest value of
the function consistent with satisfying the constraint.
The most obvious feature about the point (x∗1 , x∗2 ) is that it is a point
of tangency between the curve G and the level curve f ∗.
Given the shapes of the level curves of f and the curve G, it should be
clear that any solution to the problem must be at a point of tangency.
This could be tested by shifting the curve G slightly while keeping its
general shape.
dx2 f1 (x1 , x2 )
=−
dx1 f2 (x1 , x2 )
dx2 g1 (x1 , x2 )
=−
dx1 g2 (x1 , x2 )
Note that this is only one equation in two unknowns and so in itself
cannot give us a solution for the values x∗1 and x∗2 .
The second equation we need is given by the constraint
since if x∗1 and x∗2 are optimal, then they must be feasible and so
satisfy the constraint.
(11) and (12) taken together allow us to solve for the values x∗1 and
x∗2 .
∂L
= f1 (x∗1 , x∗2 ) + λ∗ g1 (x∗1 , x∗2 ) = 0
∂x1
∂L
= f2 (x∗1 , x∗2 ) + λ∗ g2 (x∗1 , x∗2 ) = 0
∂x2
∂L
= g(x∗1 , x∗2 ) = 0
∂λ
We have the three equations to solve for the three unknowns, x∗1 , x∗2 ,
and λ∗ .
The justication for the use of the Lagrange method is that these
x-values are precisely the solutions to the original constrained
maximization problem we are interested in.
Thus eliminating the Lagrange multiplier from the rst two conditions
in this way gives us the tangency condition, and then the third
condition is simply the constraint so that we can solve to obtain the
same solution as before.
Thus eliminating the Lagrange multiplier from the rst two conditions
in this way gives us the tangency condition, and then the third
condition is simply the constraint so that we can solve to obtain the
same solution as before.
Example
Solve the constrained maximization problem
max y = x0.25
1 x2
0.75
s.t 100 − 2x1 − 4x2 = 0
Thus eliminating the Lagrange multiplier from the rst two conditions
in this way gives us the tangency condition, and then the third
condition is simply the constraint so that we can solve to obtain the
same solution as before.
Example
Solve the constrained maximization problem
max y = x0.25
1 x2
0.75
s.t 100 − 2x1 − 4x2 = 0
Solution
The Lagrange function is
L = x0.25
1 x2
0.75
+ λ(100 − 2x1 − 4x2 )
Solution (continued )
and the rst-order conditions are
0.25x−0.75
1 x0.75
2 − 2λ = 0 (8)
−0.25
0.75x0.25
1 x2 − 4λ = 0 (9)
x2 = (3/2)x1
600 300
x∗1 = , x∗2 = □
48 16
Ephrem Andargie (AAUSC) Ch 4: Functions of Several Variables October 4, 2023 79 / 92
Constrained Optimization
Constrained Problems and Approaches to Solutions
In fact the level curve diagram looks just like that in the maximization
problem, the dierence being that the value of the function falls as we
move inward toward the point T.
Figure
Thus, exactly as before, we can show that the optimal point must
satisfy the tangency conditions
g1 (x∗1 , x∗2 ) = 0
Thus, exactly as before, we can show that the optimal point must
satisfy the tangency conditions
g1 (x∗1 , x∗2 ) = 0
Example
Solve the following constrained minimization problem:
1/2
min y = x1 + x2 s.t. 1 − x1 − x2 = 0
Solution
The Lagrange function is
1/2
L = x1 + x2 + λ(1 − x1 − x2 )
1 1
x∗1 = , x∗2 = , λ∗ = 1 □
4 2
Ephrem Andargie (AAUSC) Ch 4: Functions of Several Variables October 4, 2023 83 / 92
Homogeneous Functions and Euler's theorem
Denition 4.4 (Homogeneous Functions)
The function y = f (x1 , x2 , . . . , xn ) is said to be homogeneous of degree k
if
f (λx1 , λx2 , . . . , λxn ) = λk f (x1 , x2 , . . . , xn )
Example
Given the function f (x, y, w) = x/y + 2w/3x, if we multiply each variable
by j, we get
(jx) 2(jw) x 2w
f (jx, jy, jw) = + = + = f (x, y, w) = j 0 f (x, y, w)
(jy) 3(jx) y 3x
That is, the value of the function will not be aected at all by equal
proportionate changes in all the independent variables; the value of the
function is changed by a multiple of j 0 (= 1). This makes the function f a
homogeneous function of degree zero.
First-Order Condition
The Lagrangian function of this optimization model is
Lx = Ux − λPx = 0
Ly = Uy − λPy = 0
Lλ = B − xPx − yPy = 0
Ux Uy
= =λ (13)
Px Py
Ux Px
= (14)
Uy Py
dU = Ux dx + Uy dy = 0
Figure
On the other hand, the ratio Px /Py represents the negative of the
slope of the graph of the budget constraint.
B Px
y= − x
Py Py
Q = f (K, L)
Example
(a) What is the degree of homogeneity of the Cobb-Douglas production
function
Q = ALα K β
(b) Determine the degree of homogeneity for the following CES
production function
Q = A(αLθ + βK θ )1/θ