Limits and Continuity
In one variable, can approach only from the left or the right. In the plane, can approach along infinitely many paths, straight or curved, and a limit exists only if every one of them leads to the same value. This lesson gives the - definition, the path test for proving that a limit does not exist, the squeeze and polar tricks for proving that one does, and the meaning of continuity.
It builds on the one-variable precise definition of a limit; the survey version of limits is in Limits.
The definition
Let be defined on a set that contains points arbitrarily close to . We write
if for every there is a such that
The only change from one variable is that the distance becomes the Euclidean distance in the plane. "Close to " now means "inside a small disk around ", and the disk contains points from every direction.
The usual limit laws (sum, product, quotient with non-zero denominator limit, composition with a continuous function) carry over with the same proofs, and so do and . Together they give limits of polynomials and rational functions by plugging in, wherever the denominator is not zero.
Proving that a limit does not exist: two paths
If along one path to and along another, with , then the limit does not exist. (If it existed and equalled , every path would give .)
Example 1. at . On the -axis () ; on the -axis . No limit.
Example 2. . Along every axis , but along
which depends on ( gives 1, gives 0). No limit.
Example 3: lines are not enough. . Along , for every (and on the -axis). Yet along the parabola ,
so the limit does not exist. Agreement along all straight lines proves nothing.
import numpy as np
f = lambda x, y: x**2 * y / (x**4 + y**2)
t = np.array([1e-1, 1e-2, 1e-3, 1e-4])
print("t along y=x along y=3x along y=x^2")
for s in t:
print(f"{s:.0e} {f(s, s):11.6f} {f(s, 3*s):11.6f} {f(s, s**2):11.6f}")t along y=x along y=3x along y=x^2
1e-01 0.099010 0.033296 0.500000
1e-02 0.009999 0.003333 0.500000
1e-03 0.001000 0.000333 0.500000
1e-04 0.000100 0.000033 0.500000
Numerically this is the trap: if you sample only along lines, looks like it tends to 0.
Proving that a limit exists: squeeze and polar coordinates
Paths can only disprove. To prove a limit, bound by something that depends only on the distance and goes to 0.
Example 4. at . Since ,
Given , choose : if then . So the limit is 0. This is a complete - proof.
Polar trick. Put , . If with and the bound does not depend on , the limit is . For Example 4, , so . For Example 2, : no is left over, and the value depends on the direction , confirming that there is no limit.
Note: The polar test needs a bound uniform in . In Example 3 polar form gives : for each fixed this goes to 0, but near the denominator can be tiny, and no single bounds it. That is exactly the parabola path.
import sympy as sp
x, y, r, th = sp.symbols("x y r theta", real=True)
f = 3 * x**2 * y / (x**2 + y**2)
polar = sp.simplify(f.subs({x: r * sp.cos(th), y: r * sp.sin(th)}))
print("polar form:", polar)
print("limit r->0:", sp.limit(polar, r, 0))
g = 2 * x * y / (x**2 + y**2)
print("2xy/(x^2+y^2) in polar:", sp.simplify(g.subs({x: r * sp.cos(th), y: r * sp.sin(th)})))polar form: 3*r*sin(theta)*cos(theta)**2
limit r->0: 0
2xy/(x^2+y^2) in polar: sin(2*theta)
Continuity
is continuous at if as equals (so in particular is defined and the limit exists). is continuous on if it is continuous at every point of .
Polynomials are continuous on ; rational functions are continuous wherever the denominator is non-zero; and a composition is continuous where is continuous and is continuous at . So and are continuous everywhere, and is continuous off the line .
A removable discontinuity can be repaired: define for and ; by Example 4 is continuous on . No value at can repair Example 2.
Everything extends to three or more variables: replace the disk by a ball, .
In software
- Numerical code near singular points. Expressions like appear in normalised vectors, angles, and polar conversions. Even when a limit exists, evaluating at exactly gives in floating point, so libraries special-case it (
atan2(0, 0)returns 0 by convention, andnp.linalg.normguarded normalisation adds a small to the denominator). - Direction-dependent limits are a real bug source. A function like jumps between and 1 near the origin depending on the approach direction, so a shader or physics routine that uses it will flicker for tiny inputs. Recognising "no limit" tells you the special case cannot be fixed by picking a value.
- Testing by sampling has blind spots. The parabola example shows why random or grid-line probing can miss behaviour; property-based tests that try curved paths, or symbolic checks, catch more.
Exercises
Exercise 1: Two paths
Show that as does not exist.
Answer
Along the value is 1; along it is 2. Different, so no limit.
Solution
Exercise 2: Squeeze
Prove that as equals 0, and give a that works for .
Answer
, so works.
Solution
Exercise 3: A curved path
For , compute the limit along every line and along . What do you conclude?
Answer
0 along every line (and the -axis), but along , so the limit does not exist.
Solution
Exercise 4: Where is it continuous?
Where is continuous?
Answer
On the set of points with that are not on the unit circle .
Solution
is continuous where . The quotient is continuous where its denominator is non-zero, i.e. off the unit circle. Both conditions together give the answer.
Exercise 5: Check numerically (code)
Evaluate at the points , and for , and use the polar substitution to explain the result.
Answer
All values approach 1. In polar form , which depends only on and tends to 1, so the limit is 1.
Solution
import math
f = lambda x, y: math.sin(x*x + y*y) / (x*x + y*y)
for t in [0.1, 0.01, 0.001]:
print(t, [round(f(*p), 8) for p in [(t, 0), (t, t), (t, -2*t)]])0.1 [0.99998333, 0.99993333, 0.99958339]
0.01 [1.0, 0.99999999, 0.99999996]
0.001 [1.0, 1.0, 1.0]
Since as and , the limit is 1 from every direction at once.
Test yourself
A function tends to 0 along every straight line through the origin. What can you conclude?
- The limit at the origin is 0
- The limit does not exist
- Nothing yet: a curved path might give another value
- The function is continuous at the origin
In polar coordinates near the origin. What is as ?
- 1
- 0
- It does not exist
Which bound proves ?