📖 Functions of several variables#
⏱ | words
References and additional materials

WARNING
This section of the lecture notes is still under construction. It will be ready before the lecture.
We want to extend our discussion of differential calculus from single-real-valued univariate functions, \(f(x_1)\), to single-real-valued multivariate functions, \(f(x_1,x_2,\dots,x_n)\).
functions of two and more variables
level curves and sets
partial derivatives
rules for partial derivatives
composition of functions and chain rule
implicit functions and differentiation
homogeneous functions
homothetic functions
examples, examples, economic applications

Functions of two variables#
Let’s have a look at some functions of two variables
How to visualize them
Slope, contours, etc.
Example: Cobb-Douglas production function
Consider production function
Let’s graph it in two dimensions.

Fig. 41 Production function with \(\alpha=0.4\), \(\beta=0.5\) (a)#

Fig. 42 Production function with \(\alpha=0.4\), \(\beta=0.5\) (b)#

Fig. 43 Production function with \(\alpha=0.4\), \(\beta=0.5\) (c)#
Like many 3D plots it’s hard to get a good understanding
Let’s try again with contours plus heat map

Fig. 44 Production function with \(\alpha=0.4\), \(\beta=0.5\), contours#
In this context the contour lines are called isoquants
Can you see how \(\alpha < \beta\) shows up in the slope of the contours?
We can drop the colours to see the numbers more clearly

Fig. 45 Production function with \(\alpha=0.4\), \(\beta=0.5\)#
Example: log-utility
Let \(u(x_1,x_2)\) be “utility” gained from \(x_1\) units of good 1 and \(x_2\) units of good 2
We take
where
\(\alpha\) and \(\beta\) are parameters
we assume \(\alpha>0, \, \beta > 0\)
The log functions mean “diminishing returns” in each good

Fig. 46 Log utility with \(\alpha=0.4\), \(\beta=0.5\)#
Let’s look at the contour lines
For utility functions, contour lines called indifference curves

Fig. 47 Indifference curves of log utility with \(\alpha=0.4\), \(\beta=0.5\)#
Example: quasi-linear utility
Called quasi-linear because linear in good 1

Fig. 48 Quasi-linear utility#

Fig. 49 Indifference curves of quasi-linear utility#
Example: quadratic utility
Here
\(b_1\) is a “satiation” or “bliss” point for \(x_1\)
\(b_2\) is a “satiation” or “bliss” point for \(x_2\)
Dissatisfaction increases with deviations from the bliss points

Fig. 50 Quadratic utility with \(b_1 = 3\) and \(b_2 = 2\)#

Fig. 51 Indifference curves quadratic utility with \(b_1 = 3\) and \(b_2 = 2\)#
Notation#
To simplify notation we will sometimes denote vectors with bold letters, e.g. \(\mathbf{x}=(x_1,x_2,\dots,x_n)\). Hence, we can write our multivariate function as a function of a vector input, \(f(\mathbf{x})=f(x_1,x_2,\dots,x_n)\).
Single-real-valued multivariate functions#
Definition
A single-real-valued multivariate function takes as input \(n\) real numbers and outputs a single real number,
Recall that:
\(X\) is the domain of \(f\).
\(Y\) is the target space of \(f\).
Often we simply write a single-real-valued multivariate functions as
where \(y\) is refered to as the dependent variable, and \(x_i\) is referred to as an independent variable. Alternatively, \(y\) and \(x_i\) can be referred to as the endogenous and exogenous variables, or the output and input variables.
Example
Consider the single-real-valued multivariate function \(f(x_1,x_2) = \sqrt{x_1 - 1} + \sqrt{x_2 - 2}\).
the domain of \(f\) is \(\left\{ (x_1,x_2) \in \mathbb{R}^{2} | x_1 \geq 1, x_2 \geq 2 \right\}\).
the target of \(f\) is \(\left\{ y \in \mathbb{R} | y \geq 0 \right\}\).

Fig. 52 Illustrations of domain and target of \(f\).#
In economic analysis we will often use single-real-valued multivariate functions to represent
production functions
cost functions
profit functions
utility functions
demand functions
Example
Important single-real-valued bivariate functions used in economic analysis:
Linear function
Input-output function
Cobb-Douglas function
Constant elasticity of substitution (CES) function,
These functions are straight forward to extent to more than two inputs.
Partial derivatives#
Our primary goal in economic analysis is to understand how a change in one independent variable affect the dependent variable. By using partial derivatives we take the simplest approach by changing one variable at a time, keeping all other constant.
Definition
The partial derivative of the single-real-valued multivariate function \(f\) with respect to the variable \(x_{k}\) is defined as

Fig. 53 Illustration of the partial derivative with respect to \(x_k\).#
Note that the partial derivative, \(\partial f\left(\mathbf{x}\right)/\partial x_k\), is a single-real-valued multivariate function itself, as it in general depend on all the independent variables.
As a matter of convenience partial derivatives are often denoted by \(f_{k}\left(\mathbf{x}\right)\) or \(f'_{k}\left(\mathbf{x}\right)\).
Definition
The gradient is defined as the vector of first-order partial derivatives of \(f\)
The gradient is commonly denoted by one of \(\nabla f(\mathbf{x}), D_{x} f(\mathbf{x})\), or \(\operatorname{grad} f(\mathbf{x})\).
Note that when calculating the partial derivative with respect \(x_k\) we treat the remaining independent variables as constants. Hence, we can use the same rules for partial differentiation as for differentiation of univariate functions.
Fact: Rules for partial differentiation
\(f(\mathbf{x}) = c g(\mathbf{x}) \Rightarrow f_k\left( \mathbf{x} \right) = c g_k\left( \mathbf{x} \right)\).
\(f(\mathbf{x}) = g(\mathbf{x}) + h(\mathbf{x}) \Rightarrow f_k\left( \mathbf{x} \right) = g_k\left( \mathbf{x} \right) + h_k\left( \mathbf{x} \right)\).
\(f(\mathbf{x}) = g(\mathbf{x})h(\mathbf{x}) \Rightarrow f_k\left( \mathbf{x} \right) = g_k(\mathbf{x})h(\mathbf{x}) + g(\mathbf{x})h_k(\mathbf{x})\).
\(f(\mathbf{x}) = g\left(h\left(\mathbf{x}\right)\right) \Rightarrow f_k\left( \mathbf{x} \right) = g_h\left(h\left(\mathbf{x}\right)\right)h_k\left(\mathbf{x}\right)\).
Example I
Consider the bivariate function \(y=f(x_1,x_2)=a x_1 + b x_2\). The partial derivative with respect to \(x_1\) is then
The partial derivative with respect to \(x_1\) is then
The partial derivative with respect to \(x_2\) is then
Example II
Consider the bivariate function \(y=f(x_1,x_2)=x_1 x_2\).
The partial derivative with respect to \(x_1\) is then
The partial derivative with respect to \(x_2\) is then
Definition
Some terminologi:
If \(\partial f\left(\mathbf{x}\right)/\partial x_k\) exist for each \(k\), we say that \(f\) is differentiable at \(\mathbf{x}\).
If these \(n\) partial derivative functions are continuous, we say that \(f\) is continously differentiable at \(\mathbf{x}\). This is denoted by \(f \in C^{1}\) on \(X\).
Implicit functions in many variables#
Until now we have been working with explicit functions where the dependet variable, \(y\), is on the left side of the equation and the independet variables, \(x_i\), are on the right side
Frequently, we have to work with equations where the dependent variable cannot be separated from the independent variables
We say that \(G(x_1,x_2,\dots,x_n,y) = c\) represent a relationship between \(y\) and \(x\) that defines an implicit function \(y\) of \(x\).
When dealing with implicit functions we want to know the following two answers:
Does \(G(x_1,x_2,\dots,x_n,y) = c\) determine \(y\) as a continuous implicit function of \((x_1,x_2,\dots,x_n)\)?
If so, how does changes in \(x\) affect \(y\)?
Example: The line of the cicle
The unit cicle has the representation
Consider the point \(x=0\), \(y=1\). In the neighborhood of this point \(y\) is an explicit function of \(x\)
\(y(x)\) can be represented by a different explicit function around the neighborhood at the point \(x=0\), \(y=-1\)
In contrast, \(y\) cannot be represented by a well defined function around the points \((-1,0)\) and \((1,0)\).
Example: Polynomial equation of order five
Consider the polynomial equation
\(x\) can be expressed as an explicit function of \(y\)
However, polynomials of order \(k \geq 5\) has no explicit solution. Hence, there exist no explicit function \(y\) of \(x\). Instead, the polynomial equation defines an implicit function for \(y\) of \(x\).
Suppose we could find a function \(y=y(x)\) which solves this equation for any \(x\)
Use the chain rule to find \(y'(x)\)
The point \(x=-3\), \(y=1\) solves the polynomial equation, and
We conclude that there exists an implicit function \(y=y(x)\) in the neighborhood around (-3,1) that solves polynomial equation and it is differentiable.
Now, let’s carry this computation out more generally for the implicit function \(G(x,y)=c\) around the specific point \(x=x^*\), \(y=y^*\), and let’s suppose there exist a solution \(y=y(x)\). Use the chain rule to differentiate wrt \(x\)
Solving for \(y'(x)\) yields
We see that if the solution \(y(x)\) of \(G(x,y)=c\) exists and is differentiable it is necessary that \(\partial G\left(x_0, y(x_0)\right) /\partial y\) be nonezero. The implicit function theorem stated below implies that this necessary condition is also a sufficient condition.
Fact (Implicit function theorem I)
Let \(G\left(x, y\right)\) be a \(C^1\) function around the point \((x^*,y^*)\) in \(\mathbb{R}^2\). Suppose \(G(x^*,y^*)=c\) and consider the expression
If \(\partial G\left(x^*, y(x^*)\right) / \partial y \neq 0\), then there exists a \(C^1\) function \(y=y(x)\) defined in neighborhood around the point \(x^*\) such that
\(G(x,y(x)) = c\) for all \(x\) around \((x^*,y^*)\)
\(y(x^*)=y^*\)
the derivative of \(y\) wrt \(x\) at \((x^*,y^*)\) is
The implicit function theorem provides conditions under which a relationship of the form \(G(x,y)=c\) implies that there exists a implicit function \(y=y(x)\) locally.
Example: The line of the cicle
When the implicit function theorem is applied to the line of the circle we get that
which is not defined in the point (-1,0) and (1,0) .
The implicit function theoriem can be extended to \(G(x_1,x_2,\dots,x_n)=c\).
Fact (Implicit function theorem II)
Let \(\mathbf{x}=(x_1,x_2,\dots,x_n)\) and \(G\left(\mathbf{x}, y\right)\) be a \(C^1\) function around the point \((\mathbf{x}^*,y^*)\) in \(\mathbb{R}^{n+1}\). Suppose \(G(\mathbf{x}^*,y^*)=c\) and consider the expression
If \(\partial G\left(\mathbf{x}^*, y(\mathbf{x}^*)\right) / \partial y \neq 0\), then there exists a \(C^1\) function \(y=y(\mathbf{x})\) defined in the neighborhood around the point \(\mathbf{x}^*\) such that
\(G(\mathbf{x},y(\mathbf{x})) = c\) for all \(\mathbf{x}\) around \((\mathbf{x}^*,y^*)\)
\(y(\mathbf{x}^*)=y^*\)
for each \(i\) the derivative of \(y\) wrt \(x_i\) is
Example: \(G(x,y,z)=c\)
Consider the relationship
We will show that near \((-1,1,2)\) we can write \(y=y(x,z)\) and we will find the partial \(\partial y / \partial x\) to that point
Find the partial derivatives of \(G\) with respect to \(y\) and \(x\)
The partial derivative is given by the implicit function theorem as
We conclude that there exists a \(C^1\) function \(y=y(x,z)\) in the neighborhood around the point (-1,1,2).
Level sets#
Level curves can be used to visualize single-real-valued bivariate functions, \(f: X \subset \mathbb{R}^2 \rightarrow Y \subset \mathbb{R}\).
Fact (Level curve)
A curve \(\ell\) in \(\mathbb{R}^2\) is called a level curve of \(y=f(x_1,x_2)\) if the value of \(f\) on every point of \(\ell\) is some fixed \(c\).
Example: Level curve
\(x^2 + y^2 = c\) is the level curve of \(z=x^2 + y^2\).
Similarly, level surfaces can be used to visualize single-real-valued trivariate functions, \(f: X \subset \mathbb{R}^3 \rightarrow Y \subset \mathbb{R}\).
Fact (Level surface)
A surface \(S\) in \(\mathbb{R}^3\) is called a level surface of \(f(x_1,x_2,x_3)\) if the value of \(f\) on every point of \(S\) is some fixed \(c\).
Example: Level surface
\(x^2 + y^2 - z = c\) is the level surface of \(w=x^2 + y^2 - z\).
This can of course be generalized to higher order functions, \(f: X \subset \mathbb{R}^n \rightarrow Y \subset \mathbb{R}\)
Fact (Level sets)
A manifold \(M\) in \(\mathbb{R}^n\) is called a level set of \(f(x_1,x_2,\dots,x_n)\) if the value of \(f\) on every point of \(M\) is some fixed \(c\).
The slope of an isoquant curve#
Suppose that \(f: \mathbb{R}_{+}^{2} \rightarrow \mathbb{R}_{+}\) is a production function.
The level curve of the production function represent a relationship between the capital (K) and labor (L) inputs that keeps the production constant at \(c\)
Given the specified production function we might be able to find an explicit or implicit function for the isoquant curve, \(L=L(K)\). In both cases we can use the implicit function theorem to calculate the slope of the isoquant curve.
The slope of the isoquant curve is referred to as the marginal rate of technical substitution
It measures how much of one input would be needed to compensate for a one-unit loss of the other while keeping the production at the same level.
Marginal rate of technical substitution between input \(x_i\) and \(x_j\) of a multivariate function is defined as
Example: \(f(K,L,T)=c\)
Consider the level surface of the Cobb-Douglas function of three inputs (capital, labor, and land)
Calculate the marginal rate of substitution between capital and labor
Calculate the marginal rate of substitution between capital and land
Calculate the marginal rate of substitution between labor and land
Homogeneous functions#
Consider a function \(f: S \longrightarrow \mathbb{R}\), where \(S \subseteq \mathbb{R}^{n}\). Let \(\lambda>0\) be a positive real number.
Definition
The function \(f\left(x_{1}, x_{2}, \cdots, x_{n}\right)\) is said to be homogeneous of degree \(r\) if
for all \(\left(x_{1}, x_{2}, \cdots, x_{n}\right) \in S\) and all \(\lambda>0\).
Example
The function
is homogenous of degree 6
The function
is not homogenous
Definition
A function that is homogeneous of degree one is said to be linearly homogeneous.
Definition
Let \(z=f(x)\) be a \(C^1\) function. If \(f\) is homogenous of degree \(r\), its first order partial derivatives are homogenous of degree \(r-1\).
By definition
Use the chain rule wrt x_i on both sides of the equation
and divide both sides by \(\lambda\)
Fact
Let \(q=f(x)\) be a \(C^1\) homogenous function on \(\mathbb{R}^n_+\). The tangent planes to the level sets of \(f\) have constant slope along each ray from the origin.
Consider the homogenous production function on \(\mathbb{R}^2_+\). We want to show that the MRTS is constant along rays from the origin. Let \((\lambda L_0,\lambda K_0)=(L_1, K_1)\). The MRTS between input \(L\) and \(K\) at \((L_1, K_1)\) equals
Euler’s theorem#
Fact (Euler’s theorem)
Suppose that the function \(f\left(x_{1}, x_{2}, \cdots, x_{n}\right)\) is homogeneous of degree \(r\). In this case we have
Recall the definition of a homogenous function of degree \(r\)
Differentiate both sides wrt \(\lambda\)
Set \(\lambda=1\).
Returns to scale#
Suppose that an \(n\) input and one output production technology can be represented by a homogenous production function of the form
The production technology is said to display:
constant returns to scale: \(f\left(\lambda L_{1}, \lambda L_{2}, \cdots, \lambda L_{n}\right)=\lambda Q\).
decreasing returns to scale: \(f\left(\lambda L_{1}, \lambda L_{2}, \cdots, \lambda L_{n}\right)<\lambda Q\).
increasing returns to scale: \(f\left(\lambda L_{1}, \lambda L_{2}, \cdots, \lambda L_{n}\right)>\lambda Q\).
Cobb-Douglas production functions#
Suppose that an two input and one output production technology can be represented by a production function of the form
This type of production function is known as a Cobb-Douglas production function.
Suppose that \(\lambda>0\). Note that
Thus we know that the Cobb-Douglas production function is homogeneous of degree \((\alpha+\beta)\).
If \((\alpha+\beta)<1\), then the Cobb-Douglas production function displays decreasing returns to scale;
If \((\alpha+\beta)=1\), then the Cobb-Douglas production function displays constant returns to scale; and
If \((\alpha+\beta)>1\), then the Cobb-Douglas production function displays increasing returns to scale.
Homothetict function#
Definition
Let \(I\) be an interval on the real line. Then, \(g: I \rightarrow \mathbb{R}\) is a monotonic transformation on \(I\) if \(g\) is a strictly increasing function on \(I\).
Definition
If \(\mathbf{x}, \mathbf{y} \in \mathbb{R}^n\), write
A function \(u: \mathbb{R}^n_+ \rightarrow \mathbb{R}\) is monotone if for all \(\mathbf{x}, \mathbf{y} \in \mathbb{R}^n\),
The function is strictly monotone if for all \(\mathbf{x}, \mathbf{y} \in \mathbb{R}^n\)
Definition
A function \(v: \mathbb{R}_{+}^n \rightarrow \mathbb{R}\) is called homothetic if it is a monotone transformation, \(g(z)\), of a homogenous function \(u: \mathbb{R}_{+}^n \rightarrow \mathbb{R}\)
for all \(\mathbf{x}\) in the domain.
Example: \(G(x,y,z)=c\)
The two functions
are homothetic functions with \(u(x,y)=xy\) and the monotonic transformations
respectively.
Definition
Let \(u: \mathbb{R}_{+}^n \rightarrow \mathbb{R}\) be a strictly monotonic function. Then, \(u\) is a homothetic if and only if for all \(\mathbf{x}\) and \(\mathbf{y}\) in \(\mathbb{R}^n_+\),
Definition
Let \(u\) be a \(C^1\) function on \(\mathbb{R}^n_+\). If \(u\) is homothetic then the slopes of the tangent planes of the level sets of \(u\) are constant along each ray from the origin.
Some economic applications#
Often in economic analysis the partial derivative has a straight forward interpretation
production function: marginal product
cost function: marginal cost
profit function: marginal profit
utility function: marginal utility
demand function: marginal change in demand
Marginal products of production inputs
Suppose a firm’s production is described by a Cobb-Douglas production function, where labor (L) and capital (K) are the inputs:
The marginal product of labour is simply the partial derivative with respect to labor. Thus we have
The marginal product of capital is simply the first-order derivative with respect to capital. Thus we have
Elasticities#
An elasticity measure the fractional response of the dependent variable, \(y=f(x_1,x_2,\dots,x_n)\), to a fractional change in an independent variable, e.g. \(x_k\), which can be written as
where \(h\) is the change in \(x_k\). As \(h \rightarrow 0\), we can write this in terms of the partial derivative
Similar to partial derivatives, elasticities measure how sensitive the dependent variable is to changes in the independent variables. Unlike partial derivatives elasticities are unit-free.
Elasticities of production with respect to inputs
Suppose a firm production is described by a Cobb-Douglas production function:
We know from earlier that the partial derivatives of the Cobb-Douglas production function are
Insert the partial derivate with respect to labor into the definition of elasticities
Insert the partial derivate with respect to capital into the definition of elasticities
Elasticities of demand#
Suppose that an individual’s demand function for commodity \(k\) is given by
where \(p_{i}\) is the price of commodity \(i\) and \(y\) is the consumer’s income.
The own-price elasticity of demand for commodity \(k\) for this consumer is
The cross-price elasticity of demand for commodity \(k\) with respect to the price of commodity \(l\) for this consumer is
The income elasticity of demand for commodity \(k\) for this consumer is
We can use these elasticities to classify the types of commodities that are being considered:
If \(\varepsilon_{y}^{k}>0\), then commodity \(k\) is a normal good.
If \(\varepsilon_{y}^{k}<0\), then commodity \(k\) is an inferior good.
If \(\varepsilon_{l}^{k}>0\), then commodities \(k\) and \(l\) are substitutes.
If \(\varepsilon_{l}^{k}<0\), then commodities \(k\) and \(l\) are complements.
The demand curve for most commodities will usually slope down. As such, we would usually expect \(\varepsilon_{k}^{k}<0\).
However, there are circumstances in which the demand curve for a commodity can slope up over some range of prices (at least in theory). Such commodities are known as Giffen goods. In such circumstances, we would have \(\varepsilon_{k}^{k}>0\) over the relevant range of prices.
Cournot aggregation#
Suppose that a consumer’s preferences over bundles of \(L\) commodities. Assume that the budget constrain holds exactly
where \(p=\left(p_{1}, p_{2}, \dots, p_{n}\right)=\left(p_{k}, p_{-k}\right)\) is the price vector, \(y\) is the consumer’s income and \(x_{l}(p, y)\) is the consumer’s Marshallian demand for good \(l\).
Note that this can be rewritten as
Partially differentiating both sides of this equation with respect to the price of commodity \(k\), we obtain
This can be simplified to obtain
This can be rearranged to obtain
This can be rewritten as
This can be rearranged to obtain
This can be rewritten as
where
is the budget share of commodity \(l\) and
is the \(k\) th commodity-price elasticity of demand for commodity \(l\).
The above formula is a result known as Cournot aggregation. It provides a relationship between the \(k\) th price elasticities of demand for the various commodities.
Engel aggregation#
Suppose that a consumer’s preferences over bundles of \(L\) commodities are locally non-satiated in the neighbourhood of any potentially feasible commodity bundle. Then we know that budget exhaustion (which is sometimes called Walras’ law for the individual) must hold for the consumer. This ensures that
where \(p=\left(p_{1}, p_{2}, \cdots, p_{n}\right)\) is the price vector, \(y\) is the consumer’s income and \(x_{l}(p, y)\) is the consumer’s Marshallian demand for good \(I\).
Partially differentiating both sides of this equation with respect to income, we obtain
This can be rewritten as
This can be simplified to obtain
This can be rewritten as
where
is the budget share of commodity \(l\) and
is the income elasticity of demand for commodity \(l\).
The above formula is a result known as Engel aggregation. It provides a relationship between the income elasticities of demand for the various commodities. –>