Let’s say I ask you how tall Craig is going to be when he’s 15 years old, and let’s say, given his genetic information, you just can’t tell what height he will be at that age. However, you do know that he’s going to be taller than Lisa, and shorter than Khangelani up until the age of 15 (they are all the same age). With this information alone, you haven’t learnt much about the height of Craig when he’s 15. However, what if you can figure out, using your clever genetic detective work, that at the age of 15 Lisa and Khangelani will be the same height? The only way for this to be true, is if Craig (whose height is sandwiched in between that of Lisa and Khangelani) is also the same height at that age.


That’s really all the sandwich theorem is. Let’s look at a mathematical example.


What is the limit:


\lim_{x\rightarrow 0} x\sin\frac{1}{x}


Well, we know that if the limit of each function exists, then the limit of a product of functions is equal to the product of the limits. However, the limit as x tends to 0 of \sin\frac{1}{x} doesn’t exist. This is because as x\rightarrow 0, \frac{1}{x}\rightarrow\infty and the sine function fluctuates as its argument gets bigger and bigger. Thus we can’t use the limit laws to work out this limit.


However, one thing that we know about \sin\frac{1}{x} is that it must be between -1 and +1, because that is the range of the sine function. Sine can only ever spit out numbers between -1 and +1. This means that:


-1\le \sin\frac{1}{x}\le 1


x\sin\frac{1}{x} can be thought of as “x times something which is always between -1 and 1”. Now we have to be a little bit careful. We can take the above inequality and we can multiply it through by x, but depending on the sign of x we may or may not change the direction of the inequality (remember if you multiply an inequality by a negative number then the directions flip. We can certainly say that for x\ge 0:


-x\le x\sin\frac{1}{x}\le x


However for x\le 0 we have to swap the signs:


-x\ge x\sin\frac{1}{x}\ge x


Now we can take limits, but we have to be careful because one of the inequalities is valid for positive x and the other for negative x. We can say that:


\lim_{x\rightarrow 0^+} -x\le \lim_{x\rightarrow 0^+} x\sin\frac{1}{x}\le \lim_{x\rightarrow 0^+} x


which tells us that:


0\le \lim_{x\rightarrow 0^+} x\sin\frac{1}{x}\le 0


and so, just as in the example with the heights, we can say that the limit of the function is equal to the two things that squeeze it from either side if they are equal:


\lim_{x\rightarrow 0^+} x\sin\frac{1}{x}=0


For x\le 0 we have


\lim_{x\rightarrow 0^-} -x\ge \lim_{x\rightarrow 0^-} x\sin\frac{1}{x}\ge \lim_{x\rightarrow 0^-} x


which implies that


0\ge \lim_{x\rightarrow 0^-} x\sin\frac{1}{x}\ge 0


and so


\lim_{x\rightarrow 0^-} x\sin\frac{1}{x}=0


If the two limits exist and are the same, then we can say that


\lim_{x\rightarrow 0} x\sin\frac{1}{x}=0


In this example we had to be particularly careful because in the product of functions, the one which was well behaved (ie. whose limits we knew) changed sign, and so we had to split things up as the inequalities swapped around. It won’t always be the case that you have to split it into the two separate limits. For instance, had it been x^2\sin\frac{1}{x} then it would have been slightly easier.


Visually we can see what is going on by looking at the graphs of y=x\sin\frac{1}{x} (green), y=x (red) and y=-x (blue) (at least for positive x).


You can see that while the function we are interested in is going crazy as x\rightarrow 0, you can be sure that it is between the red and blue lines, and thus, as we take x to zero, if the red and blue lines converge, then the green line will tend to whatever the red and blue lines are converging to. In this case it’s 0.


What if we wanted to know \lim_{x\rightarrow 15} x\sin\frac{1}{x}? Well, do we need to use the squeeze theorem? No, not at all, in this case the limit of both parts of the product exist and we end up with 15\sin\frac{1}{15}. We use the squeeze theorem when we have a product of functions where one of the functions doesn’t have a limit at the place we’re interested, but we can say that it is always between two other functions, who tend to the same thing in the limit of interest. We have to take this on a case by case basis.


Let’s look at a somewhat complicated example. What if we wanted to calculate:


\lim_{x\rightarrow \infty} \dfrac{7x^4+\sin 4x}{x^4+4}


This looks much much harder! How on Earth are we going to be able to figure out what the appropriate functions to sandwich this function in between will be? Well, the point is that we just want to ask about the behaviour for large x.


Well, the first thing that we know is that -1\le \sin 4x\le 1 and so, by simply adding the same thing to all parts of the inequality:


-1+7x^4\le 7x^4+\sin 4x\le 1+7x^4. So we can also say, by dividing everything by the same (positive) denominator that:


\dfrac{-1+7x^4}{x^4+4}\le \dfrac{7x^4+\sin 4x}{x^4+4}\le \dfrac{1+7x^4}{x^4+4}


Now, if we want to know what the limit of the middle function is, we can ask what the limits of the two outer functions are. Let’s start on the left:




Performing the same exercise with the function on the right, you will find exactly the same answer. So we can see that as x\rightarrow \infty, the function that we are interested in is between 7 and 7. Well, that makes it pretty certain that it must also be 7.


We haven’t actually stated the squeeze theorem yet, but just given some intuition for it. The squeeze theorem states the following:


If functions f(x), g(x) and h(x) satisfy:


f(x)\le g(x)\le h(x)




\lim_{x\rightarrow a} f(x)=L=\lim_{x\rightarrow a}  h(x)




\lim_{x\rightarrow a}  g(x)=L


We thus use this theorem if we have a function g(x) whose limit we don’t know, but we can find two other functions f(x) and h(x) which it is sandwiched in between. We find them by inspecting g(x) and working out if some part of it will always be constrained to be within some particular range of values (like sin is).





How clear is this post?