Limits in Several Variables

For a function of one variable, approaching a point means coming in from the left or from the right — only two directions. A function of two variables lives over the plane, and a point in the plane can be approached along infinitely many paths: straight lines at every angle, parabolas, spirals. The limit

\lim_{(x, y) \to (a, b)} f(x, y) = L

means f(x, y) gets arbitrarily close to L as (x, y) gets close to (a, b)no matter how it gets there. That last clause is the whole subtlety of the subject. If two different routes into (a, b) disagree on the approached value, the limit simply does not exist.

The cautionary tale, step by step

The standard warning example is

f(x, y) = \frac{xy}{x^2 + y^2},

which is defined everywhere except the origin. We ask: does \lim_{(x, y) \to (0, 0)} f(x, y) exist? We test two straight-line approaches.

Step 1 — approach along the x-axis (y = 0). Substitute y = 0 and let x \to 0:

f(x, 0) = \frac{x \cdot 0}{x^2 + 0^2} = \frac{0}{x^2} = 0 \quad\Longrightarrow\quad \lim_{x \to 0} f(x, 0) = 0.

Step 2 — approach along the diagonal (y = x). Substitute y = x and let x \to 0:

f(x, x) = \frac{x \cdot x}{x^2 + x^2} = \frac{x^2}{2x^2} = \frac{1}{2} \quad\Longrightarrow\quad \lim_{x \to 0} f(x, x) = \frac{1}{2}.

Step 3 — compare the two routes. Along the axis the function heads for 0; along the diagonal it sits constantly at \tfrac12. The destination depends on the road taken:

0 = \lim_{x \to 0} f(x, 0) \;\ne\; \lim_{x \to 0} f(x, x) = \frac{1}{2}.

Step 4 — conclude. Because two paths give two different values, no single number L can be the limit along every path. Hence

\lim_{(x, y) \to (0, 0)} \frac{xy}{x^2 + y^2} \ \text{does not exist.}

Notice the trap: each individual path-limit exists and is finite. The failure is in their disagreement. Finding one path that misbehaves is enough to kill a limit; finding several that agree proves nothing — there is always another path you did not try. Drag the approach line below to see the value on the diagonal pull away from the value on the axis.

Continuity

Once limits are pinned down, continuity is the familiar slogan: f is continuous at (a, b) when the limit exists and equals the value there,

\lim_{(x, y) \to (a, b)} f(x, y) = f(a, b).

Sums, products, quotients (away from zero denominators) and compositions of continuous functions are continuous, so polynomials like x^2 + y^2 are continuous everywhere. The troublemaker above is continuous on all of \mathbb{R}^2 except the origin — and no choice of f(0, 0) can repair it, precisely because the limit there does not exist.

For f : D \subseteq \mathbb{R}^2 \to \mathbb{R} and a point (a, b):

The two-path test can only disprove a limit. To prove one exists you must control every direction at once, and the cleanest tool is the polar substitution x = r\cos\theta, y = r\sin\theta, where r = \sqrt{x^2 + y^2} is the distance to the origin. Approaching (0,0) is exactly r \to 0, for any angle \theta. Consider

g(x, y) = \frac{x^2 y}{x^2 + y^2}.

In polar form the denominator collapses, x^2 + y^2 = r^2, and

g = \frac{(r\cos\theta)^2 (r\sin\theta)}{r^2} = r\,\cos^2\theta\,\sin\theta.

Now |\cos^2\theta\,\sin\theta| \le 1 for every angle, so |g| \le r regardless of \theta. As r \to 0 the bound forces g \to 0 along every path simultaneously — the angle dropped out of the bound, which is the whole point. Hence \lim_{(x, y) \to (0, 0)} g = 0 genuinely exists. (Contrast the bad example: there the polar form is \cos\theta\sin\theta = \tfrac12\sin 2\theta, with no r out front to crush it — the angle survives, so the value depends on direction.)