The statement
and lim g(x) = lim h(x) = L as x → a, then lim f(x) = L as x → a.
It's also called the sandwich theorem or the pinching theorem. If f is stuck between two functions that both head to L, it has nowhere else to go. It works the same way for one-sided limits, for x → ∞, and for sequences.
How to use it
- Find a known bound on the hard part. The usual ones are −1 ≤ sin(anything) ≤ 1 and −1 ≤ cos(anything) ≤ 1.
- Multiply or add to build g ≤ f ≤ h. When you multiply by something, check its sign: multiplying by a negative number flips the inequalities.
- Show g and h have the same limit.
- Conclude that f has that limit too.
Worked examples
1. lim x² sin(1/x) as x → 0. sin(1/x) swings between −1 and 1 infinitely often near 0, so you can't just substitute. But −1 ≤ sin(1/x) ≤ 1, and x² ≥ 0, so
Both −x² and x² go to 0 as x → 0, so lim x² sin(1/x) = 0. The same argument shows lim x cos(1/x) = 0, using −|x| ≤ x cos(1/x) ≤ |x|.
2. lim sin x / x as x → ∞. For x > 0, −1/x ≤ sin x / x ≤ 1/x. Both bounds go to 0, so the limit is 0.
3. lim sin x / x as x → 0 (the famous one). Compare areas in the unit circle for a small angle x > 0: the triangle inside the sector, the sector itself and the larger triangle outside it give sin x / 2 ≤ x / 2 ≤ tan x / 2. Dividing through by sin x / 2 and flipping gives
As x → 0, cos x → 1, so lim sin x / x = 1. (For x < 0 the same inequality holds because both sides are even functions.) This limit is what makes d/dx sin x = cos x; see the derivative rules table. It also gives lim (1 − cos x)/x = 0.
4. A sequence. For aₙ = (−1)ⁿ/n: −1/n ≤ aₙ ≤ 1/n, and both bounds go to 0, so aₙ → 0.
Why it's useful
The squeeze theorem handles functions that oscillate or are defined piecewise, where direct substitution and algebra don't work. It's used to prove the basic trig limits, and it's often the cleanest way to show a limit is 0: if |f(x)| ≤ h(x) and h(x) → 0, then f(x) → 0.
Common mistakes
- Bounds with different limits. sin(1/x) is between −1 and 1, but those limits are different, so the squeeze theorem says nothing about lim sin(1/x). In fact that limit doesn't exist.
- Ignoring signs. Multiplying −1 ≤ sin(1/x) ≤ 1 by x (not x²) only gives −x ≤ x sin(1/x) ≤ x when x > 0. Use |x| to cover both sides.
- Bounds that don't hold near a. The inequalities have to hold on some interval around a (except at a itself), not just at a few points.
See how the bounds pinch the function on the graphing calculator by plotting x^2 sin(1/x), x^2 and −x^2 together. Related ideas: the fundamental theorem of calculus and the derivative calculator.
Sources
- OpenStax Calculus Volume 1, 2.3: The limit laws (squeeze theorem)
- Paul's Online Notes (Lamar University): Proof of trig limits (squeeze theorem)
Every worked example on this page was checked independently with SymPy.