In Chapter 1 we computed the slope of the parabola $y = x^2$ at the point $(1, 1)$. We took the secant slope between $(1,1)$ and a nearby point $(1+h,\,(1+h)^2)$, simplified it to $\frac{(1+h)^2 - 1}{h} = 2 + h$, and then let $h$ "approach zero."...
Prerequisites
- chapter-01-why-calculus
- chapter-02-functions-and-models
Learning Objectives
- State the intuitive meaning of $\lim_{x \to a} f(x) = L$ in plain English, and explain why the limit ignores the value $f(a)$
- Evaluate limits using algebraic manipulation: factoring, rationalization, and combining fractions
- Distinguish two-sided limits from one-sided limits and recognize when each is appropriate
- Identify limits at infinity (horizontal asymptotes) and infinite limits (vertical asymptotes)
- Apply the limit laws and the squeeze theorem to compute limits that resist direct substitution
- Read, interpret, and produce a formal ε-δ proof, understanding it as the formalization of the intuitive picture (math-major track)
- Use Python's sympy to compute limits symbolically and numpy to gather numerical evidence
In This Chapter
- 3.1 The Word That Hides All of Calculus
- 3.2 Limits Intuitively
- 3.3 Computing Simple Limits: When Substitution Just Works
- 3.4 One-Sided Limits
- 3.5 Limits Involving Infinity
- 3.6 The Limit Laws
- 3.7 The Squeeze Theorem
- 3.8 A Strategy for Computing Limits
- 3.9 Computation: Gathering Evidence with Python
- 3.10 The Formal ε-δ Definition (Math Major Sidebar)
- 3.11 Why Limits Matter
- Looking Ahead
Chapter 3 — The Limit: What Happens When You Get Infinitely Close
3.1 The Word That Hides All of Calculus
In Chapter 1 we computed the slope of the parabola $y = x^2$ at the point $(1, 1)$. We took the secant slope between $(1,1)$ and a nearby point $(1+h,\,(1+h)^2)$, simplified it to $\frac{(1+h)^2 - 1}{h} = 2 + h$, and then let $h$ "approach zero." The slope came out to $2$. The argument was persuasive but informal — we never quite said what "approach zero" means, and we certainly never explained why we were allowed to cancel the $h$ in the denominator and then set $h$ to zero anyway.
Also in Chapter 1 we estimated the area under $y = x^2$ from $0$ to $1$ by adding up the areas of $n$ thin rectangles and letting $n$ "approach infinity." The area came out to $\tfrac13$. Same suspicious word, same informal meaning.
That single phrase — approach — hides the entire content of calculus. The procedure of letting a quantity move toward a value, getting arbitrarily close without ever quite arriving, is the limit (also called a limiting process). Everything in the next thirty-seven chapters is built on it. This chapter makes "approach" precise.
Consider how often the idea returns. The derivative is a limit. The definite integral is a limit. A sequence converges or diverges according to a limit. An infinite series is the limit of its partial sums. Continuity is defined by a limit. The radius of convergence of a power series is a limit. There is essentially no concept in calculus that does not, at bottom, reduce to a limit. This is the first of our recurring themes made concrete: approximation is the soul of calculus, and the limit is the tool that turns "close enough" into mathematical certainty.
So this chapter demands attention. Read it slowly. We will work at the three rigor levels promised in Chapter 1:
- Intuitive (Sections 3.2–3.5): what a limit means, in plain language and pictures.
- Computational (Sections 3.6–3.9): how to find limits — the algebra and the decision tree.
- Formal (Section 3.10, a Math Major Sidebar): the ε-δ definition, presented not as a hazing ritual but as the exact translation of the intuitive picture into airtight logic.
The Key Insight. A limit answers the question "what value is $f(x)$ heading toward as $x$ heads toward $a$?" — and it answers it regardless of, and ignoring, the value $f(a)$ itself. The whole of calculus is built on this one move: studying a function's behavior in the immediate neighborhood of a point while deliberately leaving the point itself out.
3.2 Limits Intuitively
Suppose $f$ is a function defined near a point $a$ — defined near $a$, meaning on some open interval around $a$, though perhaps not at $a$ itself. That gap at $a$ is allowed and will turn out to be the interesting case. We ask:
As $x$ gets closer and closer to $a$ (but with $x \neq a$), does $f(x)$ get closer and closer to a single value?
If $f(x)$ gets arbitrarily close to one number $L$ — and stays close — we write
$$\lim_{x \to a} f(x) = L,$$
read "the limit of $f(x)$ as $x$ approaches $a$ equals $L$." Three features of this statement deserve to be burned in:
-
We don't care what $f(a)$ is. The limit is about behavior near $a$, not at $a$. The function might be undefined at $a$, or defined there but equal to some unrelated number. Either way the limit is unaffected.
-
$x$ approaches $a$ but never equals $a$. The limit captures the journey, not the destination point itself.
-
The same $L$ must result from every approach. From the left, from the right, jumping around — every way of sneaking up on $a$ must produce the same target $L$. If two different approaches head to two different numbers, the limit does not exist.
A limit that exists
Consider $f(x) = \dfrac{x^2 - 1}{x - 1}$. Its natural domain excludes $x = 1$, where the denominator is zero. What is $\lim_{x \to 1} f(x)$?
Gather numerical evidence by plugging in values that creep toward $1$ from both sides:
| $x$ | $f(x)$ | $x$ | $f(x)$ | |
|---|---|---|---|---|
| $0.9$ | $1.9$ | $1.1$ | $2.1$ | |
| $0.99$ | $1.99$ | $1.01$ | $2.01$ | |
| $0.999$ | $1.999$ | $1.001$ | $2.001$ |
From both sides the values home in on $2$. So $\lim_{x \to 1} f(x) = 2$ — even though $f(1)$ does not exist.
The numerical table builds confidence, but it never proves anything (the values could in principle veer off at $x = 0.99999$). The algebra settles it. Factor the numerator and cancel:
$$\frac{x^2 - 1}{x - 1} = \frac{(x-1)(x+1)}{x-1} = x + 1 \quad \text{for } x \neq 1.$$
For every $x$ near $1$ except $1$ itself, $f(x)$ is literally equal to $x + 1$. And $x+1 \to 2$ as $x \to 1$. So the limit is exactly $2$. This is the first of our themes in miniature: the geometry/numerics (a table approaching $2$) and the algebra (a clean cancellation) tell the same story, and you need both — one to suggest the answer, the other to certify it.
Geometric Intuition. The graph of $f(x) = \frac{x^2-1}{x-1}$ is the straight line $y = x+1$ with a single point punched out at $(1, 2)$ — a "hole" in the graph. As your eye slides along the line toward $x = 1$ from either side, the height marches toward $2$. The hole at the point is irrelevant to where the line is heading. The limit reads off the height the graph is aiming at, not whether the graph actually lands there. That punched-out point is the whole moral of the section.
Check Your Understanding. Let $f(x) = \dfrac{x^2 - 9}{x - 3}$. Predict $\lim_{x \to 3} f(x)$ by simplifying, then say what $f(3)$ equals.
Answer
Factor: $\frac{(x-3)(x+3)}{x-3} = x+3$ for $x \neq 3$. So $\lim_{x\to 3} f(x) = 3+3 = 6$. But $f(3)$ is undefined (it gives $0/0$). The limit is $6$; the function has a hole at $(3,6)$. Limit value and function value need not agree — and here the function value does not even exist.
A limit that does not exist (a jump)
Consider the sign function restricted to nonzero inputs,
$$g(x) = \begin{cases} 1 & \text{if } x > 0, \\ -1 & \text{if } x < 0, \end{cases}$$
undefined at $x = 0$. What is $\lim_{x \to 0} g(x)$?
Approaching $0$ from the right (positive $x$) gives $g(x) = 1$. Approaching from the left (negative $x$) gives $g(x) = -1$. The two approaches disagree, so there is no single target $L$. We conclude $\lim_{x \to 0} g(x)$ does not exist (often abbreviated DNE).
This is exactly the situation that motivates one-sided limits in Section 3.4: when the two directions disagree, we want a vocabulary for describing each direction separately.
A limit that does not exist (wild oscillation)
Consider $h(x) = \sin(1/x)$ near $x = 0$. As $x \to 0^+$, the input $1/x \to +\infty$, so $\sin(1/x)$ races through its full range $[-1, 1]$ infinitely many times in any interval next to $0$. It never settles. The limit does not exist — not because of a jump, but because of unending oscillation.
# Visualize sin(1/x) near 0: infinitely fast oscillation, no limit
import numpy as np
import matplotlib.pyplot as plt
x = np.linspace(0.001, 0.1, 2000)
plt.plot(x, np.sin(1 / x), linewidth=0.5)
plt.xlabel("$x$"); plt.ylabel(r"$\sin(1/x)$")
plt.title("A function with no limit at 0")
plt.show()
# The curve compresses into an ever-denser band of oscillations
# as x -> 0; it does not approach any single height.
The plot shows the oscillations bunching up and growing infinitely fast as $x \to 0$. No value of $L$ can be the limit.
Common Pitfall. Many students see $h(0)$ is undefined and conclude "therefore the limit is undefined too." That reasoning is backwards. Being undefined at the point never decides the limit — recall $\frac{x^2-1}{x-1}$ was undefined at $1$ yet had a perfectly good limit. The limit of $\sin(1/x)$ fails to exist for a completely different reason: the function oscillates and never approaches a single value. Diagnose why a limit fails (hole, jump, blow-up, or oscillation); don't just point at an undefined point.
3.3 Computing Simple Limits: When Substitution Just Works
For most "nice" functions — polynomials, exponentials, logarithms, sines and cosines, and their sums, products, and quotients — limits are computed by simply plugging in:
$$\lim_{x \to a} f(x) = f(a).$$
This holds whenever $f$ is continuous at $a$, a property we define carefully in Chapter 4. For now, take the slogan on faith: for nice functions at nice points, limit equals value.
- $\lim_{x \to 2} (x^2 + 3x - 1) = 4 + 6 - 1 = 9.$
- $\lim_{x \to 0} e^x = e^0 = 1.$
- $\lim_{x \to \pi/2} \sin x = \sin(\pi/2) = 1.$
The interesting cases — the cases that occupy the rest of this chapter — are exactly the ones where "limit equals value" fails: where the function is undefined at $a$, or jumps, or blows up. Those are the cases where the limit earns its keep.
Indeterminate forms: the 0/0 trap
The single most common limit problem is one where naïve substitution produces
$$\frac{0}{0}.$$
For instance, plugging $x = 1$ into $\frac{x^2 - 1}{x - 1}$ gives $\frac{0}{0}$. The form $0/0$ is called indeterminate: by itself it tells you nothing about the answer. The limit might be $2$ (as here), or $0$, or $\infty$, or fail to exist — the form alone cannot distinguish these. You must do algebra to resolve it.
Warning. "Indeterminate" is not the same as "undefined" or "infinite." $\frac{1}{0}$ is genuinely problematic (it signals a blow-up). But $\frac{0}{0}$ is a promise that more work is needed, not a verdict. The numerator and denominator are both shrinking, and the limit depends on the race between them — which one shrinks faster. Never write "$\frac00 = 1$" or "$\frac00 = 0$"; the symbol carries no value at all.
Three algebraic moves resolve almost every $0/0$ you will meet in this chapter.
(a) Factor and cancel — when numerator and denominator share a factor of $(x - a)$:
$$\lim_{x \to 2} \frac{x^2 - 4}{x - 2} = \lim_{x \to 2} \frac{(x - 2)(x + 2)}{x - 2} = \lim_{x \to 2} (x + 2) = 4.$$
(b) Rationalize — when a square root creates the $0/0$. Multiply by the conjugate:
$$\lim_{x \to 0} \frac{\sqrt{x + 4} - 2}{x} = \lim_{x \to 0} \frac{\sqrt{x + 4} - 2}{x} \cdot \frac{\sqrt{x + 4} + 2}{\sqrt{x + 4} + 2} = \lim_{x \to 0} \frac{(x + 4) - 4}{x\left(\sqrt{x + 4} + 2\right)} = \lim_{x \to 0} \frac{1}{\sqrt{x + 4} + 2} = \frac{1}{4}.$$
The conjugate turns the troublesome difference of roots into a plain difference, which cancels the $x$.
(c) Combine fractions — when the limit hides a difference of fractions:
$$\lim_{x \to 0} \frac{1}{x}\left(\frac{1}{x + 1} - 1\right) = \lim_{x \to 0} \frac{1}{x} \cdot \frac{1 - (x + 1)}{x + 1} = \lim_{x \to 0} \frac{-x}{x(x + 1)} = \lim_{x \to 0} \frac{-1}{x + 1} = -1.$$
In each move the strategy is identical: the offending factor that drove both parts to zero is algebraically removed, after which substitution is safe.
Check Your Understanding. Evaluate $\displaystyle\lim_{x \to 4} \frac{\sqrt{x} - 2}{x - 4}$.
Answer
Substitution gives $0/0$. Rationalize: multiply by $\frac{\sqrt x + 2}{\sqrt x + 2}$ to get $\frac{x - 4}{(x-4)(\sqrt x + 2)} = \frac{1}{\sqrt x + 2}$. Then the limit is $\frac{1}{\sqrt 4 + 2} = \frac14$. (Alternatively, factor $x - 4 = (\sqrt x - 2)(\sqrt x + 2)$.)Computational Note.
sympyevaluates limits symbolically withsp.limit(f, x, a), and you can force a direction with a fourth argument'+'or'-'. Use it to check hand work, never to replace it — the algebra is what builds your understanding; sympy confirms you executed it correctly. This is our recurring theme: hand computation builds understanding, machine computation builds power.
# Verify the three worked limits symbolically
import sympy as sp
x = sp.symbols("x")
print(sp.limit((x**2 - 1) / (x - 1), x, 1)) # 2
print(sp.limit((sp.sqrt(x + 4) - 2) / x, x, 0)) # 1/4
print(sp.limit((1/(x + 1) - 1) / x, x, 0)) # -1
print(sp.limit(sp.sin(1 / x), x, 0)) # AccumBounds(-1, 1)
The final output, AccumBounds(-1, 1), is sympy's way of reporting that $\sin(1/x)$ accumulates throughout $[-1,1]$ near $0$ and so has no single limiting value — the symbolic counterpart of the oscillation picture from Section 3.2.
3.4 One-Sided Limits
When a function approaches different values from the two sides — or when $a$ sits at the edge of the domain — we describe each direction with a one-sided limit.
The right-hand limit (approach from above, $x > a$):
$$\lim_{x \to a^+} f(x) = L \quad\text{means}\quad f(x) \to L \text{ as } x \to a \text{ through values } x > a.$$
The left-hand limit (approach from below, $x < a$):
$$\lim_{x \to a^-} f(x) = L \quad\text{means}\quad f(x) \to L \text{ as } x \to a \text{ through values } x < a.$$
These two notions are tied to the two-sided limit by a single clean rule:
$$\lim_{x \to a} f(x) = L \quad\Longleftrightarrow\quad \lim_{x \to a^+} f(x) = L \;\text{ and }\; \lim_{x \to a^-} f(x) = L.$$
In words: the two-sided limit exists if and only if both one-sided limits exist and agree. This is the precise diagnostic for the "jump" failure from Section 3.2 — the sign function fails because its two one-sided limits are $+1$ and $-1$, which disagree.
Example: a piecewise function
$$f(x) = \begin{cases} x^2 & x < 1, \\ 3 & x = 1, \\ 2x - 1 & x > 1. \end{cases}$$
Compute the two sides at $x = 1$:
- $\displaystyle\lim_{x \to 1^-} f(x) = \lim_{x \to 1^-} x^2 = 1$ (use the $x<1$ formula).
- $\displaystyle\lim_{x \to 1^+} f(x) = \lim_{x \to 1^+} (2x - 1) = 1$ (use the $x>1$ formula).
Both one-sided limits equal $1$, so $\lim_{x \to 1} f(x) = 1$. Notice that $f(1) = 3$, not $1$ — the value at the point and the limit disagree. This is allowed, and Chapter 4 will name it a removable discontinuity: the limit exists but the function is "defined wrong" at the single point.
Example: the absolute-value quotient
For $f(x) = |x|/x$, defined for $x \neq 0$, recall $|x| = x$ when $x>0$ and $|x| = -x$ when $x<0$:
- $\displaystyle\lim_{x \to 0^+} \frac{|x|}{x} = \lim_{x \to 0^+} \frac{x}{x} = 1.$
- $\displaystyle\lim_{x \to 0^-} \frac{|x|}{x} = \lim_{x \to 0^-} \frac{-x}{x} = -1.$
The one-sided limits disagree, so $\lim_{x \to 0} |x|/x$ does not exist. (This function is the sign function in disguise.)
Real-World Application — Tax brackets and step functions (economics). A marginal income-tax schedule is a step function: the marginal rate jumps the moment your income crosses a bracket boundary. At a boundary income $a$, the left-hand limit of the marginal rate (the rate just below the threshold) differs from the right-hand limit (the rate just above). Economists model these thresholds precisely with one-sided limits, and a great deal of policy debate is about the size of that jump — a discontinuity that one-sided limits quantify exactly. The same mathematics describes shipping costs that jump at weight cutoffs and electricity prices that step up at usage tiers.
3.5 Limits Involving Infinity
There are two distinct ways infinity enters limits, and confusing them is a classic error. Infinity can be where $x$ is going (limits at infinity), or where $f(x)$ is going (infinite limits). Keep them separate.
Limits at infinity: long-run behavior
We can ask what happens to $f(x)$ as $x \to \infty$ or $x \to -\infty$. These limits at infinity describe the function's long-run behavior and locate its horizontal asymptotes:
$$\lim_{x \to \infty} f(x) = L \quad\text{means}\quad f(x) \to L \text{ as } x \text{ grows without bound},$$
which corresponds to a horizontal asymptote $y = L$ on the far right of the graph.
Rational function. Consider $\displaystyle\lim_{x \to \infty} \frac{3x^2 + 5}{2x^2 - x + 1}$. Both top and bottom blow up, an "$\infty/\infty$" indeterminate form. The clean technique: divide numerator and denominator by the highest power of $x$ in the denominator, here $x^2$:
$$\frac{3x^2 + 5}{2x^2 - x + 1} = \frac{3 + 5/x^2}{2 - 1/x + 1/x^2}.$$
As $x \to \infty$, every term with $x$ in the denominator vanishes: $5/x^2 \to 0$, $1/x \to 0$, $1/x^2 \to 0$. What survives is $\frac{3}{2}$. So the limit is $\tfrac32$, and $y = \tfrac32$ is a horizontal asymptote.
This computation generalizes into a rule worth memorizing. For a rational function $p(x)/q(x)$ as $x \to \pm\infty$:
- If $\deg p < \deg q$: the limit is $0$ (the bottom wins; horizontal asymptote $y=0$).
- If $\deg p = \deg q$: the limit is the ratio of the leading coefficients.
- If $\deg p > \deg q$: the limit is $\pm\infty$ (the top wins; no horizontal asymptote).
Exponential beats polynomial. A more dramatic example:
$$\lim_{x \to \infty} \frac{x^{100}}{e^x} = 0.$$
Even a polynomial of degree $100$ loses to $e^x$ in the long run — the exponential eventually grows faster than any polynomial. This is slow to believe and worth pausing on; we will prove it cleanly in Chapter 9 using L'Hôpital's Rule.
Check Your Understanding. Find $\displaystyle\lim_{x \to \infty} \frac{5x^3 - 2x}{1 - x^3}$ and $\displaystyle\lim_{x \to \infty} \frac{4x + 7}{x^2 + 1}$.
Answer
First: equal degrees ($3$ and $3$), so the limit is the ratio of leading coefficients, $\frac{5}{-1} = -5$. Second: numerator degree $1$ is less than denominator degree $2$, so the limit is $0$. Confirm by dividing through by $x^2$: $\frac{4/x + 7/x^2}{1 + 1/x^2} \to \frac{0}{1} = 0$.
Infinite limits: blow-ups and vertical asymptotes
When $f(x)$ grows without bound as $x \to a$, we write
$$\lim_{x \to a} f(x) = \infty.$$
This is a slight abuse of language: $\infty$ is not a number, so this is not a "the limit exists" statement in the strict sense. It is shorthand for "$f(x)$ increases past every bound." It usefully describes the behavior and signals a vertical asymptote.
The cleanest example is $f(x) = 1/x$ at $x = 0$. Approaching from the two sides gives opposite signs:
$$\lim_{x \to 0^+} \frac{1}{x} = +\infty, \qquad \lim_{x \to 0^-} \frac{1}{x} = -\infty.$$
The graph rockets up to the right of $0$ and plunges down to the left — a vertical asymptote at $x = 0$, with the two sides disagreeing even in sign.
Common Pitfall. Students routinely conflate $\lim_{x\to\infty} f(x)$ (where $x$ runs off to the right) with $\lim_{x\to a} f(x) = \infty$ (where $f$ runs off upward at a finite $a$). The first is a horizontal asymptote; the second is a vertical asymptote. They are geometrically perpendicular. Read the location of the $\infty$ carefully: under the "$\lim$" tells you what $x$ does; the right side tells you what $f$ does.
Geometric Intuition. A horizontal asymptote is a height the graph flattens toward as you walk infinitely far right or left — the curve hugs a horizontal line. A vertical asymptote is a wall at a finite $x = a$ that the graph climbs (or drops) along without bound as you approach. Picture $y = 1/x$: it flattens onto the $x$-axis far out (horizontal asymptote $y=0$, from the limit at infinity) and shoots up the $y$-axis near $0$ (vertical asymptote $x=0$, from the infinite limit). One picture, both phenomena.
3.6 The Limit Laws
For limits that exist as finite numbers, arithmetic behaves exactly as you would hope: limits pass through sums, differences, products, quotients, powers, and roots. These limit laws are what make limit computation mechanical once you have a few basic limits in hand.
Suppose $\lim_{x \to a} f(x) = L$ and $\lim_{x \to a} g(x) = M$ both exist (as finite numbers). Then:
- Sum: $\displaystyle\lim_{x \to a} [f(x) + g(x)] = L + M.$
- Difference: $\displaystyle\lim_{x \to a} [f(x) - g(x)] = L - M.$
- Constant multiple: $\displaystyle\lim_{x \to a} [c\,f(x)] = cL$ for any constant $c$.
- Product: $\displaystyle\lim_{x \to a} [f(x)\,g(x)] = LM.$
- Quotient: $\displaystyle\lim_{x \to a} \frac{f(x)}{g(x)} = \frac{L}{M},$ provided $M \neq 0$.
- Power: $\displaystyle\lim_{x \to a} [f(x)]^n = L^n$ for positive integers $n$.
- Root: $\displaystyle\lim_{x \to a} \sqrt[n]{f(x)} = \sqrt[n]{L}$, provided the root is defined ($L \ge 0$ when $n$ is even).
Combined with the two basic limits $\lim_{x\to a} c = c$ and $\lim_{x\to a} x = a$, these laws prove the "plug in" rule for polynomials: a polynomial is built from $x$ and constants by sums and products, so its limit is gotten by substitution. That is why Section 3.3 worked.
Warning. Every limit law carries the hypothesis that both limits exist as finite numbers. When a limit is infinite or fails to exist, the laws can break. Expressions like $0 \cdot \infty$, $\infty - \infty$, $\infty/\infty$, and $0/0$ are indeterminate forms — the laws do not resolve them, and you must investigate the specific limit by algebra (Section 3.3) or, later, L'Hôpital's Rule (Chapter 9). For example, $\lim_{x\to 0^+}\big(\frac{1}{x} - \frac{1}{x}\big) = 0$ but $\lim_{x\to 0^+}\big(\frac{1}{x} - \frac{1}{x^2}\big) = -\infty$: both look like "$\infty - \infty$," yet they differ. The form alone decides nothing.
3.7 The Squeeze Theorem
Sometimes a function is too wild to attack head-on — it oscillates, or mixes growth rates — yet you can trap it between two simpler functions whose limits you already know. If both trappers head to the same place, the trapped function has nowhere else to go.
Squeeze Theorem. If $g(x) \le f(x) \le h(x)$ for all $x$ near $a$ (except possibly at $a$), and $$\lim_{x \to a} g(x) = \lim_{x \to a} h(x) = L,$$ then $\lim_{x \to a} f(x) = L$ as well.
Geometric Intuition. Picture three curves: a floor $g$, a ceiling $h$, and the function $f$ pinned between them. As $x \to a$ the floor and ceiling close together to a single height $L$ — like two hands closing around an object. The function $f$, sandwiched in the gap, is forced to the same height. It has no room to do anything else. This is why the result is also called the "sandwich theorem" or "pinching theorem."
The classic squeeze
$$\lim_{x \to 0} x^2 \sin\!\left(\frac{1}{x}\right).$$
The factor $\sin(1/x)$ oscillates wildly near $0$ (recall Section 3.2) — but it is always bounded: $-1 \le \sin(1/x) \le 1$. Multiply through by $x^2 \ge 0$ (which preserves the inequalities):
$$-x^2 \le x^2 \sin\!\left(\frac{1}{x}\right) \le x^2.$$
As $x \to 0$, both $-x^2 \to 0$ and $x^2 \to 0$. The wild middle term is squeezed to $0$:
$$\lim_{x \to 0} x^2 \sin\!\left(\frac{1}{x}\right) = 0.$$
The oscillation never stops, but its amplitude is throttled to zero by the $x^2$ envelope. Direct substitution and the limit laws are helpless here — the squeeze theorem is the only elementary tool that works.
The most important squeeze in calculus
$$\lim_{x \to 0} \frac{\sin x}{x} = 1.$$
This limit is the keystone of trigonometric calculus: it is exactly what we will need in Chapter 7 to differentiate $\sin x$ from the definition. Substitution gives the indeterminate $0/0$, and no factoring removes it. The proof (which we develop fully in Chapter 7) is a geometric squeeze: comparing the areas of two triangles and a circular sector of angle $x$ gives, for small $x > 0$,
$$\cos x \le \frac{\sin x}{x} \le 1.$$
As $x \to 0$, $\cos x \to 1$ and the constant $1$ stays put, so the middle is squeezed to $1$. Numerical evidence makes the convergence vivid:
# Numerical evidence for lim_{x->0} sin(x)/x = 1
import numpy as np
for h in [0.1, 0.01, 0.001, 0.0001]:
print(f"x = {h:<8} sin(x)/x = {np.sin(h)/h:.10f}")
# x = 0.1 sin(x)/x = 0.9983341665
# x = 0.01 sin(x)/x = 0.9999833334
# x = 0.001 sin(x)/x = 0.9999998333
# x = 0.0001 sin(x)/x = 0.9999999983
Each tenfold step toward $0$ adds roughly two more nines — convergence to $1$ is unmistakable.
The Key Insight. The squeeze theorem is the workhorse for limits where the function itself is intractable but a bound on it is easy. You trade an impossible direct computation for two easy ones. We will use the same trapping idea again in Chapter 22 for the comparison tests that decide whether an infinite series converges — the squeeze logic scales all the way up.
3.8 A Strategy for Computing Limits
With the tools assembled, here is a decision tree for any limit problem. Work down the list; the first applicable step usually finishes the job.
- Substitute first. Plug in $x = a$. If you get a finite number (and the function is nice there), that number is the limit. Most limits stop here.
- If you get $0/0$: factor and cancel, rationalize a root, or combine fractions to remove the offending factor (Section 3.3), then substitute again.
- If $x \to \pm\infty$: divide top and bottom by the highest power of $x$, or compare growth rates (Section 3.5).
- If the answer involves $\sin$, $\cos$, or a bounded oscillating factor: look for a squeeze (Section 3.7).
- If one-sided behavior is in play (piecewise definitions, $|x|$, even roots near an edge, suspected vertical asymptote): compute the left and right limits separately and compare (Section 3.4).
- If an indeterminate form survives every algebraic attempt ($0/0$ or $\infty/\infty$ with no obvious cancellation): set it aside for L'Hôpital's Rule in Chapter 9.
Check Your Understanding. Which strategy step applies to each limit? (a) $\lim_{x\to 5}(x^2 - 3)$; (b) $\lim_{x\to 2}\frac{x^2-4}{x-2}$; (c) $\lim_{x\to\infty}\frac{2x-1}{5x+3}$; (d) $\lim_{x\to 0} x\cos(1/x)$.
Answer
(a) Step 1, substitute: $25 - 3 = 22$. (b) Step 2, factor: $\frac{(x-2)(x+2)}{x-2}\to 4$. (c) Step 3, divide by $x$: $\frac{2 - 1/x}{5 + 3/x}\to \frac{2}{5}$. (d) Step 4, squeeze: $-|x|\le x\cos(1/x)\le |x|$, both ends $\to 0$, so the limit is $0$.
3.9 Computation: Gathering Evidence with Python
Python plays two complementary roles with limits, mirroring our hand/machine theme. numpy gathers numerical evidence — a table of values marching toward the answer, which builds intuition but never proves anything. sympy computes the limit symbolically — an exact answer that confirms (or refutes) your hand work. Used together they are a tight feedback loop: predict by hand, probe numerically, certify symbolically.
# A numerical "probe" and a symbolic "proof" for lim_{x->1} (x^2 - 1)/(x - 1)
import numpy as np
import sympy as sp
# Numerical evidence: approach x = 1 from both sides
f = lambda x: (x**2 - 1) / (x - 1)
for x0 in [0.9, 0.99, 0.999, 1.001, 1.01, 1.1]:
print(f"x = {x0:<7} f(x) = {f(x0):.6f}")
# x = 0.9 f(x) = 1.900000 ... values close in on 2 from both sides ...
# x = 1.1 f(x) = 2.100000
# Symbolic proof: the exact limit
x = sp.symbols("x")
print("exact limit:", sp.limit((x**2 - 1) / (x - 1), x, 1)) # exact limit: 2
Computational Note — Floating point cannot see the hole. If you ask numpy for
f(1.0)directly you get adivide by zerowarning andnan, because the computer really does evaluate $0/0$ at the point. That is the limit's whole lesson rendered in silicon: the value at $x=1$ is undefined (ornan), yet the limit — the height the nearby values approach — is a clean $2$. Probing with values near but not equal to $1$ sidesteps the hole, exactly as the limit definition does. Never trust a single numerical value at the limit point; sample the neighborhood.
3.10 The Formal ε-δ Definition (Math Major Sidebar)
Math Major Sidebar. This section is optional for engineers, scientists, and business students — the intuitive picture from Sections 3.2–3.8 carries you through every later chapter of this book without modification. It is essential for math majors and for anyone heading into real analysis. What follows is not a new and harder idea; it is the exact same idea you already have, translated into airtight logic.
Everything so far has rested on the phrase "$f(x)$ gets arbitrarily close to $L$ as $x$ gets close to $a$." That phrase is intuitive but slippery. How close? Close enough for what? Mathematicians spent nearly two centuries (Leibniz to Weierstrass, roughly 1675–1860) struggling to pin it down. The resolution, due to Karl Weierstrass, is the ε-δ definition, and its key move is to reframe "close" as a challenge-and-response game about accuracy.
The ε-δ Definition of a Limit. $\displaystyle\lim_{x \to a} f(x) = L$ means: for every $\varepsilon > 0$, there exists a $\delta > 0$ such that $$0 < |x - a| < \delta \implies |f(x) - L| < \varepsilon.$$
Read it as a game between a skeptic and you:
- The skeptic names an output tolerance $\varepsilon > 0$: "I challenge you to keep $f(x)$ within $\varepsilon$ of $L$."
- You must respond with an input tolerance $\delta > 0$: "Keep $x$ within $\delta$ of $a$ (but not equal to $a$), and I guarantee $f(x)$ lands within $\varepsilon$ of $L$."
- You win the limit if you can answer every challenge, no matter how small the skeptic makes $\varepsilon$.
The clause $0 < |x - a|$ excludes $x = a$ itself — encoding, in symbols, the recurring insistence that the limit ignores the point. The definition is precisely the statement "$f(x)$ can be forced as close to $L$ as desired by forcing $x$ close enough to $a$," with "as desired" $= \varepsilon$ and "close enough" $= \delta$.
Geometric Intuition — the box picture. Draw the target $L$ on the $y$-axis and shade the horizontal band $L - \varepsilon < y < L + \varepsilon$ — the output tolerance the skeptic demands. Now draw the vertical strip $a - \delta < x < a + \delta$ around $a$ on the $x$-axis. The limit statement says: you can choose the width $\delta$ of the vertical strip so narrow that the graph, over that strip (with the single point above $a$ removed), stays entirely inside the horizontal band. The graph enters a $\delta$-wide doorway on the left and is required to exit through an $\varepsilon$-tall window on the right. Shrinking the window ($\varepsilon \to 0$) forces a narrower doorway ($\delta \to 0$), but a doorway can always be found. The limit exists exactly when this box can always be drawn. This is the picture every analyst carries; memorize it and the symbols become a description of a drawing.
A worked ε-δ proof
Prove $\displaystyle\lim_{x \to 3} (2x - 1) = 5$.
Scratch work (find $\delta$). We need $|(2x-1) - 5| < \varepsilon$. Simplify the left side: $$|(2x - 1) - 5| = |2x - 6| = 2|x - 3|.$$ We want $2|x - 3| < \varepsilon$, i.e. $|x - 3| < \varepsilon/2$. So choosing $\delta = \varepsilon/2$ should work. (Scratch work is exploratory and need not appear in the final proof.)
Formal proof. Let $\varepsilon > 0$ be given. Choose $\delta = \varepsilon/2 > 0$. Suppose $0 < |x - 3| < \delta$. Then $$|(2x - 1) - 5| = 2|x - 3| < 2\delta = 2\cdot\frac{\varepsilon}{2} = \varepsilon. \qquad \blacksquare$$
The structure is universal: scratch work to discover $\delta$ as a function of $\varepsilon$, then a clean forward proof that verifies the choice. For a linear function $\delta$ comes out proportional to $\varepsilon$. For higher-degree functions you usually take $\delta = \min\{1,\ \varepsilon/K\}$ for a suitable constant $K$ — first restricting to $|x-a|<1$ to bound the "extra" factor, then shrinking further to handle $\varepsilon$ — but the challenge-and-response skeleton never changes.
Common Pitfall (ε-δ). A frequent error is choosing $\delta$ that depends on $x$. Your $\delta$ may depend on $\varepsilon$ (and on $a$), but it must be a single number that works for all $x$ in the strip — it cannot itself contain $x$. If you find yourself writing "$\delta = \varepsilon/(2x)$," you have not yet bounded the variable factor; restrict to $|x-a|<1$ first to replace the stray $x$ with a constant.
Why this is the formalization, not a replacement
Here is the payoff that justifies the whole sidebar. The ε-δ definition does not change the intuitive idea — it certifies it. Look back at the punched-out-hole picture (Section 3.2): the graph approaches height $2$. The ε-δ definition says exactly that, with no appeal to motion or "approaching": for any output window around $2$, there is an input strip around $1$ keeping the graph in the window. There is no vague "gets close" left — only quantifiers. Bishop Berkeley had mocked Newton's infinitesimals as "the ghosts of departed quantities"; the ε-δ definition exorcises the ghosts by never invoking infinitely small numbers at all. It speaks only of finite tolerances $\varepsilon$ and $\delta$, however small, and a logical relationship between them. That single reframing — from "infinitely close" to "as close as you like, provably" — is what finally put calculus on solid ground.
Historical Note. The rigorization took a relay of mathematicians. Augustin-Louis Cauchy (1820s) gave the first systematic treatment of limits and continuity but still leaned on intuitive "infinitely small" language. Bernard Bolzano had similar ideas even earlier (1817) but went largely unread. Karl Weierstrass, lecturing in Berlin around 1860, produced the static, quantifier-based ε-δ formulation we use today — banishing motion and infinitesimals from the foundations entirely. It is no accident that real analysis still feels like Weierstrass: he wrote the grammar.
3.11 Why Limits Matter
We close where we opened: by justifying all this trouble. The limit is not a topic you pass through and leave behind — it is the operation every later definition in the book is built from.
The derivative is a limit (the instantaneous rate of change, defined in Chapters 5 and 6):
$$f'(a) = \lim_{h \to 0} \frac{f(a + h) - f(a)}{h}.$$
The definite integral is a limit (the accumulated area, Chapter 13):
$$\int_a^b f(x)\,dx = \lim_{n \to \infty} \sum_{i=1}^{n} f(x_i)\,\Delta x.$$
Continuity is defined by a limit (Chapter 4) — and it is the single hypothesis that makes the entire theory work:
$$f \text{ is continuous at } a \iff \lim_{x \to a} f(x) = f(a).$$
The convergence of a series is a limit of partial sums (Chapters 20–22):
$$\sum_{n=1}^{\infty} a_n = \lim_{N \to \infty} \sum_{n=1}^{N} a_n, \quad \text{when this limit exists}.$$
And the crowning result of the whole book, the Fundamental Theorem of Calculus (Chapter 14), states that the two limit-built operations — the derivative and the integral — are inverses of each other. Every one of these rests on the limit. Master it now, and the next thirty-seven chapters have a foundation. Skip it, and they rest on sand.
Add to Your Modeling Portfolio. Return to the function you chose for your modeling project in Chapter 2 and compute its limiting behavior — the long-run prediction your model makes. Biology: for exponential bacterial growth $P(t) = P_0 e^{rt}$, $\lim_{t\to\infty} P(t) = +\infty$ predicts unbounded growth. Note where this breaks down — real populations saturate, foreshadowing the logistic model and its carrying capacity (Chapter 19). Economics: for a cost function with economies of scale, examine $\lim_{q\to\infty}$ of average cost $C(q)/q$ — does it approach a positive floor (a minimum efficient scale)? Physics: for a damped oscillation $A(t) = A_0 e^{-\gamma t}\cos(\omega t)$, show $\lim_{t\to\infty} A(t) = 0$ by squeezing between $\pm A_0 e^{-\gamma t}$ — your first applied squeeze theorem. Data Science: for a learning-rate decay schedule $\eta(t) = \eta_0/(1 + kt)$, compute $\lim_{t\to\infty}\eta(t) = 0$ and explain why a vanishing step size lets gradient descent (our recurring anchor, introduced in Chapter 6) settle into a minimum. Record the limit, state whether the prediction is physically realistic, and note any place the model must be revised.
Looking Ahead
In Chapter 4 we use limits to define continuity — the property that a function "has no breaks, jumps, or holes." Continuity is the unspoken hypothesis behind nearly every theorem in differential and integral calculus, including the squeeze argument and FTC; it is also what powers the Intermediate Value Theorem and root-finding by bisection.
In Chapters 5 and 6 we use the limit to define the derivative, returning to and rigorizing the intuitive secant-slope calculation we did in Chapter 1.
The limit concept is your investment. The next thirty-seven chapters are the payoff.
Continue to: Exercises · Quiz · Case Study 1 · Case Study 2 · Key Takeaways · Further Reading