B.6 The Squeeze (or Sandwich) Theorem

Let's examine the Squeeze Theorem, or the Sandwich Theorem, which lets us determine a function's limit at x = a when that function is squeezed between two other functions that have equal limits at that x-value. Let's look at some examples to see how to use it, and an interactive Desmos calculator to visualize what's going on.

The "Squeeze" or "Sandwich" names are apt, because the theorem says that if your function always lies between two other functions near the point of interest, and those functions have equal limits there, then your function must have the same limit because it's "squeezed" between the other two.

DEFINITION

The Squeeze Theorem

If 𝑔(𝑥) 𝑓(𝑥) (𝑥) when x is near a, except perhaps at a, and lim𝑥𝑎𝑔(𝑥)=lim𝑥𝑎(𝑥)=𝐿 then lim𝑥𝑎𝑓(𝑥)=𝐿

Example function to illustrate the Squeeze Theorem: x cos(1/x), which has an envelope of the lines y=-x and y=x that force the function to 0 as x goes to 0.

The following example illustrates. We're going to revisit a limit we looked at earlier, when we used Desmos graphs to examine "Some Limits That Do Exist; Some That Do Not": lim𝑥0𝑥cos(1𝑥). You might recall the discussion there between Luis and Qiao about whether the limit exists and equals 0, or does not exist at all because cos(1/𝑥) oscillates wildly near 𝑥 =0.. Let's now reason about the limit without relying on Desmos.

Example 1: lim𝑥0𝑥cos(1/𝑥)

Prove lim𝑥0𝑥cos(1/𝑥)=0.

Solution.

This is a classic use of the Squeeze theorem involving an oscillating trig function, either sine or cosine. You should always start your proof with the trig function itself, using the fact that no matter what the argument is, sin and cosine simply oscillate between 1 and 1, and never exceed those bounds. Here, then, our first line is 1cos(1/𝑥)1 Next, recall that the function we're interested in is 𝑥cos(1/𝑥). So we multiply each term in the line above by x to force our function to be in the middle: 𝑥𝑥cos(1/𝑥)𝑥 So our function of interest is always squeezed between 𝑥 and 𝑥. (You can see this in an interactive graph below.)

Now, since we know lim𝑥0(𝑥)=0andlim𝑥0𝑥=0 we immediately conclude by the Squeeze Theorem lim𝑥0𝑥cos(1/𝑥)=0 That's it: your proof ends there.

To understand what's going on visually, the interactive Desmos calculator shows the function 𝑓(𝑥) =𝑥cos(1/𝑥) as a solid red curve, while the green dashed lines indicate 𝑦 =𝑥 and 𝑦 = 𝑥. You can see how near 𝑥 =0 the x acts as an "envelope" for the cosine function, bounding (or "squeezing") its amplitude. Said differently, the amplitude of this oscillating function is always x, so since lim𝑥0(±𝑥)=0, the function is forced to 0 as 𝑥 0. Using the buttons beneath the graph, you can view the original function 𝑓(𝑥), or just cos(1/𝑥), and show/hide the lines 𝑦 = ±𝑥.

Interactive graph of 𝑓(𝑥) =𝑥cos(1/𝑥) versus x to explore limit near 𝑥 =0

Note in particular how lim𝑥0cos(1/𝑥) does not exist, but the "squeezed" function 𝑓(𝑥) =𝑥cos(1/𝑥) is forced to 0 as 𝑥 0. That's the Squeeze theorem at work!

There is one other typical problem-type that requires use of the Squeeze Theorem, as illustrated in Example 2. In this type, you don't know anything about the function of interest other than that it always lies between two other (known) functions — and that's enough to be able to use the Squeeze Theorem.

Example 2: 3𝑥 4 𝑓(𝑥) 𝑥2 3𝑥 +5

Given 3𝑥4𝑓(𝑥)𝑥23𝑥+5 for 𝑥0, find lim𝑥3𝑓(𝑥).

Solution.

In a problem like this, it will always be the case that the two functions that squeeze the function of interest, 𝑓(𝑥), have equal limits at the x-value of interest. Here, for instance, we have lim𝑥3(3𝑥4)=5andlim𝑥3(𝑥23𝑥+5)=5 Hence since 3𝑥 4 𝑓(𝑥) 𝑥2 3𝑥 +5, and we just determined the limits of the two bounding functions at 𝑥 =3, we conclude using the Squeeze Theorem that lim𝑥3𝑓(𝑥)=5 Again, that's it: proof done.

Because it's of such limited use, problems requiring the Squeeze Theorem don't appear frequently on exams and sometimes isn't even required for any homework problems. Please check with your instructor whether you need to know how to use it to find a limit. That said, we will need it later to prove an important theorem, so keep it in the back of your mind!


The Upshot

  1. The Squeeze, or Sandwich, Theorem says that if a function f lies between two other functions near the point of interest, and those functions have the same limit L at that point, then f has that limit L there as well.

On the next screen, we'll look at a few limits involving trig functions that, early in your Calculus studies, you simply have to memorize.