The Sandwich Theorem

Some important limits can be evaluated using the following theorem, which is known as the Sandwich Theorem (as well as the Squeeze Theorem and the Pinching Theorem). It states that if a function f is sandwiched between two functions g and h near a and if g and h approach the same number L, then f must approach L too as x a .

Quick Reference

Theorem Bounding Condition Result
Sandwich Theorem g ( x ) f ( x ) h ( x ) near a with lim x a g ( x ) = lim x a h ( x ) = L lim x a f ( x ) = L
Zero × Bounded Theorem lim x a α ( x ) = 0 and m f ( x ) M near a lim x a [ α ( x ) f ( x ) ] = 0


The validity of this theorem is suggested by the following figure.

Geometric diagram of the Sandwich Theorem showing f squeezed between g and h at L
The Sandwich Theorem.

Suppose that

g ( x ) f ( x ) h ( x )

for all x near a (except possibly at x = a itself). If

lim x a g ( x ) = lim x a h ( x ) = L ,

then

lim x a f ( x ) = L .
  • The Sandwich Theorem also holds for the one-sided limits; that is, we can replace x a by x a or x a + in the above equations, and the theorem will be still valid.

The rigorous proof is as follows.

Proof of the Sandwich Theorem

Suppose ϵ > 0 is given. We need to show that there exists a δ > 0 such that for all x:

0 < | x a | < δ | f ( x ) L | < ϵ .

Because lim x a g ( x ) = L and lim x a h ( x ) = L , there exist some δ 1 > 0 and δ 2 > 0 such that for all x:

0 < | x a | < δ 1 L ϵ < g ( x ) < L + ϵ

and

0 < | x a | < δ 2 L ϵ < h ( x ) < L + ϵ .

[Note that | g ( x ) L | < ϵ is equivalent to ϵ < g ( x ) L < ϵ and if we add L to each side it is equivalent to L ϵ < g ( x ) < L + ϵ . (See here)]

Now if we choose δ = min { δ 1 , δ 2 } , then for all x if 0 < | x a | < δ then

L ϵ < g ( x ) f ( x ) h ( x ) < L + ϵ .

That is, L ϵ < f ( x ) < L + ϵ or | f ( x ) L | < ϵ .

Worked Examples

Show that

lim x 0 x 1 x = 1 ,

where the symbol   (also [ [   ] ] ) denotes the greatest integer (or floor) function.

The greatest integer function or the floor function is defined by x = the largest integer that is less than or equal to  x . For example, 2.5 = 2 , 2.5 = 3 , π = 4 . Notice that x 1 < x x .

Solution

For every number t, we know t 1 < t t . Therefore, for every x 0 :

1 x 1 < 1 x 1 x .

If x > 0 , we can multiply each side by x and the directions of inequalities are preserved:

1 x < x 1 x 1.

Because lim x 0 ( 1 x ) = 1 0 = 1 , by the Sandwich Theorem:

lim x 0 + x 1 x = 1.

If x < 0 , we still multiply both sides by x but the directions of inequalities are reversed:

1 x > x 1 x 1.

Again because lim x 0 ( 1 x ) = 1 0 = 1 , by the Sandwich Theorem:

lim x 0 x 1 x = 1.

Because lim x 0 x 1 x = lim x 0 + x 1 x = 1 , we conclude that

lim x 0 x 1 x = 1.

The graphs of y = x 1 x , y = 1 x , and y = 1 are depicted in the following figure.

Graph of y = x * floor(1/x) squeezed between y = 1 - x and y = 1
Graphs of y = x 1 x , y = 1 x , and y = 1 .

Use the inequalities | x | < sin x < | x | , | x | < 1 cos x < | x | , and the Sandwich Theorem to prove:

  1. lim x 0 sin x = 0
  2. lim x 0 cos x = 1

Then conclude that:

  1. lim x a sin x = sin a
  2. lim x a cos x = cos a
Solution

(a) Since for all values of x, we have | x | sin x | x | and lim x 0 | x | = lim x 0 ( | x | ) = 0 , it follows from the Sandwich Theorem that lim x 0 sin x = 0 .

(b) Since | x | 1 cos x | x | , it follows from the Sandwich Theorem that lim x 0 ( 1 cos x ) = 0 . By the Sum Law, we have lim x 0 ( 1 cos x ) = lim x 0 1 lim x 0 cos x . Because lim x 0 1 = 1 , we obtain 1 lim x 0 cos x = 0 lim x 0 cos x = 1 .

To prove parts (c) and (d), let h = x a . In this case, x a is equivalent to h 0 and lim x a sin x = lim h 0 sin ( h + a ) , lim x a cos x = lim h 0 cos ( h + a ) .

(c) Using the Addition Formula for Sine, we have sin ( h + a ) = sin h cos a + cos h sin a . Thus:

lim h 0 sin ( h + a ) = lim h 0 ( cos a sin h + sin a cos h ) .

Because sin a and cos a are two constants, by the Constant Multiple Law, we have:

lim h 0 ( cos a sin h + sin a cos h ) = cos a lim h 0 sin h + sin a lim h 0 cos h .

In the previous parts, we proved lim h 0 sin h = 0 and lim h 0 cos h = 1 . Therefore:

cos a lim h 0 sin h + sin a lim h 0 cos h = cos a × 0 + sin a × 1 = sin a .

Finally, lim x a sin x = lim h 0 sin ( h + a ) = sin a .

(d) Similar to part (c), we use the Addition Formula for Cosine:

\begin{aligned} \lim_{h\to 0} \cos(h + a) &= \lim_{h\to 0} (\cos h \cos a + \sin h \sin a) \\ &= \cos a \lim_{h\to 0} \cos h + \sin a \lim_{h\to 0} \sin h \\ &= \cos a \times 1 + \sin a \times 0 = \cos a. \end{aligned}


Evaluate the following limits:

  1. lim x 0 [ x sin ( 1 x ) ]
  2. lim x 0 + [ x cos ( 1 x 2 ) ]
  3. lim x 0 [ sin x sin ( 1 x ) ]
Solution

(a) Note that for x 0 , we have 1 sin 1 x 1 . If x > 0 and we multiply each side by x, the directions of the inequalities will not change: x x sin 1 x x ( x > 0 ). Because lim x 0 + x = lim x 0 + ( x ) = 0 , it follows from the Sandwich Theorem that lim x 0 + x sin 1 x = 0 .

If x < 0 and we multiply each side by x, we need to reverse the direction of the inequalities: x x sin 1 x x ( x < 0 ). Because lim x 0 x = lim x 0 ( x ) = 0 , it follows from the Sandwich Theorem that lim x 0 x sin 1 x = 0 . Because the left and right limits are equal, we conclude that lim x 0 ( x sin 1 x ) = 0 .

Graph of y = x sin(1/x) trapped between y = x and y = -x
Graph of y = x sin ( 1 / x ) lies between the graphs of y = x and y = x .

(b) Similar to part (a), we start from the fact that 1 cos t 1 and if we replace t with 1 / x 2 when x 0 , we get 1 cos ( 1 x 2 ) 1 . Multiplying each side by x : x x cos ( 1 x 2 ) x . Because lim x 0 + x = lim x 0 + ( x ) = 0 , by the Sandwich theorem lim x 0 + [ x cos ( 1 x 2 ) ] = 0 .

Graph of y = sqrt(x) cos(1/x^2)
Graph of y = x cos ( 1 / x 2 ) defined for x 0 lies between the graphs of y = x and y = x .

(c) Similar to part (a), we start with 1 sin ( 1 x ) 1 ( x 0 ). If 0 < x < π , then sin x > 0 and therefore sin x sin x sin ( 1 x ) sin x . If π < x < 0 , then sin x < 0 and therefore sin x sin x sin ( 1 x ) sin x . Because lim x 0 sin x = lim x 0 ( sin x ) = 0 , it follows from the Sandwich Theorem that lim x 0 [ sin x sin 1 x ] = 0 .

Graph of y = sin(x) sin(1/x)
Graph of y = sin x sin ( 1 / x ) lies between the graphs of y = sin x and y = sin x .

The following theorem is also useful.

Theorem: Suppose that lim x a α ( x ) = 0 and f ( x ) is a bounded function near a ( x a ); that is, there are numbers m and M such that m f ( x ) M for x near a (but not necessarily equal to a). Then

lim x a [ α ( x ) f ( x ) ] = 0.
  • The above theorem says that if we multiply a function α ( x ) that approaches zero by another function f ( x ) that does not blow up at x = a , then the result α ( x ) f ( x ) still approaches zero.


For example, because sine is a bounded function 1 sin 1 x 1 ( x 0 ) and lim x 0 x = 0 , we have

lim x 0 x sin 1 x = 0.

The graphs of y = sin 1 x and y = x sin 1 x are shown below.

Graphs of sin(1/x) and x sin(1/x)
Graphs of y = sin 1 x and y = x sin 1 x .

Similarly because 1 sin x 1 and lim x ± 1 x = 0 , we have

lim x + sin x x = 0 , lim x sin x x = 0.

Let's solve the last example again but this time using the above theorem.

Evaluate the following limits using the Zero × Bounded Theorem:

  1. lim x 0 [ x sin ( 1 x ) ]
  2. lim x 0 + [ x cos ( 1 x 2 ) ]
  3. lim x 0 [ sin x sin ( 1 x ) ]
Solution

In all above sin ( 1 / x ) , cos ( 1 / x 2 ) are bounded functions because the sine and cosine functions never exceed + 1 or fall below 1 : 1 sin ( 1 x ) 1 , 1 cos ( 1 x 2 ) 1 ( x 0 ).

The remaining factors all approach zero: lim x 0 x = 0 , lim x 0 + x = 0 , lim x 0 sin x = 0 .

Each limit is therefore of the form (something tending to zero) × (something bounded). By the theorem, all three are zero:

lim x 0 [ x sin ( 1 x ) ] = 0 , lim x 0 + [ x cos ( 1 x 2 ) ] = 0 , lim x 0 [ sin x sin ( 1 x ) ] = 0.

Compare the length of this argument with the case-by-case work of the previous example.

Exercises


Suppose that for all x 0 near x = 0 , the function f ( x ) satisfies:

1 x 2 6 f ( x ) 1 + x 2 2 .

Evaluate lim x 0 f ( x ) using the Sandwich Theorem.

Answer

1

Solution

Let g ( x ) = 1 x 2 6 and h ( x ) = 1 + x 2 2 .



Evaluating the limits of the bounding functions as x 0 :

lim x 0 g ( x ) = lim x 0 ( 1 x 2 6 ) = 1 0 = 1 , lim x 0 h ( x ) = lim x 0 ( 1 + x 2 2 ) = 1 + 0 = 1.

Since g ( x ) f ( x ) h ( x ) near x = 0 and lim x 0 g ( x ) = lim x 0 h ( x ) = 1 , by the Sandwich Theorem:

lim x 0 f ( x ) = 1.


Evaluate the following limits:

  1. lim x 0 [ x 2 cos ( 1 x ) ]
  2. lim x 0 + [ x 3 / 2 sin ( π x ) ]
Answer

(a) 0      (b) 0

Solution

(a) For x 0 , the cosine function is bounded: 1 cos ( 1 x ) 1 .



Since lim x 0 x 2 = 0 , by the Zero × Bounded Theorem:

lim x 0 [ x 2 cos ( 1 x ) ] = 0.

(b) Similarly, for x > 0 , 1 sin ( π x ) 1 . Multiplying by x 3 / 2 > 0 :

x 3 / 2 x 3 / 2 sin ( π x ) x 3 / 2 .

Since lim x 0 + ( x 3 / 2 ) = 0 and lim x 0 + x 3 / 2 = 0 , by the Sandwich Theorem:

lim x 0 + [ x 3 / 2 sin ( π x ) ] = 0.


Evaluate the limit at infinity:

lim x + 2 x + sin x x 3 .
Answer

2

Solution

For x > 3 , divide both the numerator and the denominator by x :

2 x + sin x x 3 = 2 + sin x x 1 3 x .

To find lim x + sin x x , note that 1 sin x 1 for all x . For x > 0 , dividing by x gives:

1 x sin x x 1 x .

Since lim x + ( 1 x ) = 0 and lim x + ( 1 x ) = 0 , by the Sandwich Theorem:

lim x + sin x x = 0.

Now, applying the Quotient and Sum Laws:

lim x + 2 x + sin x x 3 = lim x + 2 + lim x + sin x x lim x + 1 lim x + 3 x = 2 + 0 1 0 = 2.


Evaluate lim x + 3 x x , where   denotes the floor function.

Answer

3

Solution

By definition of the floor function, for any real number t :

t 1 < t t .

Setting t = 3 x , we have 3 x 1 < 3 x 3 x .



For x > 0 , dividing each term by x preserves the direction of the inequalities:

3 x 1 x < 3 x x 3 x x 3 1 x < 3 x x 3.

Evaluating the limits of the outer expressions as x + :

lim x + ( 3 1 x ) = 3 0 = 3 , lim x + 3 = 3.

By the Sandwich Theorem:

lim x + 3 x x = 3.


Suppose that a function f ( x ) satisfies | f ( x ) 3 | 5 ( x 2 ) 2 for all x . Evaluate lim x 2 f ( x ) .

Answer

3

Solution

The inequality | f ( x ) 3 | 5 ( x 2 ) 2 is equivalent to:

5 ( x 2 ) 2 f ( x ) 3 5 ( x 2 ) 2 .

Adding 3 to all parts:

3 5 ( x 2 ) 2 f ( x ) 3 + 5 ( x 2 ) 2 .

Evaluating the limits of the outer functions as x 2 :

lim x 2 [ 3 5 ( x 2 ) 2 ] = 3 5 ( 0 ) 2 = 3 , lim x 2 [ 3 + 5 ( x 2 ) 2 ] = 3 + 5 ( 0 ) 2 = 3.

By the Sandwich Theorem:

lim x 2 f ( x ) = 3.