 # What is the Squeeze Theorem or Sandwich Theorem with examples

Squeeze theorem is an important concept in limit calculus. It is used to find the limit of a function. This Squeeze Theorem is also known as Sandwich Theorem or Pinching Theorem or Squeeze Lemma or Sandwich Rule.

We use the Sandwich theorem to find the limit of a function when it becomes difficult or complicated or sometimes when we failed to find the limit by other methods.

In these cases, we use the Squeeze theorem.

Quick Reminder:

In the previous article, we have discussed the definition of the limit of a function. If you have any doubts about the concept of limit, we suggest first read that article then come here. It will help you understand What is the Squeeze Theorem in a better way.

Read here: Definition of the limit of a function

First, we can understand the concept of the Sandwich theorem with a short story.

Suppose Tony, Bruce, and Steve are three brothers.

Tony eats more than Bruce and Steve eats less than Bruce and on Sunday Tony and Steve eat the food of 300 calories.

Then how much calories of food Bruce eats on Sunday?

From the story, we can clearly say that Bruce eats the food of 300 calories.

The same concept applies to the Sandwich theorem.

## What is the Squeeze Theorem or Sandwich Theorem?

### Statement

In a certain neighborhood of a,

$f\left ( x \right ) \leq g\left ( x \right ) \leq h\left ( x \right )$

and $\lim _{x \to a} f\left ( x \right )= l = \lim _{x \to a} h\left ( x \right )$

then $\lim _{x \to a} g \left ( x \right )$ exists and $\lim _{x \to a} g \left ( x \right ) = l$

### Squeeze Theorem proof

Suppose $f\left ( x \right ) \leq g\left ( x \right ) \leq h\left ( x \right )$, when $0< \left | x-a\right |< \delta _{1}$.

From the given limits, we have, for any $\varepsilon > 0$,

there exists $\delta _{2}, \delta _{3}> 0$ such that

$l-\varepsilon < f \left ( x \right )< l+\varepsilon$, when $0< \left | x-a\right |< \delta _{2}$

and

$l-\varepsilon < h \left ( x \right )< l+\varepsilon$, when $0< \left | x-a\right |< \delta _{3}$

If $\delta$ = min{$\delta_{1}, \delta_{2}, \delta_{3}$} then all of the above inequalities hold when $0<\left | x-a \right |<\delta$.

Under those conditions

$l-\varepsilon < f\left ( x \right )\leq g\left ( x \right )$ and $g \left ( x \right )\leq h\left ( x \right )< l+\varepsilon$

i.e., $l-\varepsilon < g \left ( x \right ) < l+\varepsilon$, for $0< \left | x-a \right |< \delta$

i.e., $\lim _{x \to a} g\left ( x \right ) = l$

This completes the proof.

## How to use squeeze theorem?

We just learned what is the squeeze theorem? Now its time to know “how to use squeeze theorem?”

We will understand this with an example.

Example: Find the limit $\lim_{x \to 0} x^{2}cos\left ( \frac{1}{x} \right )$.

Solution: We know that $-1 \leq cosx \leq 1$.

Using the above relation we can write

$-1 \leq cos\left ( \frac{1}{x} \right ) \leq 1$

i.e., $-x^{2} \leq x^{2}cos\left ( \frac{1}{x} \right ) \leq x^{2}$

Comparing the above relation with Squeeze theorem (i.e., Sandwich theorem) we get,

$f(x) = -x^{2}$, $g(x) = x^{2}cos\left ( \frac{1}{x} \right )$ and $h(x) = -x^{2}$.

We have squeezed the given function $x^{2}cos \left ( \frac{1}{x} \right )$ between $-x^{2}$ and $x^{2}$.

Our next steps are to find the limits of $x^{2}$ and $-x^{2}$ as x approaches 0.

$\lim _{x \to 0} x^{2} = \left ( 0 \right )^{2} = 0$

$\lim _{x \to 0} \left ( -x^{2} \right ) = -\lim _{x \to 0}x^{2} =-\left ( 0 \right )^{2} = 0$

So using Squeeze Theorem we can say $\lim _{x \to 0} x^{2}\cos \left ( \frac{1}{x} \right )$ exists and

$\lim _{x \to 0} x^{2}\cos \left ( \frac{1}{x} \right ) = 0$

Also read: How to find the zeros of a function

## Squeeze theorem graph

We can represent the Squeeze theorem graphically.

For a clear concept, we take the previous example to explain the Squeeze theorem graphically.

If we put the functions $f(x) = -x^{2}$, $g(x) = x^{2}cos\left ( \frac{1}{x} \right )$ and $h(x) = -x^{2}$ on the graph, the graph looks like this:

You can see that as $-x^{2} \leq x^{2}cos\left ( \frac{1}{x} \right )$ the graph of $x^{2}cos\left ( \frac{1}{x} \right )$ is lied above $-x^{2}$.

Also as $x^{2}cos\left ( \frac{1}{x} \right ) \leq x^{2}$ the graph of $x^{2}cos\left ( \frac{1}{x} \right )$ is lied below $x^{2}$.

The function $g(x) = x^{2}cos\left ( \frac{1}{x} \right )$ is squeezed in between $f(x) = -x^{2}$ and $f(x) = x^{2}$ at $(0,0)$.

We can say using limit that $g(x) = x^{2}cos\left ( \frac{1}{x} \right )$ approaches 0 as x approaches 0.

Therefore the limit

## Squeeze theorem examples

Example 1: Show that $\lim _{x \to 0}x\cos \left ( \frac{1}{x} \right )=0$.

Solution: Let $f(x) = x\cos \left ( \frac{1}{x} \right ), x\epsilon D$.

The domain of $f$ is $D$ = {$x\epsilon \mathbb{R} : x\neq 0$}.

We know that,

$-1 \leq \cos \left ( \frac{1}{x} \right ) \leq 1$

i.e., $-x \leq x\cos \left ( \frac{1}{x} \right ) \leq x$ for all $x> 0$

and $x \leq x\cos \left ( \frac{1}{x} \right ) \leq -x$ for all $x< 0$

Therefore $-\left | x \right |\leq x\cos \left ( \frac{1}{x} \right )\leq \left | x \right |$.

Now

$\lim _{x \to 0} \left | x \right |=0$

and $\lim _{x \to 0} \left ( -\left | x \right | \right )=0$

By Sandwich Theorem,

$\lim _{x \to 0}x\cos \left ( \frac{1}{x} \right )=0$

Example 2: Evaluate the limit

$\lim _{x \to \infty } \left ( 1+\frac{1}{x} \right )^{x}=e$

Solution: For any $x>0$, there exists a positive integer $n$ such that

$n\leq x< n+1$

i.e., $1+\frac{1}{n+1}<1+ \frac{1}{x}\leq 1 +\frac{1}{n}$

i.e., $\left ( 1+\frac{1}{n+1} \right )^{n}<\left ( 1+ \frac{1}{x} \right )^{x}\leq \left ( 1 +\frac{1}{n} \right )^{n+1}$

i.e., $\frac{\left ( \frac{1}{n+1} \right )^{n}}{1+\frac{1}{n+1}}< \left ( 1+ \frac{1}{x} \right )^{x}\leq \left ( 1 +\frac{1}{n}\right )^{n}\left ( 1+\frac{1}{n} \right )$

See that when $n \to \infty$,

$\left ( 1 +\frac{1}{n}\right )^{n} \rightarrow e$ and $\left ( 1 +\frac{1}{n+1}\right )^{n+1} \rightarrow e$

Also $\left ( 1 +\frac{1}{n+1}\right )$ and $\left ( 1 +\frac{1}{n}\right )$ tend to 1 as $n \to +\infty$.

So $\lim _{n \to \infty } \frac{\left ( \frac{1}{n+1} \right )^{n}}{1+\frac{1}{n+1}} = e$

and $\lim _{n \to \infty } \left ( 1 +\frac{1}{n}\right )^{n}\left ( 1+\frac{1}{n} \right ) = e$

Therefore using Squeeze theorem as x approaches infinity, we get

$\lim _{x \to \infty } \left ( 1+\frac{1}{x} \right )^{x}=e$

Example 3: Let $-\frac{1}{3}t^{3}+t^{2}-\frac{7}{3} \leq g\left ( t \right ) \leq \cos \left ( \frac{t \pi}{2} \right )$ when t is near 2. Then show that $\lim _{t \to 2}g(t)=-1$.

Solution: Given that

$-\frac{1}{3}t^{3}+t^{2}-\frac{7}{3} \leq g\left ( t \right ) \leq \cos \left ( \frac{t \pi}{2} \right )$.

Now

$\lim _{t \to 2}\left ( -\frac{1}{3}t^{3}+t^{2}-\frac{7}{3} \right )$

= $\lim _{t _\to 2} -\frac{1}{3}t^{3}+ \lim _{t _\to 2}t^{2}- \lim _{t _\to 2}\frac{7}{3}$

= $-\frac{1}{3}(2)^{3}+ (2)^{2}-\frac{7}{3}$

= $-\frac{8}{3}+ 4-\frac{7}{3}$

= $\frac{-8+12-7}{3}$

= $\frac{-3}{3}$

= $-1$

$\lim _{t \to 2} \cos \left ( \frac{t \pi}{2} \right )$

= $\cos \left ( \frac{2 \pi}{2} \right )$

= $\cos \pi$

= $-1$

Since $-\frac{1}{3}t^{3}+t^{2}-\frac{7}{3} \leq g\left ( t \right ) \leq \cos \left ( \frac{t \pi}{2} \right )$

and $\lim _{t \to 2}\left (-\frac{1}{3}t^{3}+t^{2}-\frac{7}{3} \right )=-1=\cos \left ( \frac{t \pi}{2} \right )$

Therefore by Squeeze theorem,

$\lim _{t \to 2}g(t)=-1$

Example 4: Find $\lim_{x \to -1}f\left ( x \right )$ if $-\frac{x^{2}}{4}-\frac{x}{2} when $x$ is near $-1$.

Solution: Given that $-\frac{x^{2}}{4}-\frac{x}{2}

Now $\lim_{x \to -1}\left ( -\frac{x^{2}}{4}-\frac{x}{2} \right )$

= $-\lim_{x \to -1}\left ( \frac{x^{2}}{4} \right )-\lim_{x \to -1}\left ( \frac{x}{2} \right )$

= $-\frac{(-1)^{2}}{4}-\left ( \frac{-1}{2} \right )$

= $-\frac{1}{4}+\frac{1}{2}$

= $\frac{1}{4}$

$\lim_{x \to -1}\left ( \frac{x^{2}}{3}+\frac{2x}{3}+\frac{2}{3} \right )$

= $\lim_{x \to -1}\frac{x^{2}}{3}+\lim_{x \to -1}\frac{2x}{3}+\lim_{x \to -1}\frac{2}{3}$

= $\frac{(-1)^{2}}{3}+\frac{2(-1)}{3}+\frac{2}{3}$

= $\frac{1}{3}-\frac{2}{3}+\frac{2}{3}$

= $\frac{1}{3}$

See that

$\lim_{x \to -1}\left ( -\frac{x^{2}}{4}-\frac{x}{2} \right )=\frac{1}{4} \neq \frac{1}{3}=\lim_{x \to -1}\left ( \frac{x^{2}}{3}+\frac{2x}{3}+\frac{2}{3} \right )$

Therefore the function $f(x)$ is not squeezed between $-\frac{x^{2}}{4}-\frac{x}{2}$ and $\frac{x^{2}}{3}+\frac{2x}{3}+\frac{2}{3}$.

But we can say that $\lim_{x \to -1}f\left ( x \right )$, if exists, lie in between $\frac{1}{4}$ and $\frac{1}{3}$.

Example 5: Show that $\lim _{x \to a}\left ( \sqrt{x}-\sqrt{a} \right )=0$ using Squeeze theorem.

Solution: For any $x>0$,

$\sqrt{x}-\sqrt{a} = \frac{\left ( \sqrt{x}-\sqrt{a} \right ) \left ( \sqrt{x}+\sqrt{a} \right )}{ \sqrt{x}+\sqrt{a}}=\frac{x-a}{ \sqrt{x}+\sqrt{a}}$

See that

$\left | \sqrt{x}-\sqrt{a} \right | =\left | \frac{x-a}{ \sqrt{x}+\sqrt{a}} \right |\leq \left | \frac{x-a}{ \sqrt{a}} \right |$

Now

$-\left | \frac{x-a}{ \sqrt{a}} \right |\leq \sqrt{x}-\sqrt{a} \leq \left | \frac{x-a}{ \sqrt{a}} \right |$

We can find

$\lim _{x \to a}\left ( -\left | \frac{x-a}{ \sqrt{a}} \right | \right ) =0$ and $\lim _{x \to a} \left | \frac{x-a}{ \sqrt{a}} \right |=0$

Therefore by Squeeze Theorem

$\lim _{x \to a}\left ( \sqrt{x}-\sqrt{a} \right )=0$

Example 6:

Using Sandwich Theorem prove that

$\lim _{n \to \infty }\left ( \frac{1}{\sqrt{n^{2}+1}}+\frac{1}{\sqrt{n^{2}+2}}+…..+\frac{1}{\sqrt{n^{2}+n}} \right )=1$

Solution:

Let $U_{n}=\frac{1}{\sqrt{n^{2}+1}}+\frac{1}{\sqrt{n^{2}+2}}+…..+\frac{1}{\sqrt{n^{2}+n}}$

We have

$\frac{1}{\sqrt{n^{2}+2}}<\frac{1}{\sqrt{n^{2}+1}}$

$\frac{1}{\sqrt{n^{2}+3}}<\frac{1}{\sqrt{n^{2}+1}}$

……….

$\frac{1}{\sqrt{n^{2}+n}}<\frac{1}{\sqrt{n^{2}+1}}$

Therefore $U_{n}<\frac{n}{\sqrt{n^{2}+1}}$ for all $n\geq 2$

Again,

$\frac{1}{\sqrt{n^{2}+1}}+\frac{1}{\sqrt{n^{2}+2}}>\frac{2}{\sqrt{n^{2}+2}}$

$\frac{1}{\sqrt{n^{2}+1}}+\frac{1}{\sqrt{n^{2}+2}}+\frac{1}{\sqrt{n^{2}+3}}>\frac{3}{\sqrt{n^{2}+3}}$

……….

Therefore $U_{n}>\frac{n}{\sqrt{n^{2}+n}}$ for all $n\geq 2$.

Thus $\frac{n}{\sqrt{n^{2}+n}} for all $n\geq 2$.

Also $\lim_{n \to \infty}\frac{n}{\sqrt{n^{2}+n}}=1$ and $\lim_{n \to \infty}\frac{n}{\sqrt{n^{2}+1}}=1$.

Therefore by Sandwich theorem

$\lim_{n \to \infty}U_{n}=1$

i.e., $\lim _{n \to \infty }\left ( \frac{1}{\sqrt{n^{2}+1}}+\frac{1}{\sqrt{n^{2}+2}}+…..+\frac{1}{\sqrt{n^{2}+n}} \right )=1$

We hope you understand What is the Squeeze theorem (i.e., Sandwich Theorem).

If you have any questions related to the topic what is the squeeze theorem, you can ask in the comment section. We will definitely reply to you.