III.1 · Calculus
What value does a function approach, even where it has none?
Slide a sample point toward a, watch the values on both sides, and separate three different questions — the value at a, the left limit and the right limit.
Approach a point from both sides
Approach a = 1 on f(x) = (x² − 1)/(x − 1)
Graph of f(x) = (x² − 1)/(x − 1) near a = 1. Left samples (blue) and right samples (green) at a ∓ 1, ½, ¼, ⅛, 1/16. Left limit 2, right limit 2, f(a) is undefined. The sample point x = 1.5 has f(x) = 2.5.
- Approach point
- 1
- Sample point
- 1.5
- Value at the sample
- 2.5
- Actual value at a
- undefinedThe denominator is exactly zero here; the expression has no value (even if it has a limit).
- Left limit
- 2
- Right limit
- 2
- Two-sided limit
- 2
- Distance from the limit
- 0.5
Exact values use =; binary64 approximations use ≈. Undefined values state their reason.
Exceptional case: The limit exists (2) but f(1) is undefined. A limit describes nearby values, not the value at the point.
| k | δ | f(a − δ) | f(a + δ) |
|---|---|---|---|
| 0 | 1 | 1 | 3 |
| 1 | 0.5 | 1.5 | 2.5 |
| 2 | 0.25 | 1.75 | 2.25 |
| 3 | 0.125 | 1.875 | 2.125 |
| 4 | 0.0625 | 1.9375 | 2.0625 |
| 5 | 0.03125 | 1.96875 | 2.03125 |
| 6 | 0.015625 | 1.984375 | 2.015625 |
| 7 | 0.0078125 | 1.9921875 | 2.0078125 |
Approach step 1: δ = 1
Evaluate at a − δ and a + δ, both different from a: f(a − δ) = 1, f(a + δ) = 3.
from −2.5 to 2.5, up to 2 decimal places
from −3 to 3, up to 2 decimal places
Start with the hole. The values of crowd toward from both sides, yet the inspector reports as undefined: the formula divides by there. Then choose Value ≠ limit: now exists, but the nearby values still approach . A limit is a statement about nearby values, never about the value at the point.
Intuition: watching from both sides
To ask for is to ask: as gets close to — but stays different from it — do the values settle near one number? Approaching from the left () and from the right () are two separate experiments. When both settle near the same number , the limit is . When they settle on different numbers, grow without bound, or never settle, the limit does not exist, and the way it fails is itself informative.
Definition
We write when can be made as close to as we like by taking close enough to ; similarly for . The two-sided limit exists exactly when both one-sided limits exist, are finite and are equal:
Precisely: for every tolerance there is a distance such that implies . The condition excludes : the value — if it exists — plays no part.
Mechanics: what the explorer evaluates
The table lists and for These are genuine evaluations at points different from ; for the rational examples they are exact. The inspector’s limit rows are not read from the table. They come from the function’s exact description: a common factor in a rational function is divided out, the sign of an unbounded side comes from the multiplicity of the root in the denominator, and the oscillation of is stated analytically. The value is evaluated separately and is never replaced by the limit.
Derivation: why the hole has limit 2
For ,
Cancelling is legitimate only because , which is exactly the situation a limit considers. The simplified expression is continuous, so it approaches . At the original expression is , which has no value: the function has a removable hole.
For there is no cancellation, but a squeeze works: for , and . So the limit is even though alone has no limit.
Worked example
Take and . With : and . With : and . With : and . Each pair sits exactly away from , because . The left and right limits are both , so , while is undefined.
Replay the worked derivation
Approach step 1: δ = 1
Evaluate at a − δ and a + δ, both different from a: f(a − δ) = 1, f(a + δ) = 3.
Failure cases
- Jump. For the step function, the left limit at is and the right limit is . They differ, so no two-sided limit exists.
- Unbounded. grows without bound from both sides of ; goes to from the left and from the right. Writing records how the limit fails; is not a real number.
- Oscillation. reaches both and on every interval around . Along the values are ; along they are .
Executable reference code
The pedagogical file evaluates exact one-sided tables with Fraction, cancels the common factor and shows the jump. The NumPy file samples two sequences of that approach and disagree, and checks the squeeze bound for .
"""One-sided approach tables with exact Fractions (III.1). We evaluate only at x != a; f(a) is a separate question."""
from fractions import Fraction as F
def hole(x):
if x == 1:
raise ZeroDivisionError("(x**2 - 1)/(x - 1) is 0/0 at x = 1: undefined")
return (x * x - 1) / (x - 1)
def approach(f, a, steps=8):
rows = []
for k in range(steps):
d = F(1, 2**k)
rows.append((d, f(a - d), f(a + d)))
return rows
rows = approach(hole, F(1))
# f(x) - 2 = x - 1 exactly, so each sample sits exactly delta away from 2.
assert all(left == 2 - d and right == 2 + d for d, left, right in rows)
# The value at the point is not the limit: it does not even exist.
try:
hole(F(1))
except ZeroDivisionError:
pass
else:
raise AssertionError("f(1) must be undefined")
# A jump: the two one-sided tables settle on different numbers.
step = lambda x: F(-1) if x < 0 else F(1)
jump = approach(step, F(0))
assert {left for _, left, _ in jump} == {-1} and {right for _, _, right in jump} == {1}"""Two approaches to 0 that disagree for sin(1/x), and a squeeze that works for x*sin(1/x) (III.1)."""
import numpy as np
k = np.arange(1, 200)
zeros = 1 / (k * np.pi) # sin(1/x) = sin(k*pi) = 0
ones = 2 / ((4 * k + 1) * np.pi) # sin(1/x) = sin(pi/2 + 2k*pi) = 1
assert np.allclose(np.sin(1 / zeros), 0, atol=1e-12)
assert np.allclose(np.sin(1 / ones), 1, atol=1e-12)
# Both sequences approach 0 from the right, yet the values approach 0 and 1: no limit exists.
assert zeros[-1] < 1e-2 and ones[-1] < 1e-2
# Squeeze: |x sin(1/x)| <= |x| -> 0.
x = np.concatenate([-np.logspace(-1, -8, 400), np.logspace(-8, -1, 400)])
assert np.all(np.abs(x * np.sin(1 / x)) <= np.abs(x))Explore
Move away from the special point on each function: away from its trouble spot every example is continuous and its limit equals its value. On 1/x, compare the blue and green columns. On x·sin(1/x), watch the distance row shrink as the sample approaches .
Common mistakes
Substituting answers a different question — the value, not the limit — and can produce . Agreement of a few table entries is not a proof. A limit that is “infinite” does not exist as a real number. A two-sided limit needs both sides; one convincing side is not enough.
Numerical considerations
Floating-point evaluation of very close to suffers cancellation: both numerator and denominator lose relative accuracy. The exact rational table avoids this; a binary64 table would eventually show noise. Choosing a sequence of points also chooses what you can see: aliasing and cancellation can make a numerical table misleading in either direction.
Engineering and ML connections
Limits underlie every derivative (III.3) and integral (III.12). In computation they appear as questions of stability: does a quantity settle as a step size shrinks, a learning rate decreases or a sample size grows? Expressions such as appear in normalisations (dividing by a vanishing norm), and robust code handles them explicitly rather than hoping for a limiting value.
Exercises
Summary and checkpoints
A limit describes the values near , from each side, not the value at . It exists when both one-sided limits exist, are finite and agree. Removable holes, jumps, unbounded and oscillating behaviour are distinct ways to fail. Next, III.2 asks when the value at a point does equal its limit: continuity.