Mathematical methods for economic theory

Martin J. Osborne

1.6 Calculus: many variables

Open and closed sets

To make precise statements about functions of many variables, we need to generalize the notions of open and closed intervals to many dimensions.

We want to say that a set of points in an n-dimensional set is “open” if it does not include its boundary. But how exactly can we define the boundary of an arbitrary set of n-vectors?

Our definition of boundary point for an interval can easily be extended. We say that a point x is a boundary point of a set of n-vectors if there are points in the set that are arbitrarily close to x, and also points outside the set that are arbitrarily close to x. A point x is an interior point of a set if we can find a (small) number ε such that all points within the distance ε of x are in the set.

The green point in the following figure, for example, is a boundary point of the (two-dimensional) blue set because every disk centered at the point, however small, contains both points in the set and points outside the set. The red point is an interior point because the gray disk around it (and all smaller disks, as well as some larger ones) contains exclusively points in the set.

boundary point interior point

Here is a more precise definition of the two notions.

Definition
  • A point x is a boundary point of a set S of vectors if for every number ε > 0 (however small), at least one point within the distance ε of x is in S, and at least one point within the distance ε of x is outside S.
  • A point x is an interior point of a set S of vectors if there is a number ε > 0 such that all points within the distance ε of x are members of S.
Example
The set of interior points of the set {(xy): x2 + y2 ≤ c2}, the disk of radius c centered at the origin, is {(xy): x2 + y2 < c2}, and the set of its boundary points is {(xy): x2 + y2 = c2}, the circle of radius c centered at the origin.
We may now define open and closed sets of n-vectors.
Definition
  • The set S of n-vectors is open if every point in S is an interior point of S.
  • The set S of n-vectors is closed if every boundary point of S is a member of S.
A set, like an interval, may be neither open nor closed (consider the interval [0, 1)).
Example
The set of boundary points of the set {(xy): x2 + y2 ≤ c2}, the disk of radius c centered at the origin, is {(xy): x2 + y2 = c2}, the circle of radius c centered at the origin, which is a subset of the disk. Thus the disk is closed.
Example
The set of interior points of the set {(xy): x + y ≤ c, x ≥ 0, and y ≥ 0} is {(xy): x + y < c, x > 0, and y > 0}, and the set of boundary points is {(xy): x + y = c and 0 ≤ x ≤ c and 0 ≤ y ≤ c, or x = 0 and 0 ≤ y ≤ c, or y = 0 and 0 ≤ x ≤ c}. Thus the set is closed.
Informally, a set defined by weak inequalities (≤ and ≥) is closed, whereas one defined by strict inequalities (< and >) is open.

Differentiability

For a function f of a single variable and any point x in the domain of f, a line through (xf(x)) with slope equal to the derivative f'(x) of f at the point x is a good approximation of the function around x (see this page). If no good linear approximation exists at some point x (as is the case if the graph of the function has a “kink” at x), then the function is not differentiable at x.

The definition of differentiability for a function of many variables captures the same idea: a function of many variables is differentiable at a point if there exists a good linear approximation of the function around the point. Like the graph of a differentiable function of a single variable, the graph of a differentiable function of many variables is “smooth”, with no “kinks”.

To formulate a precise definition, first note that the definition of differentiability for a function of a single variable can be rewritten as follows: a function of a single variable defined on an open interval I is differentiable at the point a ∈ I if there is a number r such that

limh→0 
f(a + h) − f(a) − rh
h
exists and is equal to 0. In this case, the derivative of f at a is r.

Here is the definition for a function of many variables.

Definition
The function f of n variables defined on an open set S is differentiable at the point a ∈ S if there is a vector r = (r1, ..., rn) such that
limh→0 
f(a + h) − f(a) − r · h
h
exists and is equal to 0, where h denotes an n-vector, ∥h∥ = √(∑n
i=1
h2
i
), and r · h is the inner product of r and h. In this case, r is the derivative of the function f at a. If f is differentiable at every point in S then it is differentiable on S.
Definition
The function f of many variables defined on an open set S is twice-differentiable on S if it is differentiable on S and its derivative is also differentiable on S.
How do we find the derivative of a function of many variables? By applying the tools available for finding the derivative of a function of a single variable to each variable separately. That is, by finding the “partial derivatives” of the function, which I now discuss.

Partial derivatives

Definition
Let f be a function of n variables and let (x1, ..., xn) be a point in its domain. If
limh→0 
f(x1, ..., xi + h, ..., xn) −  f(x1, ..., xn)
h
exists then it is the partial derivative of f with respect to its ith argument at (x1, ..., xn). Denote the limit f'i(x1, ..., xn). If the limit exists for all points (x1, ..., xn) in the domain of f then the function f'i, with the same domain as f, is the partial derivative of f with respect to its ith argument.
We may characterize the process of obtaining a partial derivative of f with respect to its ith argument by saying that we “differentiate f with respect to its ith argument holding all the other arguments fixed”. That is, we calculate the partial derivative of f with respect to its ith argument by treating the variables other than xi as constants and using the standard rules for differentiating a function of a single variable.
Example
Let f(x1x2) = (x1)3ln x2. The partial derivative of f with respect to its first argument is the function f'1 defined by f'1(x1x2) = 3(x1)2ln x2 and the partial derivative of f with respect to its second argument is the function f'2 defined by f'2(x1x2) = (x1)3/x2.
In denoting the partial derivative of f with respect to its ith argument by f'i, I am following common practice in economics. This notation does not work well for a function that itself has a subscript. Suppose, for example, that we are working with the functions gj for j = 1, ..., m, each of which is a function of n variables. How do we denote the partial derivative of gj with respect to its ith argument? I write g'ji, but this notation is not elegant. In the mathematical literature, the notation Dif is used for the partial derivative of f with respect to its ith argument. This notation is elegant and may be used unambiguously for any function. For example, the partial derivative of gj with respect to its ith argument is Digj. However, this notation is not common in economics.

The notation ∂f/∂x is also sometimes used. This notation has two major disadvantages. First, it is clumsy in using five symbols where three (Dif) suffice. Second, its reference to the variable with respect to which the function is being differentiated is imprecise. If f is a function of two variables, for example, and we want to denote its partial derivative with respect to its first argument at the point (ab), what letter do we use to denote the first argument? Despite these limitations, the notation is often used by economists, and I sometimes follow suit.

Occasionally the argument of a function may be more conveniently referred to by its name than its index. If I have called the arguments of f by the names w and p, for example (writing f(wp)), I may write fp(wp) for the value of the partial derivative of f with respect to its second argument at the point (wp).

If a function of many variables is differentiable at some point, then all of its partial derivatives exist at that point.

Proposition  proof
Let f be a function of many variables that is differentiable at x. Then all the partial derivatives of f exist at x and f is continuous at x.
Proof  hide
Let f be a function of n variables and choose i with 1 ≤ i ≤ n. In the definition of the derivative of f at x, take h to be a vector with hi = t and hj = 0 for all j ≠ i. Then for any n-vector r, r · h = tri, so from the definition,
limt→0 
f(x + h) − f(x)
t
 = ri.
That is, the partial derivative of f with respect to its ith argument at x exists (and is equal to ri).

To show that f is continuous at x, note that it follows from the definition of the derivative that there is a function K of n variables with limh→0 K(h)/|h| = 0 such that f(x + h) = f(x) + f'(x)h + K(h). Taking the limit as h → 0 on both sides, limh→0 f(x + h) = f(x), so that f is continuous.

However, the fact that all of the n partial derivatives of f exist at some point does not imply that f is differentiable, or even continuous, at that point. A simple example is the function f of two variables defined by f(x1x2) = x1 + x2 if x1 = 0 or x2 = 0 and f(x1x2) = 0 otherwise. Both partial derivatives of f exist at (0, 0) (they are equal to 1), but f is not continuous at (0, 0). Less obviously, a function that has partial derivatives at every point may not be differentiable, or even continuous. (See the example if you are curious.)

Example
Here is a function that has partial derivatives for all points in its domain but is not continuous at every point in its domain, and thus is not differentiable at every point in its domain. Define the function f of two variables by
f(xy) = left brace 0     if (xy) = (0, 0)
xy/(x2 + y2)     if (xy) ≠ (0, 0).
This function has partial derivatives with respect to x and with respect to y for all values of (xy). (For every fixed value of y the function gy defined by gy(x) = f(xy) for all x is differentiable, and for every fixed value of x the function hx defined by hx(y) = f(xy) for all y is differentiable. Note that g0(x) = 0 for all x and h0(y) = 0 for all y.) However, f is not continuous at (0, 0): we have f(0, 0) = 0, but f(xx) = 1/2, for example, for all x ≠ 0.
Nevertheless, if all the partial derivatives of f exist and are continuous functions, then f is differentiable, and in fact its derivative is continuous. To state this result precisely, first make the following definition.
Definition
A function of many variables is continuously differentiable if it is differentiable and its derivative is a continuous function.
Proposition  source
Let f be a function of n variables defined on an open set S. Then f is continuously differentiable on S if and only if all its partial derivatives exist and are continuous on S.
Source  hide
A proof may be found in Rudin (1976) (Theorem 9.21, p. 219).

Cross partial derivatives

Just as we can differentiate the derivative of a function (if the derivative is differentiable) to get the second derivative, we can partially differentiate the partial derivatives of a function (if the partial derivatives are differentiable). The functions produced by such operations are called “cross partial derivatives”.
Definition
Let f be a function of n variables. Suppose that the partial derivative f'j of f with respect to its jth argument exists. Then if the derivative of f'j with respect to its ith argument exists, it is called the ijth cross partial derivative of f and is denoted f"ij.
The following result gives a condition under which the cross partial derivatives fij and fji of a function are equal: that is, the derivative with respect to the ith argument of the derivative with respect to the jth argument is the same as the derivative with respect to the jth argument of the derivative with respect to the ith argument. The condition is somewhat weaker than twice-differentiability of the function in an open set containing the point. The result is named after William Henry Young (1863–1942).
Proposition (Young's theorem)  source
Let f be a function of n variables and let 1 ≤ i ≤ n and 1 ≤ j ≤ n. If the partial derivatives f'i and f'j of f exist in an open set S containing (x1, ..., xn) and both of these partial derivatives are differentiable at (x1, ..., xn) then
f"ij(x1, ..., xn)  =  f"ji(x1, ..., xn).
Source  hide
A proof may be found in Apostol (1974), Theorem 12.12 (p. 359). Proofs of variants of the result may be found in Rudin (1964), Theorem 9.34 (p. 208) and Rudin (1976), Theorem 9.41 (p. 235–236).
The condition in this result is satisfied, for example, by any polynomial.
Example
Define the function f by f(x1x2) = x1x2
2
for all (x1x2). We have f'1(x1x2) = x2
2
, so that f'21(x1x2) = 2x2, and f'2(x1x2) = 2x1x2, so that f'12(x1x2) = 2x2.
Note that under the hypotheses of the result, both f"ij and f"ji exist. The fact that one of these cross-partials exists does not imply that the other exists, even if the first one is continuous. A simple example is the function f defined by f(x1x2) = |x1|. The partial derivative of f with respect to its second argument exists and is continuous: it is 0 for all (x1x2). Thus the cross-partial f"12(x1x2) exists and is equal to 0 for all values of (x1x2). However, the partial derivative of f with respect to its first argument does not exist at any point (0, x2), so that the cross-partial f"21 also does not exist at any such point.

If you are wondering how the conclusion of the proposition can fail for a function that does not satisfy the assumptions, take a look at this example.

Example
Here is a function for which the cross-partials exist at (0, 0) but are not continuous at this point and the conclusion of the proposition fails: the cross-partials are not equal at (0, 0). Define the function f of two variables by
f(xy) = left brace 0     if (xy) = (0, 0)
xy(x2 − y2)/(x2 + y2)     if (xy) ≠ (0, 0).
We have f'x(0, y) = −y for all y and f'y(x, 0) = x for all x, so that f"yx(0, 0) = −1 and f"xy(0, 0) = 1. The function f is continuously differentiable (f'x(xy) and f'y(xy) exist for all (xy) and f'x and f'y are continuous) but f"yx and f"xy are not continuous at (0, 0). The function is shown in the following figure. (Use your mouse to rotate the figure.)