AP Calculus AB · Topic 1.8 · Reading guide, about 5 min

Trapping a limit between two functions

The squeeze theorem: bound a function between two others with the same limit, with the classic x squared sine of 1 over x example.

In one minute

Some functions are too wild for algebra. The expression x2sin⁡(1x)x^2\sin\left(\frac{1}{x}\right) oscillates forever near 0, yet it is pinned between two simple functions that both head to 0. If a function is squeezed between two others that share a limit, it must share that limit too.

This idea, the squeeze theorem, is also how the standard trigonometric limits are justified.

Key terms

Squeeze theorem
If g(x)≤f(x)≤h(x)g(x) \le f(x) \le h(x) for xx near cc and lim⁡g=lim⁡h=L\lim g=\lim h=L, then lim⁡f=L\lim f=L. Also called the sandwich theorem.
Lower bound
The function gg below ff. It must stay at or below ff for all inputs near cc, other than possibly cc itself.
Upper bound
The function hh above ff. It must stay at or above ff for all inputs near cc, other than possibly cc itself.
Common limit
The shared value LL of the two bounding limits. If the bounds disagree, the theorem says nothing.
Bounded factor
A factor such as sin⁡(1x)\sin\left(\frac{1}{x}\right) that stays between −1-1 and 11 however wildly it oscillates.
Oscillating function
One that swings between values without settling. The squeeze theorem can still find its limit if the swings shrink to 0.
Near cc
The inequalities need to hold only for inputs close to cc, not on the whole domain.
Absolute value bound
Using −∣u∣≤u≤∣u∣-|u| \le u \le |u| to build bounds when the sign of the oscillating part is not controlled.

Why the theorem makes sense

Picture a runner between two guards. The guard on the left and the guard on the right both walk toward the same point. The runner is never outside the corridor between them, so the runner must also arrive at that point. The theorem says exactly this about outputs: if ff is boxed between two functions that both approach LL, then ff approaches LL.

There are two conditions to confirm, and a good answer states both. The inequalities g≤f≤hg \le f \le h must hold near cc, and the two bounding functions must have equal limits. If either fails, the theorem does not apply. For example, if the bounds approach different numbers, the squeeze tells you only that the limit, if it exists, lies between them.

Worked example: x squared times sine of 1 over x

Find lim⁡x→0x2sin⁡(1x)\lim_{x \to 0} x^2\sin\left(\frac{1}{x}\right). Substitution gives nothing, since sin⁡(1x)\sin\left(\frac{1}{x}\right) is undefined at 0 and has no limit, so the product rule does not apply either.

Step 1, bound the oscillating factor. For all x≠0x \neq 0, −1≤sin⁡(1x)≤1-1 \le \sin\left(\frac{1}{x}\right) \le 1.

Step 2, multiply by x2x^2, which is positive for x≠0x \neq 0 and so keeps the inequalities in the same direction: −x2≤x2sin⁡(1x)≤x2-x^2 \le x^2\sin\left(\frac{1}{x}\right) \le x^2.

Step 3, take the limits of the bounds. lim⁡x→0(−x2)=0\lim_{x \to 0} (-x^2)=0 and lim⁡x→0x2=0\lim_{x \to 0} x^2=0. These are equal, and the inequality holds for all x≠0x \neq 0, so it holds near 0.

Step 4, conclude by the squeeze theorem that lim⁡x→0x2sin⁡(1x)=0\lim_{x \to 0} x^2\sin\left(\frac{1}{x}\right)=0. The function value at 0 is not needed. The same steps show lim⁡x→0xcos⁡(1x)=0\lim_{x \to 0} x\cos\left(\frac{1}{x}\right)=0, using −∣x∣≤xcos⁡(1x)≤∣x∣-|x| \le x\cos\left(\frac{1}{x}\right) \le |x|, since xx can be negative and the multiplication by xx may flip an inequality.

Checklist for any squeeze
StepWhat to write
Bound the wild factor−1≤sin⁡(⋅)≤1-1 \le \sin(\cdot) \le 1 or −1≤cos⁡(⋅)≤1-1 \le \cos(\cdot) \le 1
Multiply carefullyMultiply by a positive quantity, or use absolute values
Limits of the boundsCompute both, confirm they are equal
ConcludeName the theorem and state the limit

Why the multiplication step needs care

When you multiply an inequality by a positive number, its direction is unchanged. When you multiply by a negative number, the direction reverses. The factor x2x^2 is positive for every x≠0x \neq 0, so −1≤sin⁡(1x)≤1-1 \le \sin\left(\frac{1}{x}\right) \le 1 becomes −x2≤x2sin⁡(1x)≤x2-x^2 \le x^2\sin\left(\frac{1}{x}\right) \le x^2 with no flipping. The factor xx is negative on the left of 0, so for xsin⁡(1x)x\sin\left(\frac{1}{x}\right) it is safer to work with absolute values: ∣xsin⁡(1x)∣≤∣x∣\left|x\sin\left(\frac{1}{x}\right)\right| \le |x|, which gives −∣x∣≤xsin⁡(1x)≤∣x∣-|x| \le x\sin\left(\frac{1}{x}\right) \le |x| for all x≠0x \neq 0. Both bounds tend to 0, so the limit is 0.

A numerical check shows how tight the corridor is for x2sin⁡(1x)x^2\sin\left(\frac{1}{x}\right). At x=0.1x=0.1 the bounds ±x2\pm x^2 are −0.01-0.01 and 0.010.01, so the function lies in that range; at x=0.01x=0.01 they are −0.0001-0.0001 and 0.00010.0001. The corridor narrows to a point as xx approaches 0.

Squeezing from given bounds, and a classic use

Sometimes the bounds are handed to you. Suppose a function satisfies 5−3(x−2)2≤f(x)≤5+3(x−2)25-3(x-2)^2 \le f(x) \le 5+3(x-2)^2 for all xx near 2. As x→2x \to 2 both bounds approach 55, because (x−2)2→0(x-2)^2 \to 0. So lim⁡x→2f(x)=5\lim_{x \to 2} f(x)=5 by the squeeze theorem, even though nothing is known about f(2)f(2) itself. The function could take any value at 2 and the conclusion would stand.

The theorem is also the engine behind lim⁡x→0sin⁡xx=1\lim_{x \to 0} \frac{\sin x}{x}=1. A geometric comparison of areas on a unit circle shows that for 0<x<π20 < x < \frac{\pi}{2}, cos⁡x<sin⁡xx<1\cos x < \frac{\sin x}{x} < 1. Since cos⁡x→1\cos x \to 1 and the constant 1 tends to 1, lim⁡x→0+sin⁡xx=1\lim_{x \to 0^+}\frac{\sin x}{x}=1. The expression is even, so the left side agrees. Radians are essential in that geometric argument.

How it connects

  • Back to 1.7: the squeeze theorem is the branch of the strategy path for oscillating factors that algebra cannot simplify.
  • Back to 1.6: the standard trigonometric limit sin⁡xx→1\frac{\sin x}{x} \to 1 relies on this theorem.
  • Forward to 1.11: continuity at a point is a limit statement, and squeeze arguments help show that piecewise functions with oscillating pieces are continuous.

Common mistakes

  • Using bounds with different limits. The theorem requires the same limit LL on both bounds. If they differ, it gives no conclusion.
  • Forgetting to check the inequalities. The bounds must really sit above and below ff near cc. Write the inequality chain, not just the two limits.
  • Dividing or multiplying by a negative quantity and not flipping the inequality. Multiply −1≤sin⁡u≤1-1 \le \sin u \le 1 by x2x^2 safely, but by xx use absolute values.

How it shows up on the exam

  • Written justifications give a function like x2sin⁡(1x)x^2\sin\left(\frac{1}{x}\right) or a stated inequality for ff, and ask for the limit with the theorem named and the hypotheses shown.
  • Some items give bounds for ff in a table or as formulas and ask what can be concluded, including cases where the bounds have different limits.

Check yourself

  1. What two things must be true before you can use the squeeze theorem?
  2. Why does lim⁡x→0xsin⁡(1x)\lim_{x \to 0} x\sin\left(\frac{1}{x}\right) equal 0 even though sin⁡(1x)\sin\left(\frac{1}{x}\right) has no limit at 0?
  3. If g≤f≤hg \le f \le h and lim⁡g=2\lim g=2 and lim⁡h=3\lim h=3, what can you say about lim⁡f\lim f?
  4. In the squeeze for sin⁡xx\frac{\sin x}{x}, why do the bounds cos⁡x\cos x and 1 both tend to 1?

Practice this topic. AP Practice questions on exactly what this lesson covers, with an explanation for every answer.