# Squeeze Theorem: Statement, Proof Idea and Worked Examples

> The squeeze (sandwich) theorem: if g ≤ f ≤ h near a and g and h share a limit L, then f has limit L too. Statement, graph and examples.

Source: https://practicecalculus.com/theorems/squeeze-theorem
Updated: 2026-11-03

$$ g(x) \le f(x) \le h(x) \implies \lim_{x \to a} f(x) = L $$

## At a glance

- **Also called:** Sandwich theorem, pinching theorem
- **Hypotheses:** $g(x) \le f(x) \le h(x)$ near $a$, and $g$ and $h$ have the same limit $L$ at $a$
- **Conclusion:** $\lim_{x \to a} f(x) = L$
- **Best for:** Limits with a bounded oscillating factor, such as $\sin\frac{1}{x}$ or $\cos x$
- **Famous use:** $\lim_{x \to 0} \frac{\sin x}{x} = 1$
- **Course:** Calculus 1

## Key takeaways

- Trap the function between two simpler functions that have the same limit, and the function is forced to share it.
- Both bounding functions must have the same limit. If the bounds approach different values, the theorem says nothing.
- The inequality only has to hold near $a$, not everywhere, and it does not have to hold at $a$ itself.
- Most squeeze problems start from $-1 \le \sin(\text{anything}) \le 1$ or $-1 \le \cos(\text{anything}) \le 1$.

The **squeeze theorem** finds a limit you cannot compute directly by trapping the function between two functions whose limits you can compute. If the lower and upper bounds approach the same number, the function caught between them must approach it too.

## Statement of the squeeze theorem

Let $f$, $g$ and $h$ be functions defined on an open interval containing $a$, except possibly at $a$ itself. Suppose that

1. $g(x) \le f(x) \le h(x)$ for every $x$ in that interval with $x \ne a$, and
2. $\displaystyle \lim_{x \to a} g(x) = \lim_{x \to a} h(x) = L$.

Then

$$\lim_{x \to a} f(x) = L$$

The same statement holds for one-sided limits and for limits as $x \to \infty$ or $x \to -\infty$, as long as the inequality holds on the corresponding one-sided interval or for all sufficiently large $|x|$.

## What the squeeze theorem says in plain language

Picture two curves that meet at a single point above $x = a$. Any curve drawn between them has no room to go anywhere else near $a$, so it is pinched through the same point. The theorem turns that picture into a rule: you never have to compute $\lim f(x)$ directly, only the limits of the two bounds.

```graph
title: 'Squeeze theorem: y = x² sin(1/x) trapped between y = −x² and y = x²'
caption: 'The wiggling curve $x^2\sin\frac{1}{x}$ always stays between $-x^2$ and $x^2$. Both bounds approach $0$ at $x = 0$, so it does too.'
x: [-0.6, 0.6]
y: [-0.4, 0.4]
functions:
  - expr: x^2 sin(1/x)
    label: y = x² sin(1/x)
  - expr: x^2
    label: y = x²
    dashed: true
  - expr: -x^2
    label: y = −x²
    dashed: true
points:
  - [0, 0, 'limit 0', open]
```

## Why each hypothesis matters

**The bounds must share a limit.** Every $x \ne 0$ satisfies $-1 \le \sin\frac{1}{x} \le 1$, but the bounds approach $-1$ and $1$, which are different. The theorem gives no conclusion, and in fact $\lim_{x \to 0}\sin\frac{1}{x}$ does not exist: the function hits every value in $[-1, 1]$ infinitely often near $0$.

**The inequality must hold near $a$.** A bound that holds only far from $a$ tells you nothing about the limit at $a$. On the other hand, it may fail at $a$ itself, or far away, without harm. Only a small interval around $a$ matters.

## Worked examples

**Example 1: $\lim_{x \to 0} x^2\sin\frac{1}{x}$.**

**Step 1.** Bound the oscillating factor: $-1 \le \sin\frac{1}{x} \le 1$ for all $x \ne 0$.

**Step 2.** Multiply by $x^2$, which is positive for $x \ne 0$, so the inequalities keep their direction:

$$-x^2 \le x^2\sin\frac{1}{x} \le x^2$$

**Step 3.** Both $-x^2$ and $x^2$ approach $0$ as $x \to 0$. By the squeeze theorem, $\lim_{x \to 0} x^2\sin\frac{1}{x} = 0$.

Direct substitution fails here because $\sin\frac{1}{0}$ is undefined, and the product rule for limits fails because $\lim \sin\frac{1}{x}$ does not exist. The squeeze theorem is the right tool.

**Example 2: $\lim_{x \to \infty} \frac{\cos x}{x}$.**

For $x > 0$, $-1 \le \cos x \le 1$ gives

$$-\frac{1}{x} \le \frac{\cos x}{x} \le \frac{1}{x}$$

Both bounds approach $0$ as $x \to \infty$, so $\frac{\cos x}{x} \to 0$. See [limits at infinity](/blog/limits-at-infinity) for more limits of this type.

**Example 3: the famous limit $\lim_{x \to 0}\frac{\sin x}{x} = 1$.**

A geometric argument with the unit circle shows that for $0 < |x| < \frac{\pi}{2}$,

$$\cos x \le \frac{\sin x}{x} \le 1$$

As $x \to 0$, $\cos x \to 1$ and the constant $1$ stays at $1$. The squeeze theorem gives $\lim_{x \to 0}\frac{\sin x}{x} = 1$. This single limit is the reason $\frac{d}{dx}\sin x = \cos x$, as shown in [derivatives of trig functions](/blog/derivatives-of-trig-functions).

## How to use the squeeze theorem

1. Find the part that misbehaves, usually a sine or cosine of something that blows up.
2. Bound it with constants, typically $-1$ and $1$.
3. Multiply or add to rebuild $f(x)$ in the middle. If you multiply by a negative quantity, flip the inequalities.
4. Take the limit of each bound. If they agree, you are done.

A useful shortcut: if $|f(x)| \le h(x)$ and $h(x) \to 0$, then $f(x) \to 0$. This is the squeeze theorem with $g = -h$.

## Common mistakes

1. **Using bounds with different limits.** The bounds $-1$ and $1$ for $\sin\frac{1}{x}$ alone prove nothing. You need to multiply by something that goes to zero.
2. **Forgetting sign when multiplying.** For $x\sin\frac{1}{x}$ with $x < 0$ the inequalities flip. Using $|x\sin\frac{1}{x}| \le |x|$ avoids the issue.
3. **Splitting the limit into a product.** Writing $\lim x^2 \cdot \lim \sin\frac{1}{x}$ is invalid because the second limit does not exist.

## Related theorems and guides

The squeeze theorem is one of the basic tools for [evaluating limits](/blog/how-to-evaluate-limits). It is often taught next to the [intermediate value theorem](/theorems/intermediate-value-theorem) and the [extreme value theorem](/theorems/extreme-value-theorem), which describe what continuous functions must do. For a gentle introduction to limits themselves, start with [what is a limit](/blog/what-is-a-limit).

## Frequently asked questions

### What is the squeeze theorem?

If $g(x) \le f(x) \le h(x)$ for all $x$ near $a$, and $g$ and $h$ both approach $L$ as $x \to a$, then $f(x)$ also approaches $L$. The function in the middle is squeezed to the same limit.

### When should I use the squeeze theorem?

Use it when a limit has a factor that oscillates but stays bounded, such as $\sin\frac{1}{x}$, and the usual algebra tricks fail. Bound the oscillating part, multiply through, and check that both bounds have the same limit.

### Does the squeeze theorem work for limits at infinity?

Yes. If $g(x) \le f(x) \le h(x)$ for all large $x$ and $g$ and $h$ both approach $L$ as $x \to \infty$, then $f(x) \to L$ as well. For example $\frac{\cos x}{x} \to 0$.

### Why is it called the sandwich theorem?

The function you care about sits between two others like the filling in a sandwich. When the two slices of bread meet at the same point, the filling has nowhere else to go.
