Squeeze Theorem
The squeeze theorem finds a limit by trapping a function between two others. If g(x) \le f(x) \le h(x) for x near a, and \lim_{x \to a} g(x) = \lim_{x \to a} h(x) = L, then \lim_{x \to a} f(x) = L too. It is also called the sandwich theorem.
Before this lesson: Limit Laws, Limits at Infinity and Graphs of Sine and Cosine
The idea behind the squeeze theorem
Picture two friends walking on either side of you down a narrow hallway, and both of them end up at the same door. Since you are always between them, you must end up at that door too.
That is the squeeze theorem. When a function is too wild to handle directly, such as one that wiggles forever near a point, you can often trap it between two simple functions. If the simple functions have the same limit, the wild one is forced to have it as well.
The most common trap comes from sine and cosine: -1 \le \sin(\text{anything}) \le 1 and -1 \le \cos(\text{anything}) \le 1.
The squeeze theorem
Suppose g(x) \le f(x) \le h(x) for all x in an open interval around a (except possibly at a itself), and
\lim_{x \to a} g(x) = L \quad \text{and} \quad \lim_{x \to a} h(x) = LThen \lim_{x \to a} f(x) = L. The theorem also works for one-sided limits and for limits as x \to \infty.
| Step | What to do |
|---|---|
| 1 | Start from a known inequality, usually -1 \le \sin(\cdot) \le 1 or -1 \le \cos(\cdot) \le 1. |
| 2 | Multiply or divide all three parts to build f(x) in the middle. Multiplying by a positive quantity keeps the inequality signs. |
| 3 | Find the limits of the outside functions. |
| 4 | If they are equal, the middle function has that limit. |
Squeeze theorem examples
Example 1: Given bounds
Suppose 4 - x^2 \le f(x) \le 4 + x^2 for all x near 0. Find \lim_{x \to 0} f(x).
\lim_{x \to 0} (4 - x^2) = 4 - 0 = 4Find the limit of the lower function by direct substitution.
\lim_{x \to 0} (4 + x^2) = 4 + 0 = 4Find the limit of the upper function.
\lim_{x \to 0} f(x) = 4The bounds have the same limit, so the squeeze theorem applies.
Answer: 4.
Example 2: The classic wiggle
Find \lim_{x \to 0} x^2 \sin\frac{1}{x}.
-1 \le \sin\frac{1}{x} \le 1Sine is always between −1 and 1, for every x ≠ 0.
-x^2 \le x^2 \sin\frac{1}{x} \le x^2Multiply all three parts by x^2. Since x^2 is positive, the signs stay the same.
\lim_{x \to 0} (-x^2) = 0Find the limit of the lower bound.
\lim_{x \to 0} x^2 = 0Find the limit of the upper bound.
\lim_{x \to 0} x^2 \sin\frac{1}{x} = 0Squeeze theorem.
Answer: 0, as the graph above shows. You cannot use the product law here, because \lim_{x \to 0} \sin\frac{1}{x} does not exist.
Example 3: A limit at infinity
Find \lim_{x \to \infty} \frac{\sin x}{x}.
-1 \le \sin x \le 1
Start with the bounds on sine.
-\frac{1}{x} \le \frac{\sin x}{x} \le \frac{1}{x}Divide all three parts by x. For x greater than 0, the signs stay the same.
\lim_{x \to \infty} \left(-\frac{1}{x}\right) = 0A constant over x goes to 0 (see limits at infinity).
\lim_{x \to \infty} \frac{1}{x} = 0Same for the upper bound.
\lim_{x \to \infty} \frac{\sin x}{x} = 0Squeeze theorem.
Answer: 0. The graph wiggles across the x-axis with smaller and smaller swings, so y = 0 is a horizontal asymptote even though the curve crosses it again and again.
Example 4: The special limit sin x / x as x approaches 0
Use the inequality \cos x \le \frac{\sin x}{x} \le 1, which holds for x near 0 (x ≠ 0), to find \lim_{x \to 0} \frac{\sin x}{x}.
\cos x \le \frac{\sin x}{x} \le 1Comparing areas of two triangles and a sector of the unit circle gives this inequality, for x in radians.
\lim_{x \to 0} \cos x = \cos 0 = 1Cosine is continuous, so substitute.
\lim_{x \to 0} 1 = 1The upper bound is the constant 1.
\lim_{x \to 0} \frac{\sin x}{x} = 1Squeeze theorem.
Answer: 1. This confirms the value suggested by the table in Introduction to Limits, and it is the key fact behind the derivative of sine later in Calculus 1.
Example 5: Word problem with a damped spring
A weight on a spring moves so that its position after t seconds is d(t) = 3e^{-t}\cos(5t) centimeters from rest. Show that \lim_{t \to \infty} d(t) = 0.
-1 \le \cos(5t) \le 1
Cosine is between −1 and 1.
-3e^{-t} \le 3e^{-t}\cos(5t) \le 3e^{-t}Multiply all parts by 3e^{-t}, which is always positive.
\lim_{t \to \infty} 3e^{-t} = 3(0) = 0e^{-t} = \frac{1}{e^t} \to 0 as t grows (see exponential decay).
\lim_{t \to \infty} (-3e^{-t}) = 0The lower bound also goes to 0.
\lim_{t \to \infty} d(t) = 0Squeeze theorem.
Answer: the position approaches 0, so the weight settles at rest. The bounds \pm 3e^{-t} form an envelope that closes in as the bouncing fades.
Common mistakes
| Mistake | Example of the error | Fix |
|---|---|---|
| Using the product law with a limit that doesn’t exist | \lim x^2 \cdot \lim \sin\frac{1}{x} = 0 \cdot (\text{something}) | \lim \sin\frac{1}{x} does not exist, so the product law fails. Squeeze instead. |
| Bounds with different limits | Using -1 \le \sin\frac{1}{x} \le 1 to find \lim \sin\frac{1}{x} | The bounds go to −1 and 1, which differ, so the theorem tells you nothing. |
| Multiplying by a negative without flipping | Multiplying -1 \le \sin x \le 1 by x when x is negative | For x less than 0, the inequality signs reverse. Use |x| or check each side. |
| Forgetting the bounds must hold near a | Using an inequality that is only true far from a | The trap must hold on an interval around a (or for large x). |
| Skipping the inequality step | Writing “the limit is 0 by the squeeze theorem” with no bounds | Show the inequality and the two outside limits. |
| Calculator in degree mode | Checking \frac{\sin x}{x} near 0 and getting about 0.01745 | Use radians; the limit 1 only holds in radians. |
Related methods
Using absolute values
A handy version: if |f(x)| \le h(x) and h(x) \to 0, then f(x) \to 0, because -h(x) \le f(x) \le h(x). This avoids sign trouble when x can be negative, as in x \sin\frac{1}{x}.
A companion limit
Using \frac{\sin x}{x} \to 1, you can also show \lim_{x \to 0} \frac{1 - \cos x}{x} = 0. Both limits are used to find the derivatives of the trig functions.
Practice problems
- If 2x - 1 \le f(x) \le x^2 for x near 1, find \lim_{x \to 1} f(x).
- Find \lim_{x \to 0} x^2 \cos\frac{3}{x}.
- Find \lim_{x \to 0} x \sin\frac{1}{x}.
- Find \lim_{x \to \infty} \frac{\cos x}{x^2}.
- Find \lim_{x \to \infty} \frac{2 + \sin x}{x}.
- Find \lim_{x \to 0} x^4 \sin\frac{1}{x^2}.
- If 1 - \frac{x^2}{4} \le u(x) \le 1 + \frac{x^2}{2} for all x, find \lim_{x \to 0} u(x).
- Find \lim_{x \to 0^+} \sqrt{x}\, e^{\sin(\pi/x)}.
- Explain why the squeeze theorem with -1 \le \sin\frac{1}{x} \le 1 does not find \lim_{x \to 0} \sin\frac{1}{x}.
- A buoy bobs so its height above the average water level is y(t) = \frac{4\cos(2t)}{t + 1} meters after t minutes. Find \lim_{t \to \infty} y(t).
Show answers
1.
\lim_{x \to 1} (2x - 1) = 2(1) - 1 = 1Lower bound.
\lim_{x \to 1} x^2 = 1Upper bound.
Answer: both bounds go to 1, so \lim_{x \to 1} f(x) = 1.
2.
-x^2 \le x^2 \cos\frac{3}{x} \le x^2Multiply -1 \le \cos\frac{3}{x} \le 1 by x^2 \ge 0.
\lim_{x \to 0} (\pm x^2) = 0Both bounds go to 0.
Answer: 0
3.
-|x| \le x \sin\frac{1}{x} \le |x|Since \left|\sin\frac{1}{x}\right| \le 1, we get \left|x \sin\frac{1}{x}\right| \le |x|.
\lim_{x \to 0} |x| = 0Both bounds go to 0.
Answer: 0
4.
-\frac{1}{x^2} \le \frac{\cos x}{x^2} \le \frac{1}{x^2}Divide the cosine bounds by x^2 \gt 0.
\lim_{x \to \infty} \frac{1}{x^2} = 0Both bounds go to 0.
Answer: 0
5.
1 \le 2 + \sin x \le 3
Add 2 to all parts of -1 \le \sin x \le 1.
\frac{1}{x} \le \frac{2 + \sin x}{x} \le \frac{3}{x}Divide by x, which is positive for large x.
\lim_{x \to \infty} \frac{1}{x} = \lim_{x \to \infty} \frac{3}{x} = 0Both bounds go to 0.
Answer: 0
6.
-x^4 \le x^4 \sin\frac{1}{x^2} \le x^4Multiply the sine bounds by x^4 \ge 0.
\lim_{x \to 0} (\pm x^4) = 0Both bounds go to 0.
Answer: 0
7.
\lim_{x \to 0} \left(1 - \frac{x^2}{4}\right) = 1Lower bound.
\lim_{x \to 0} \left(1 + \frac{x^2}{2}\right) = 1Upper bound.
Answer: 1
8.
e^{-1} \le e^{\sin(\pi/x)} \le e^{1}Since -1 \le \sin(\pi/x) \le 1 and e^u increases.
\frac{\sqrt{x}}{e} \le \sqrt{x}\, e^{\sin(\pi/x)} \le e\sqrt{x}Multiply by \sqrt{x} \ge 0.
\lim_{x \to 0^+} \frac{\sqrt{x}}{e} = \lim_{x \to 0^+} e\sqrt{x} = 0Both bounds go to 0.
Answer: 0
9.
\lim_{x \to 0} (-1) = -1The lower bound’s limit.
\lim_{x \to 0} 1 = 1The upper bound’s limit.
Answer: the bounds approach different values (−1 and 1), so the theorem gives no conclusion. In fact \sin\frac{1}{x} swings between −1 and 1 forever, so its limit does not exist.
10.
-\frac{4}{t + 1} \le \frac{4\cos(2t)}{t + 1} \le \frac{4}{t + 1}Multiply the cosine bounds by \frac{4}{t + 1} \gt 0.
\lim_{t \to \infty} \frac{4}{t + 1} = 0Both bounds go to 0.
Answer: 0. The bobbing dies down and the buoy settles at the average water level.
Squeeze theorem FAQ
What is the squeeze theorem?
If a function stays between two others near a point, and those two have the same limit there, the function in the middle has that limit too.
When should you use the squeeze theorem?
Use it when a function contains an oscillating part, like \sin\frac{1}{x} or \cos x, multiplied by something that goes to 0, or when the limit laws can’t be used.
Why is it called the sandwich theorem?
The function you want is the filling between two slices of bread, the bounding functions. Squeeze the slices together and the filling has nowhere else to go.
What is the limit of sin x / x as x approaches 0?
It is 1, with x in radians. The squeeze theorem proves it using \cos x \le \frac{\sin x}{x} \le 1.
Summary
- If g(x) \le f(x) \le h(x) near a and g and h both approach L, then f approaches L.
- Build the bounds from -1 \le \sin(\cdot) \le 1 or -1 \le \cos(\cdot) \le 1, multiplying by a positive quantity.
- The two bounds must have the same limit, or the theorem says nothing.
- It works for one-sided limits and for limits at infinity.
- Key results: \lim_{x \to 0} x^2 \sin\frac{1}{x} = 0, \lim_{x \to \infty} \frac{\sin x}{x} = 0 and \lim_{x \to 0} \frac{\sin x}{x} = 1.
Previous lesson: Limits at Infinity
Next lesson: Continuity
Back to the Calculus 1 Index