Calculus · Functions of several variables
The temperature in a room depends on three coordinates; the price of a product on dozens of factors. To do calculus with such functions we first need to know what "close" means in many dimensions, and what a limit is when a point can be approached from infinitely many directions. This post builds that foundation: the space \(\mathbb R^n\), convergence, level curves, limits, continuity and uniform continuity.
For \(n = 2\) and \(n = 3\) this is just the plane and ordinary space with the coordinate operations from the post on vectors, and \(d\) is the familiar Pythagorean distance. For larger \(n\) we lose the picture but keep the formulas. A point of \(\mathbb R^{10}\) might be the ten measurements describing a patient, a state of a mechanical system, or the ten parameters of a model.
The distance has the three properties we expect from "distance":
With a distance we can talk about neighbourhoods. The \(\delta\)-neighbourhood of a point \(x_0\) is the set of points with \( d(x, x_0) < \delta \): an interval on the line, a disc in the plane, a ball in space. That is all we need to define limits.
This is the definition from one variable, with \(|x_m - x|\) replaced by the distance. In practice there is a simple test:
Why: each coordinate difference is at most the distance, \( |\xi_i^{(m)} - \xi_i| \le d(x_m, x) \); and conversely, if all \(n\) coordinate differences are less than \(\frac{\varepsilon}{\sqrt n}\), the distance is less than \(\varepsilon\).
A function \( u = f(x) = f(\xi_1, \xi_2, \dots, \xi_n) \) of \(n\) independent variables assigns a number to each point of a set \(D \subset \mathbb R^n\). For two variables its graph \( z = f(x, y) \) is a surface in space, a landscape whose height above the point \((x, y)\) is \(f(x, y)\). Drawing surfaces is hard; there is a better way to see such a function.
A level curve is a horizontal slice through the landscape at height \(c\), projected onto the plane. You have seen them many times: contour lines on a hiking map (equal altitude), isobars on a weather map (equal pressure), isotherms (equal temperature). Where the curves are crowded, the function changes fast (a steep slope); where they are far apart, it changes slowly.
Word for word, this is the definition from one variable, with \( |x - x_0| \) replaced by the distance \( d(x, x_0) \). The condition \( 0 < d \) means the value at \(x_0\) itself plays no role (it may not even be defined); \(x_0\) only needs to be a point that can be approached by points of the domain.
In two variables, the definition reads: for \(x = (x, y)\) close to \(x_0 = (a, b)\), that is, inside a small disc around \((a, b)\), the values \(f(x, y)\) are close to \(A\). We write \( \lim_{(x, y)\to(a, b)} f(x, y) = A \).
The usual limit rules carry over: limits of sums, products and quotients (with nonzero denominator) are sums, products and quotients of limits. So for "nice" expressions you can simply substitute:
\[ \lim_{(x, y)\to(1, 2)}\frac{x^2 + xy}{x + y} = \frac{1 + 2}{3} = 1. \]The interesting cases, as in one variable, are the indeterminate forms such as \(\frac00\).
On the real line a point can be approached only from the left or the right. In the plane there are infinitely many paths: along every line through the point, along parabolas, spirals, zig-zags... The limit exists only if \(f\) approaches the same value \(A\) along all of them at once, since the definition only looks at the distance \(d(x, x_0)\), not at the direction. This gives a practical test for non-existence:
Along every line \(y = kx\): \( f = \frac{kx^3}{x^4 + k^2x^2} = \frac{kx}{x^2 + k^2} \to 0 \); along the \(y\)-axis, \(f = 0\). So the limit along every straight line is \(0\).
But along the parabola \( y = x^2 \): \( f(x, x^2) = \frac{x^4}{2x^4} = \frac12 \). The limit does not exist. Checking straight lines can prove that a limit does not exist, but it can never prove that it does.
To prove that a limit at the origin exists, we need an estimate that works for all directions at once. A convenient tool is to switch to polar coordinates, \( x = r\cos\varphi \), \( y = r\sin\varphi \), with \( r = \sqrt{x^2 + y^2} = d\big((x, y), (0, 0)\big) \).
The key words are "does not depend on \(\varphi\)": the estimate must be uniform in the direction. (The function in the warning box above fails exactly this: in polar form it is \( \frac{r\cos^2\varphi\sin\varphi}{r^2\cos^4\varphi + \sin^2\varphi} \), which equals \(\frac12\) whenever \( \sin\varphi = r\cos^2\varphi \), however small \(r\) is.)
Three conditions are hidden in the definition: \(f(x_0)\) is defined, the limit exists, and the two are equal. As in one variable, sums, products, quotients (where the denominator is nonzero) and compositions of continuous functions are continuous. So all polynomials in \(x_1, \dots, x_n\) are continuous everywhere, and expressions like \( e^{xy}\sin(x + z) \) or \( \frac{\ln(1 + x^2)}{1 + y^2} \) are continuous wherever they are defined.
Continuous functions on bounded and closed sets (sets that contain their boundary, such as a closed disc or a closed cube) keep the important properties from one variable. In particular, such a function attains a largest and a smallest value there (Weierstrass' theorem), which is what makes the search for extrema in several variables meaningful.
Compare with ordinary continuity: there, \(\delta\) may depend on both \(\varepsilon\) and the point \(x_0\). Uniform continuity asks for one \(\delta\) that works everywhere in \(D\). It's the same idea as the uniform convergence from earlier posts: the change from "for each point there is a \(\delta\)" to "there is a \(\delta\) for all points".
In both counterexamples the trouble comes from the set being unbounded, or not closed (the missing origin). Remove that trouble, and uniform continuity comes for free:
For example, \( x^2 + y^2 \) is uniformly continuous on any closed disc, even though it isn't on the whole plane. This theorem is used, for instance, to prove that continuous functions are integrable, which will matter for double and triple integrals.
| Concept | Definition / rule |
|---|---|
| Distance in \(\mathbb R^n\) | \( d(x, y) = \sqrt{\sum(\xi_i - \eta_i)^2} \) |
| Convergence \(x_m \to x\) | \( d(x_m, x) \to 0 \) \(\iff\) every coordinate converges |
| Level set | \( \{x : f(x) = c\} \): curves for \(n = 2\), surfaces for \(n = 3\) |
| Limit | \( |f(x) - A| < \varepsilon \) whenever \( 0 < d(x, x_0) < \delta \) |
| Limit does not exist | two paths give different values |
| Limit exists (at origin) | \( |f - A| \le g(r) \to 0 \), \(g\) independent of \(\varphi\) |
| Continuity at \(x_0\) | \( \lim_{x\to x_0}f(x) = f(x_0) \) |
| Uniform continuity | one \(\delta(\varepsilon)\) for all pairs of points in \(D\) |
| Cantor's theorem | continuous on bounded closed set \(\Rightarrow\) uniformly continuous |
Strategy for a limit at a point:
Try each one before opening the solution. More solved problems from this topic are in Limits.
\( \sqrt{1 + 4 + 9 + 16} = \sqrt{30} \).
\( y = x^2 + c \): congruent parabolas, shifted vertically.
\(c > 0\): one-sheeted hyperboloids; \(c = 0\): a double cone; \(c < 0\): two-sheeted hyperboloids.
Along \(y = kx\): \( \frac{1 - k^2}{1 + k^2} \), which depends on \(k\) (\(1\) on the \(x\)-axis, \(-1\) on the \(y\)-axis). It does not exist.
Polar: \( |r\cos\varphi\sin^2\varphi| \le r \to 0 \). The limit is \(0\).
Yes: \( |f| = r\,|\cos^3\varphi + \sin^3\varphi| \le 2r \to 0 = f(0, 0) \).
\( \lim_{x\to0}\lim_{y\to0}f = \lim_{x\to0}\frac xx = 1 \); \( \lim_{y\to0}\lim_{x\to0}f = \lim_{y\to0}\frac{-y}{y} = -1 \). The iterated limits differ, so the double limit does not exist.
Along \( y = x^2 \) the function equals \(\frac12\) (see Section 5). Paths that are curves matter too.
Coordinatewise: \( (1, 0, 0) \).
Moving from one variable to several changes surprisingly little in the definitions: replace \(|x - x_0|\) by the distance \(d(x, x_0)\), and limits, continuity and uniform continuity read the same. What changes is the geometry: a point can now be approached along infinitely many paths, and a limit has to be the same along all of them. That single fact explains every surprise in this post, and it is the lens through which partial derivatives, differentials and extrema of functions of several variables should be read in the posts to come.
Next in the series: partial derivatives and the total differential.