In short
The Sandwich Theorem (also called the Squeeze Theorem) says: if a function is trapped between two other functions that both tend to the same limit, then the trapped function must tend to that limit too. It is the main tool for evaluating limits of functions that oscillate or are otherwise hard to handle directly — most famously, \lim_{x \to 0}\frac{\sin x}{x} = 1.
Here is a function that seems impossible to pin down: f(x) = x^2 \sin\!\left(\frac{1}{x}\right).
Try to find \lim_{x \to 0} f(x) by plugging in values. At x = 0.1, the sine part is \sin(10), which is about -0.544, so f(0.1) \approx 0.01 \times (-0.544) = -0.00544. At x = 0.01, the sine part is \sin(100) \approx -0.506, so f(0.01) \approx 0.0001 \times (-0.506) = -0.0000506. At x = 0.001, \sin(1000) \approx 0.827, so f(0.001) \approx 0.000000827.
The outputs are jumping between positive and negative, and the sine factor is oscillating wildly — \sin(1/x) swings between -1 and 1 faster and faster as x gets closer to zero. And yet the outputs are shrinking. They seem to be heading toward 0. But how do you prove that, when the function keeps changing sign and you cannot predict which way \sin(1/x) will point at any given instant?
You trap it. The sine function, no matter what its argument, always satisfies -1 \leq \sin(\text{anything}) \leq 1. So
The left side -x^2 tends to 0 as x \to 0. The right side x^2 also tends to 0. The function in the middle is squeezed between two functions that are both heading to the same place. It has no choice — it must tend to 0 as well.
That is the Sandwich Theorem. You do not need to know where the middle function is at any specific point. You just need to know that it is trapped between two walls that are closing in on the same value.
Think of it this way. You are walking down a corridor, and the corridor is getting narrower. The walls on your left and right are both closing in toward the same point. You do not know exactly where you are in the corridor at any instant — maybe you are zigzagging between the two walls — but it does not matter. The walls are forcing you toward that point regardless of your path. That is the geometry of the Sandwich Theorem: two converging bounds force whatever is between them to converge as well.
The name "Sandwich" is used in most Indian textbooks. Internationally, it is also called the Squeeze Theorem (because the middle function is squeezed) or the Pinching Theorem. The idea is the same under all three names.
The picture
The picture makes the theorem feel obvious. The oscillating red curve is trapped inside a closing vice. As the jaws of the vice come together, whatever is between them is forced to the same point.
The formal statement
Sandwich Theorem (Squeeze Theorem)
Let g(x) \leq f(x) \leq h(x) for all x in some open interval around a (except possibly at a itself). If
then
The same statement holds for one-sided limits and for limits at infinity (x \to \infty or x \to -\infty).
Reading the definition. Three things are required: (1) the middle function is trapped between two outer functions, (2) the two outer functions have the same limit, and (3) the trapping holds in some neighbourhood of the limit point. The conclusion is forced: the middle function shares that limit.
Notice the phrase "except possibly at a itself." The theorem does not require any of the three functions to be defined at a. It is a statement about behaviour near a, not at a.
Proof
Take any \varepsilon > 0. Since \lim_{x \to a} g(x) = L, there exists \delta_1 > 0 such that 0 < |x - a| < \delta_1 implies |g(x) - L| < \varepsilon, which means L - \varepsilon < g(x).
Since \lim_{x \to a} h(x) = L, there exists \delta_2 > 0 such that 0 < |x - a| < \delta_2 implies |h(x) - L| < \varepsilon, which means h(x) < L + \varepsilon.
Let \delta = \min(\delta_1, \delta_2). Then for 0 < |x - a| < \delta:
So |f(x) - L| < \varepsilon. Since \varepsilon was arbitrary, \lim_{x \to a} f(x) = L. \blacksquare
Why: the proof takes the two \delta-guarantees from the outer functions and combines them. The minimum of the two \delta's ensures that both guarantees hold simultaneously. Then the chain of inequalities L - \varepsilon < g \leq f \leq h < L + \varepsilon forces f into the \varepsilon-band around L.
The most important application: \lim_{x \to 0}\frac{\sin x}{x} = 1
This limit appears everywhere — in the derivative of \sin x, in Fourier series, in signal processing, in physics. It is probably the single most-used limit in calculus. And its proof is a textbook application of the Sandwich Theorem.
Setting up the sandwich
Consider the unit circle (radius 1), and draw a small positive angle x (in radians) at the centre. Three regions appear:
- A triangle OAB inscribed inside the sector, with area \frac{1}{2}\sin x.
- The circular sector OAB itself, with area \frac{1}{2}x (area of a sector is \frac{1}{2}r^2\theta, and here r = 1, \theta = x).
- A larger triangle OAC formed by extending the radius to the tangent line, with area \frac{1}{2}\tan x.
These three regions are nested: the inscribed triangle fits inside the sector, and the sector fits inside the outer triangle. So their areas are ordered:
Why? The triangle OAB lies entirely inside the circular sector (the sector includes the curved region the triangle misses). And the sector lies entirely inside the triangle OAC (the outer triangle extends past the arc to the tangent line). Nesting of regions implies ordering of areas.
Extracting the limit
Start from the area inequality for 0 < x < \frac{\pi}{2}:
Divide everything by \sin x (which is positive for 0 < x < \pi/2):
Take reciprocals (which reverses inequalities):
This is a sandwich. The left bread is \cos x and the right bread is 1. As x \to 0^+:
By the Sandwich Theorem:
For x \to 0^-, note that \frac{\sin x}{x} = \frac{\sin(-x)}{-x} = \frac{\sin x}{x} is an even function (since \sin(-x) = -\sin x), so the left-hand limit equals the right-hand limit.
Why this matters: the derivative of \sin x at x = 0 is \lim_{h \to 0}\frac{\sin(0+h) - \sin 0}{h} = \lim_{h \to 0}\frac{\sin h}{h} = 1. So (\sin x)' = \cos x rests on this one geometric argument. The Sandwich Theorem is the tool that turns a geometric picture into a rigorous limit.
The companion limit: \lim_{x \to 0}\frac{1 - \cos x}{x^2} = \frac{1}{2}
This limit follows quickly from the \sin x / x result. Use the identity 1 - \cos x = 2\sin^2\!\left(\frac{x}{2}\right):
As x \to 0, x/2 \to 0 as well, so \frac{\sin(x/2)}{x/2} \to 1 by the result just proved. The expression tends to 2 \cdot 1^2 \cdot \frac{1}{4} = \frac{1}{2}.
Walk through each factor to see why the split works. The 2 comes from the double-angle identity. The \left(\frac{\sin(x/2)}{x/2}\right)^2 is a squared version of the standard limit, which tends to 1^2 = 1. The \frac{1}{4} comes from \frac{(x/2)^2}{x^2} = \frac{x^2/4}{x^2} = \frac{1}{4}. Each factor has a definite limit, and the product of the limits is the limit of the product.
The companion limit: \lim_{x \to 0}\frac{1 - \cos x}{x} = 0
This one is simpler but also useful. Multiply and divide by (1 + \cos x):
As x \to 0: \frac{\sin x}{x} \to 1 and \frac{\sin x}{1 + \cos x} \to \frac{0}{2} = 0. So the product tends to 1 \cdot 0 = 0.
Worked examples
Example 1: An oscillating function
Evaluate \displaystyle\lim_{x \to 0}\; x\cos\!\left(\frac{1}{x}\right).
Step 1. Observe that \cos\!\left(\frac{1}{x}\right) oscillates between -1 and 1 as x \to 0, so you cannot evaluate it directly. But you can bound it.
Why: the cosine function is bounded between -1 and 1 regardless of its argument. This is the starting point for every sandwich involving trigonometric oscillation.
Step 2. Multiply through by |x| (which is non-negative).
Why: when multiplying an inequality by a non-negative quantity, the direction of the inequality is preserved. Using |x| instead of x handles both the case x > 0 and x < 0 simultaneously.
Step 3. Identify the outer limits.
Why: both |x| and -|x| tend to 0 as x \to 0. The two slices of bread are converging to the same value.
Step 4. Apply the Sandwich Theorem.
Result: 0.
The graph makes the squeeze visible. Near the origin, the red curve bounces between the two dashed lines, and those lines both pass through (0,0). There is no escape.
Notice the difference between this function and \sin(1/x) on its own. The function \sin(1/x) oscillates between -1 and 1 near the origin — it has no limit at x = 0. But x\cos(1/x) does have a limit, because the factor x is shrinking fast enough to kill the oscillation. The Sandwich Theorem captures this precisely: the amplitude of the oscillation is bounded by |x|, and |x| \to 0.
Example 2: The floor function
Evaluate \displaystyle\lim_{x \to \infty}\frac{\lfloor x \rfloor}{x}, where \lfloor x \rfloor denotes the greatest integer less than or equal to x (the floor function).
Step 1. Use the defining property of the floor function.
Why: \lfloor x \rfloor is the largest integer \leq x, so it is at most x. And it is strictly greater than x - 1, because x - 1 is less than the next integer down.
Step 2. Divide through by x (which is positive for x \to +\infty).
Why: dividing by a positive number preserves inequality directions. The right side simplifies to 1.
Step 3. Identify the outer limits.
Why: \frac{1}{x} \to 0 as x \to \infty, so the left bound approaches 1 from below.
Step 4. Apply the Sandwich Theorem.
Result: 1.
The floor function strips away the fractional part of x. When x is large, the fractional part (which is at most 1) becomes negligible compared to x itself. The Sandwich Theorem turns this intuition into a proof.
This example also illustrates a useful technique: when a function involves the floor (or ceiling, or fractional part), the defining inequality of the floor function is almost always the right starting point for a sandwich. \lfloor x \rfloor is hard to work with analytically, but the inequality x - 1 < \lfloor x \rfloor \leq x is clean and immediately useful.
Common confusions
-
"The Sandwich Theorem requires the outer functions to equal f somewhere." It does not. The outer functions just need to bound f from above and below. They can be strict inequalities or non-strict — the theorem works either way.
-
"You can only use the Sandwich Theorem with trigonometric functions." The theorem is completely general. It works with floor functions, oscillating sequences, absolute values, or any function you can trap. Trigonometric examples dominate textbooks because |\sin x| \leq 1 and |\cos x| \leq 1 are the most natural bounding statements.
-
"\lim_{x \to 0}\frac{\sin x}{x} = 1 means \sin x = x when x is small." Almost, but the precise statement is \sin x \approx x for small x, not \sin x = x. The approximation \sin x \approx x is the first-order Taylor approximation, and it is excellent near zero — \sin(0.1) = 0.09983\ldots, which is 0.1 to three decimal places. But "approximately equal" and "equal" are different things.
-
"The sandwich requires the inequality to hold for all x." Only near the limit point. If g(x) \leq f(x) \leq h(x) holds for all x in (a - \delta, a + \delta) \setminus \{a\} for some \delta > 0, that is sufficient. What happens far from a is irrelevant to a limit at a.
-
"If the outer functions have different limits, the middle function has no limit." Not necessarily. The middle function might still have a limit — the Sandwich Theorem just cannot tell you what it is. Having different outer limits means the sandwich is too loose to be useful, not that the limit fails to exist.
Going deeper
If you came here for the standard applications and the proof, you have them — you can stop here. What follows explores some subtler uses and the version for sequences.
The Sandwich Theorem for sequences
The theorem has a version for sequences that is identical in spirit. If g_n \leq a_n \leq h_n for all n beyond some point, and \lim_{n \to \infty} g_n = \lim_{n \to \infty} h_n = L, then \lim_{n \to \infty} a_n = L.
A classic application: show that \lim_{n \to \infty}\frac{n!}{n^n} = 0.
Each factor in n! is at most n, so n! \leq n^n. But more precisely, n! = 1 \cdot 2 \cdot 3 \cdots n. The first factor is 1, and every other factor is at most n. So n! \leq 1 \cdot n \cdot n \cdots n = n^{n-1}. Then
Since \frac{1}{n} \to 0, the Sandwich Theorem gives \frac{n!}{n^n} \to 0.
Using the Sandwich Theorem to evaluate \lim_{x \to 0}\frac{\tan x}{x}
Since \tan x = \frac{\sin x}{\cos x}:
As x \to 0, \frac{\sin x}{x} \to 1 and \frac{1}{\cos x} \to \frac{1}{1} = 1. So \frac{\tan x}{x} \to 1.
This is not directly a sandwich argument, but it depends on the \sin x / x limit that was proved by sandwich. Many limits "downstream" of the Sandwich Theorem rely on it indirectly.
Why the angle must be in radians
The limit \lim_{x \to 0}\frac{\sin x}{x} = 1 is true only if x is measured in radians. If x were in degrees, the area of the sector would be \frac{1}{2}r^2 \cdot \frac{\pi x}{180}, not \frac{1}{2}r^2 x, and the limit would become \frac{\pi}{180} \approx 0.01745 instead of 1. The beauty of radian measure is that it makes this limit — and therefore the derivative of \sin x — come out cleanly. This is one of the deep reasons why radians are the "natural" unit for angles in calculus.
Constructing a sandwich: the general strategy
When you need to apply the Sandwich Theorem, the process is:
-
Identify the troublesome piece. What part of the expression prevents direct evaluation? Usually it is an oscillating factor like \sin(1/x) or a discontinuous factor like \lfloor x \rfloor.
-
Bound the troublesome piece. Replace it with its maximum and minimum values. For \sin(\cdot) and \cos(\cdot), the bounds are [-1, 1]. For \lfloor x \rfloor, the bound is x - 1 < \lfloor x \rfloor \leq x.
-
Multiply or compose with the well-behaved piece. This creates two outer functions. Make sure the multiplication preserves the inequality direction (check the sign).
-
Evaluate the outer limits. If they agree, the Sandwich Theorem closes the argument.
The hardest part is usually step 2 — finding a bound that is tight enough. A bound like |\sin(1/x)| \leq 1{,}000{,}000 is technically true but useless. The tighter your bound, the more information the sandwich provides.
A sequence example: \lim_{n \to \infty}\frac{\sin n}{n} = 0
The sequence a_n = \frac{\sin n}{n} oscillates — \sin n is positive for some n and negative for others, and there is no clean pattern. But |\sin n| \leq 1 for all n, so
Both \frac{1}{n} and -\frac{1}{n} tend to 0, so by the Sandwich Theorem, \frac{\sin n}{n} \to 0.
This is a good example of the theorem's power: the middle sequence is erratic and unpredictable, but the outer bounds are simple and converge. The theorem lets you ignore the chaos and focus on the envelope.
When the Sandwich Theorem does not apply
The Sandwich Theorem is silent when the two outer limits are different. Consider f(x) = \sin(1/x) near x = 0. You can bound it: -1 \leq \sin(1/x) \leq 1. But the left bound tends to -1 and the right bound tends to 1 — different values. The sandwich is too wide to conclude anything, and indeed \sin(1/x) has no limit as x \to 0: it keeps oscillating between -1 and 1 forever, never settling.
The failure here is not the theorem's fault — it is a genuine mathematical fact that \sin(1/x) has no limit at 0. The Sandwich Theorem correctly declines to give you an answer, because there is no answer to give.
Where this leads next
The Sandwich Theorem is a basic tool in the limit toolkit. From here:
- Standard Limits — the full catalogue of limits used in JEE, including \sin x / x, (e^x - 1)/x, and their variants.
- Exponential and Logarithmic Limits — the four standard limits involving e and \ln, proved using series and the definition of e.
- Limits at Infinity — what happens when x grows without bound, including degree comparison for rational functions.
- Continuity — the next concept after limits, asking when a function has no jumps, holes, or breaks.
- Derivative — the limit that measures instantaneous rate of change, built on the same \varepsilon-\delta machinery.