Multivariable Functions: CH 11.1-7, Excl 11.4

Download as pdf or txt
Download as pdf or txt
You are on page 1of 40

Multivariable functions

Ch 11.1–7, excl 11.4

Prof. Rowan Shi

Week 2
Outline

Functions with two arguments

Visualising
Surface plots
Level curves

Partial derivatives

With many arguments

2/24
Outline

Functions with two arguments

Visualising
Surface plots
Level curves

Partial derivatives

With many arguments


Functions with one argument Ch. 4

• reminder: a function is a rule that


assigns a value to an argument

• example: the welfare function u(x )


• takes the consumption amount x of
x u
some good
u(x) • returns the consumer welfare u(x )
given this consumption

• sometimes:
• argument is called independent or
exogenous variable
• value is called dependent or
endogenous variable

3/24
Functions with two arguments Ch. 11.1

• in general, economic variables (and many other real-world


outcomes) depends on multiple factors!

• for example: the quantity demanded for any good depends on


more than just price
• income
• quality of the good
• whether your friends like it
• ...

• we capture these more complex relationships with multivariable


functions

4/24
Functions with two arguments Ch. 11.1

x
• a function with two arguments takes
a pair (x, y ) and assigns value
f (x, y) f (x, y )
f
• now: the rule needs two inputs to
return one value
y

5/24
Functions with two arguments Ch. 11.1

• an important example: consumer welfare (utility function)


3 1
u(x, y ) = x 4 y 4

x amount of good 1 consumed


y amount of good 2 consumed
u the dependent variable: consumer welfare

• economic intuition: total consumer welfare now depends on


consumption of both goods

6/24
Outline

Functions with two arguments

Visualising
Surface plots
Level curves

Partial derivatives

With many arguments


Graphs Ch. 11.3

• with single-argument functions f (x ), we graph them to see. . .


• if f (x ) increases or decreases with x
• slopes and rates of change
• intercepts
• and more. . .

• would be useful for two-argument functions, like our example


• does welfare increase in x? y?
• what’s the maximum welfare?

• but: how do graph a two-argument function like f (x, y )?

7/24
Surface plots Ch. 11.3

• plotted: our welfare function


2

• goal: for each amount of good 1 x


and good 2 y, visualise welfare u
1.5
• the domain is 2D – imagine it like the
horizontal surface of a table
1
2
1.5 1.5 2
1 1
y x

partials

8/24
Surface plots Ch. 11.3

• let’s suppose we consume x = 1.1


2
of good 1 and y = 2 of good 2

1.5

1
2
1.5 1.5 2
1 1
y x

partials

8/24
Surface plots Ch. 11.3

• let’s suppose we consume x = 1.1


2
of good 1 and y = 2 of good 2

• locate the point in the domain


1.5

1
2
1.5 1.5 2
1 1
y x

partials

8/24
Surface plots Ch. 11.3

• let’s suppose we consume x = 1.1


2
of good 1 and y = 2 of good 2

• locate the point in the domain


1.5
• represent demand as the height
“above” the domain
1
2
2• welfare is around 1.25
1.5 1.5
1 1
y x

partials

8/24
Surface plots Ch. 11.3

• overall:
2
• in this picture, welfare is the highest
at x = 2, y = 2
• increases as x rises or y rises
1.5 does that make intuitive sense?

1
2
1.5 1.5 2
1 1
y x

partials

8/24
Surface plots Ch. 11.3

• overall:
2
• in this picture, welfare is the highest
at x = 2, y = 2
• increases as x rises or y rises
1.5 does that make intuitive sense?

• surface plot is like a piece of fabric


• as you move around in the domain,
1 the fabric curves around as the
2
1.5 1.5 2 function changes
1 1 • hard for non-machines to draw
y x
(e.g. me or you)
partials

8/24
Level curves Ch. 11.3

• easier for humans to draw and also inherently informative

• we can ask: for what consumption bundles (x, y ) is welfare 1?


3 1
u(x, y ) = x 4 y 4 = 1

1
• well, x = 1 and y = 1 gives us u = 1. . . so does x = 2 and y = 8

1
 
u(1, 1) = u 2, =
8

9/24
Level curves Ch. 11.3

y • we can plot the two points that we’ve


found where u(x, y ) = 1

1
1
8
1 2 x

10/24
Level curves Ch. 11.3

y u=1 • we can plot the two points that we’ve


found where u(x, y ) = 1

• continuing on, we can plot all (x, y )


pairs for which we get welfare u = 1

10/24
Level curves Ch. 11.3

y u=1 • we can plot the two points that we’ve


u=2 found where u(x, y ) = 1

• continuing on, we can plot all (x, y )


pairs for which we get welfare u = 1

• we can repeat for u = 2

10/24
Level curves Ch. 11.3

y u=1 • we can plot the two points that we’ve


u=2 found where u(x, y ) = 1
u=3
u=4 • continuing on, we can plot all (x, y )
pairs for which we get welfare u = 1

• we can repeat for u = 2

• and so on

10/24
Level curves Ch. 11.3

y u=1 • these level curves can also gives us


u=2 an idea of the function’s shape
u=3 • we know that on the u = 1 level
curve, the function is at height 1
u=4
• we know that on the u = 2 level
curve, the function is at height 2

• and so on, increasing as we go


northeast (increasing x and y)

• do these look familiar. . . ?


x

10/24
Level curves Ch. 11.3

• easier to draw and helps visualise the 3D surface plot

• observe: each level curve itself is a single-variable function in


(x, y ) space

• in many scenarios, we are also interested in the actual shape of


these level curves

• let’s try to understand what they mean together:


• what does the level curve 1 = u(x, y ) represent?
• why is the level curve decreasing?
• why does 2 = u(x, y ) lie above 1 = u(x, y )?

11/24
Outline

Functions with two arguments

Visualising
Surface plots
Level curves

Partial derivatives

With many arguments


Intuition Ch. 11.2

• we broadly claimed that u(x, y ) rises as consumption rises

• can we express this intuition formally with math?

• with single variable functions, we can use derivatives:


• the derivative f ′ (x ) is the instantaneous rate of change of f (x ) at x
• if f ′ (x ) > 0, the function is increasing at x
decreasing if f ′ (x ) < 0
• example: we expect u′ (x ) > 0

12/24
Intuition Ch. 11.2

• extending to two arguments f (x, y ). . .


∂f
∂x how f changes with x, holding y fixed

∂f
∂y how f changes with y, holding x fixed
see book for other ways to denote partial derivatives

• important differences to the single variable derivative:


• there are two partial derivatives, one for each independent
variable
• we use ∂ to denote partial derivative, emphasising that we hold
the other constant

• math version of ceteris paribus

13/24
Visually Ch. 11.3

• let’s consider this function: broadly,


8 it’s like a hill, reaching a high at (0, 0)

• what do the partial derivatives at the


4 indicated point mean?

• recall: there are now two


0
∂f ∂f
∂x ∂y
−4
2
0 2
0
−2 −2
y x

14/24
Visually Ch. 11.3

• for x. . .
8
• how the function changes as x
increases, holding y constant
4
• at this point: the function rises as x
increases and y is unchanged
0
∂f
(−1, −1.5) > 0
∂x
−4
2
0 2
0
−2 −2
y x

14/24
Visually Ch. 11.3

• for y. . .
8
• how the function changes as y
increases, holding x constant
4
• at this point: it also increases in this
direction!
0
∂f
(−1, −1.5) > 0
∂y
−4
2
0 2
0
−2 −2
y x

14/24
Visually Ch. 11.3

• the partial ∂x
∂f
(x0 , y0 ) has a natural
8 visual meaning

• stand at the point (x0 , y0 ), face in the


4 x direction (here, “east”)
• sign: does the ground slope
upwards or downwards?
0
• value: how steeply?

• for ∂y
∂f
(x0 , y0 ), face in the y direction
−4 (here, “north”)
2
0 2
0 • let’s try with utility
−2 −2
y x

14/24
Computing Ch. 11.2

• the partial in partial derivative precisely captures: how f changes


while moving only one of the variables (x or y)

• translated to math:
∂f
∂x take the derivative with respect to x, as if y is a constant

∂f
∂y take the derivative with respect to y, as if x is a constant

15/24
Partial derivatives: example Ch. 11.2

3 1
• welfare example: u(x, y ) = x 4 y 4

• there are two partial derivatives: ∂u/∂x and ∂u/∂y

• let’s try together: what’s the interpretation of each?


∂u
∂x

∂u
∂y

• what do you expect the signs to be?

16/24
Partial derivatives: example Ch. 11.2

• let’s try together: compute partial derivaties


3 1
u(x, y ) = x 4 y 4
∂u
=
∂x
∂u
=
∂y

• do the signs make sense?

17/24
Outline

Functions with two arguments

Visualising
Surface plots
Level curves

Partial derivatives

With many arguments


Functions with many arguments Ch. 11.7

• what if you also think a good’s quality should matter for welfare?

• say:
3 1
u = qx 4 y 4

• now: welfare depends consumption amounts (x, y ), but also on


the quality of goods q

• we have now written a function of three arguments

18/24
Functions with many arguments Ch. 11.5

• we can write down a function with any number of arguments

• say there are n arguments: then a function

f (x) ≡ f (x1 , x2 , . . . , xn )

takes the arguments x ≡ (x1 , x2 , . . . , xn ) and returns the value


f (x )
here, we collapse all the arguments into x for ease of writing

• in general, humans cannot visualise multi-dimensional space, so


these functions are hard to draw

19/24
Partial derivatives with many arguments Ch. 11.6

• we can think about f ’s partial derivative with respect to x1 . . .

• it’s how f changes as x1 changes, holding x2 , x3 , . . . , xn constant

• similarly, f ’s partial derivative with respect to x2 . . .

• it’s how f changes as x2 changes, holding x1 as well as


x3 , x4 , . . . , xn constant

20/24
Partial derivatives with many arguments Ch. 11.6

• in general: if i is one of 1, 2, . . . , n, what’s f ’s partial derivative


with respect to xi ?

• it’s how f changes as xi changes, holding xj constant for all j ̸= i

• in practice, we compute the same way: derive with respect to xi ,


as though xj are constants

21/24
Partial derivatives with many arguments Ch. 11.6

• let’s try together: welfare with three arguments

3 1 ∂u
u(x, y, q ) = qx 4 y 4 =
∂x
∂u ∂u
= =
∂y ∂q

• do the signs make sense?

22/24
Summary

• understand functions of two or more variables

• read, graph, and interpret level curves

• understand the meaning of and compute partial derivatives

23/24
System of equations practice

Consider a collection of n individuals, each of whom owns


a definite quantity of m different commodities. Let aij be the
number of units of commodity i owned by individual j. What’s
the total amount of commodity 1? Commodity i? Let pi de-
note the price per unit of commodity i. What is the total value
of the commodities owned by individual j?
Ch 15.1, exercise 5

24/24

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy