Skip to main content

Subsection 1.4.1 Calculating Limits with Limit Laws

Think back to the functions you know and the sorts of things you have been asked to draw, factor and so on. Then they are all constructed from simple pieces, such as

  • constants — \(c\)
  • monomials — \(x^n\)
  • trigonometric functions — \(\sin(x), \cos(x)\) and \(\tan(x)\)

These are the building blocks from which we construct functions. Soon we will add a few more functions to this list, especially the exponential function and various inverse functions.

We then take these building blocks and piece them together using arithmetic

  • addition and subtraction — \(f(x) = g(x) + h(x)\) and \(f(x) = g(x) - h(x)\)
  • multiplication — \(f(x) = g(x) \cdot h(x)\)
  • division — \(f(x) = \frac{g(x)}{h(x)}\)
  • substitution — \(f(x) = g( h(x) )\) — this is also called the composition of \(g\) with \(h\text{.}\)

The idea of building up complicated functions from simpler pieces was discussed in Section 0.5.

What we will learn in this section is how to compute the limits of the basic building blocks and then how we can compute limits of sums, products and so forth using “limit laws”. This process allows us to compute limits of complicated functions, using very simple tools and without having to resort to “plugging in numbers” or “closer and closer” or “\(\epsilon-\delta\) arguments”.

In the examples we saw above, almost all the interesting limits happened at points where the underlying function was badly behaved — where it jumped, was not defined or blew up to infinity. In those cases we had to be careful and think about what was happening. Thankfully most functions we will see do not have too many points at which these sorts of things happen.

For example, polynomials do not have any nasty jumps and are defined everywhere and do not “blow up”. If you plot them, they look smooth  1 We have used this term in an imprecise way, but it does have a precise mathematical meaning.. Polynomials and limits behave very nicely together, and for any polynomial \(P(x)\) and any real number \(a\) we have that

\begin{align*} \lim_{x \to a} P(x) &= P(a) \end{align*}

That is — to evaluate the limit we just plug in the number. We will build up to this result over the next few pages.

Let us start with the two easiest limits  2 Though it lies outside the scope of the course, you can find the formal \(\epsilon\)-\(\delta\) proof of this result at the end of Section 1.7.

Since we have not seen too many theorems yet, let us examine it carefully piece by piece.

  • Let \(a,c \in \mathbb{R}\) — just as was the case for definitions, we start a theorem by defining terms and setting the scene. There is not too much scene to set: the symbols \(a\) and \(c\) are real numbers.
  • The following two limits hold — this doesn't really contribute much to the statement of the theorem, it just makes it easier to read.
  • \(\ds \mathbf{\lim_{x \to a} c = c}\) — when we take the limit of a constant function (for example think of \(c=3\)), the limit is (unsurprisingly) just that same constant.
  • \(\ds \mathbf{\lim_{x \to a} x = a}\) — as we noted above for general polynomials, the limit of the function \(f(x) = x\) as \(x\) approaches a given point \(a\text{,}\) is just \(a\text{.}\) This says something quite obvious — as \(x\) approaches \(a\text{,}\) \(x\) approaches \(a\) (if you are not convinced then sketch the graph).

Armed with only these two limits, we cannot do very much. But combining these limits with some arithmetic we can do quite a lot. For a moment, take a step back from limits for a moment and think about how we construct functions. To make the discussion a little more precise think about how we might construct the function

\begin{align*} h(x) &= \frac{2x-3}{x^2+5x-6} \end{align*}

If we want to compute the value of the function at \(x=2\text{,}\) then we would

  • compute the numerator at \(x=2\)
  • compute the denominator at \(x=2\)
  • compute the ratio

Now to compute the numerator we

  • take \(x\) and multiply it by 2
  • subtract 3 to the result

While for the denominator

  • multiply \(x\) by \(x\)
  • multiply \(x\) by 5
  • add these two numbers and subtract \(6\)

This sequence of operations can be represented pictorially as the tree shown in Figure 1.4.2 below.

Figure 1.4.2

Such trees were discussed in Section 0.5 (now is not a bad time to quickly review that section before proceeding). The point here is that in order to compute the value of the function we just repeatedly add, subtract, multiply and divide constants and \(x\text{.}\)

To compute the limit of the above function at \(x=2\) we can do something very similar. From the previous theorem we know how to compute

\begin{align*} \lim_{x \to 2} c &= c && \text{and} & \lim_{x \to 2} x &= 2 \end{align*}

and the next theorem will tell us how to stitch together these two limits using the arithmetic we used to construct the function.

The above theorem shows that limits interact very simply with arithmetic. If you are asked to find the limit of a sum then the answer is just the sum of the limits. Similarly the limit of a product is just the product of the limits.

How do we apply the above theorem to the rational function \(h(x)\) we defined above? Here is a warm-up example:

You are given two functions \(f,g\) (not explicitly) which have the following limits as \(x\) approaches 1:

\begin{align*} \lim_{x \to 1} f(x)&=3 && \text{and} & \lim_{x\to 1} g(x)&=2 \end{align*}

Using the above theorem we can compute

\begin{align*} \lim_{x \to 1} 3f(x) &= 3 \times 3 = 9\\ \lim_{x \to 1} 3f(x) -g(x) &= 3\times 3 -2 = 7\\ \lim_{x \to 1} f(x) g(x) &= 3\times 2 = 6\\ \lim_{x \to 1} \frac{f(x)}{f(x) -g(x)} &= \frac{3}{3-2} = 3 \end{align*}

Another simple example

Find \(\ds \lim_{x \to 3} 4x^2-1\)

We use the arithmetic of limits:

\begin{align*} \lim_{x \to 3} 4x^2-1 &= \left( \lim_{x \to 3} 4x^2 \right) - \lim_{x \to 3} 1 & \text{difference of limits}\\ &= \left( \lim_{x \to 3} 4 \cdot \lim_{x \to 3} x^2 \right) - \lim_{x \to 3} 1 & \text{product of limits}\\ &= 4 \cdot \left( \lim_{x \to 3} x^2 \right) - 1 & \text{limit of constant}\\ &= 4 \cdot \left( \lim_{x \to 3} x \right) \cdot \left( \lim_{x \to 3} x \right)-1 & \text{product of limits}\\ &= 4 \cdot 3 \cdot 3 - 1 & \text{limit of $x$}\\ &= 36 - 1\\ &= 35 \end{align*}

This is an excruciating level of detail, but when you first use this theorem and try some examples it is a good idea to do things step by step by step until you are comfortable with it.

Yet another limit — compute \(\ds \lim_{x\to 2} \frac{x}{x-1}\text{.}\)

To apply the arithmetic of limits, we need to examine numerator and denominator separately and make sure the limit of the denominator is non-zero. Numerator first:

\begin{align*} \lim_{x \to 2} x & = 2 & \text{limit of $x$}\\ \end{align*}

and now the denominator:

\begin{align*} \lim_{x \to 2} x-1 & = \left( \lim_{x \to 2} x \right) - \left( \lim_{x \to 2} 1 \right) & \text{difference of limits}\\ & = 2 - 1 & \text{limit of $x$ and limit of constant} & = 1 \end{align*}

Since the limit of the denominator is non-zero we can put it back together to get

\begin{align*} \lim_{x\to 2} \frac{x}{x-1} &= \frac{\ds \lim_{x\to 2} x}{\ds \lim_{x \to 2}(x-1)}\\ &= \frac{2}{1}\\ &= 2 \end{align*}

In the next example we show that many different things can happen if the limit of the denominator is zero.

We must be careful when computing the limit of a ratio — it is the ratio of the limits except when the limit of the denominator is zero. When the limit of the denominator is zero Theorem 1.4.3 does not apply and a few interesting things can happen

  • If the limit of the numerator is non-zero then the limit of the ratio does not exist
    \begin{align*} \lim_{x \to a} \frac{f(x)}{g(x)} &= DNE & \text{when $\lim_{x\to a} f(x) \neq 0$ and $\lim_{x \to a} g(x)=0$} \end{align*}
    For example, \(\ds \lim_{x \to 0} \frac{1}{x^2} = DNE\text{.}\)
  • If the limit of the numerator is zero then the above theorem does not give us enough information to decide whether or not the limit exists. It is possible that

    • the limit does not exist, eg. \(\ds \lim_{x \to 0} \frac{x}{x^2} = \lim_{x \to 0} \frac{1}{x} = DNE\)
    • the limit is \(\pm \infty\text{,}\) eg. \(\ds \lim_{x \to 0} \frac{x^2}{x^4} = \lim_{x \to 0} \frac{1}{x^2} = +\infty\) or \(\ds \lim_{x \to 0} \frac{-x^2}{x^4} = \lim_{x\to 0} \frac{-1}{x^2} = -\infty\text{.}\)
    • the limit is zero, eg. \(\ds \lim_{x \to 0} \frac{x^2}{x} = 0\)
    • the limit exists and is non-zero, eg. \(\ds \lim_{x \to 0} \frac{x}{x} = 1\)

Now while the above examples are very simple and a little contrived they serve to illustrate the point we are trying to make — be careful if the limit of the denominator is zero.

We now have enough theory to return to our rational function and compute its limit as \(x\) approaches 2.

Let \(\ds h(x) = \frac{2x-3}{x^2+5x-6}\) and find its limit as \(x\) approaches \(2\text{.}\)

Since this is the limit of a ratio, we compute the limit of the numerator and denominator separately. Numerator first:

\begin{align*} \lim_{x \to 2} 2x-3 &= \left( \lim_{x \to 2} 2x \right) - \left( \lim_{x \to 2} 3 \right) & \text{difference of limits}\\ &= 2 \cdot \left( \lim_{x \to 2} x \right) -3 & \text{product of limits and limit of constant}\\ &= 2 \cdot 2 -3 & \text{limits of $x$}\\ &= 1 \end{align*}

Denominator next:

\begin{align*} \lim_{x \to 2} x^2+5x-6 &= \left( \lim_{x \to 2} x^2 \right) + \left( \lim_{x \to 2} 5x \right) - \left( \lim_{x \to 2} 6 \right) & \!\!\!\!\!\!\text{sum of limits}\\ &= \left( \lim_{x \to 2} x \right)\cdot \left( \lim_{x \to 2} x \right) + 5 \cdot \left( \lim_{x \to 2} x \right) - 6\\ &\hskip1.0in \text{product of limits and limit of constant}\\ &= 2 \cdot 2 + 5 \cdot 2 - 6 & \text{limits of $x$}\\ &= 8 \end{align*}

Since the limit of the denominator is non-zero, we can obtain our result by taking the ratio of the separate limits.

\begin{align*} \lim_{x \to 2} \frac{2x-3}{x^2+5x-6} &= \frac{\ds \lim_{x \to 2} 2x-3}{\ds \lim_{x \to 2} x^2+5x-6} = \frac{1}{8} \end{align*}

The above works out quite simply. However, if we were to take the limit as \(x \to 1\) then things are a bit harder. The limit of the numerator is:

\begin{align*} \lim_{x \to 1} 2x-3 &= 2 \cdot 1 - 3 = -1 \end{align*}

(we have not listed all the steps). And the limit of the denominator is

\begin{align*} \lim_{x \to 1} x^2 +5x-6 &= 1 \cdot 1 + 5 - 6 = 0 \end{align*}

Since the limit of the numerator is non-zero, while the limit of the denominator is zero, the limit of the ratio does not exist.

\begin{align*} \lim_{x \to 1} \frac{2x-3}{x^2+5x-6} &= DNE \end{align*}

It is IMPORTANT TO NOTE that it is not correct to write

\begin{align*} \lim_{x \to 1} \frac{2x-3}{x^2+5x-6} &= \frac{-1}{0} = DNE \end{align*}

Because we can only write

\begin{align*} \lim_{x \to a} \frac{f(x)}{g(x)} &= \frac{\ds \lim_{x \to a} f(x)}{\ds \lim_{x \to a} g(x) } = \text{something} \end{align*}

when the limit of the denominator is non-zero (see Example 1.4.7 above).

With a little care you can use the arithmetic of limits to obtain the following rules for limits of powers of functions and limits of roots of functions:

Notice that we have to be careful when taking roots of limits that might be negative numbers. To see why, consider the case \(n=2\text{,}\) the limit

\begin{align*} \lim_{x \to 4} x^{1/2} &= 4^{1/2} = 2\\ \lim_{x \to 4} (-x)^{1/2} &= (-4)^{1/2} = \text{not a real number} \end{align*}

In order to evaluate such limits properly we need to use complex numbers which are beyond the scope of this text.

Also note that the notation \(x^{1/2}\) refers to the positive square root of \(x\text{.}\) While \(2\) and \((-2)\) are both square-roots of \(4\text{,}\) the notation \(4^{1/2}\) means \(2\text{.}\) This is something we must be careful of  4 Like ending sentences in prepositions — “This is something up with which we will not put.” This quote is attributed to Churchill though there is some dispute as to whether or not he really said it..

So again — let us do a few examples and carefully note what we are doing.

\begin{align*} \lim_{x \to 2} (4x^2-3)^{1/3} &= \left( (\lim_{x\to 2} 4x^2) - (\lim_{x \to 2} 3) \right)^{1/3}\\ &= \left( 4 \cdot 2^2 - 3 \right)^{1/3}\\ &= \left( 16-3 \right)^{1/3}\\ &= 13^{1/3} \end{align*}

By combining the last few theorems we can make the evaluation of limits of polynomials and rational functions much easier:

So the previous examples are now much easier to compute:

\begin{align*} \ds\lim_{x \to 2} \frac{2x-3}{x^2+5x-6} &=& \ds \frac{4-3}{4+10-6} &=& \ds \frac{1}{8}\\ \ds\lim_{x\to 2} (4x^2-1) &=& 16-1 &=& 15\\ \ds\lim_{x\to 2} \frac{x}{x-1} &=& \ds \frac{2}{2-1} &=& 2 \end{align*}

It is clear that limits of polynomials are very easy, while those of rational functions are easy except when the denominator might go to zero. We have seen examples where the resulting limit does not exist, and some where it does. We now work to explain this more systematically. The following example demonstrates that it is sometimes possible to take the limit of a rational function to a point at which the denominator is zero. Indeed we must be able to do exactly this in order to be able to define derivatives in the next chapter.

Consider the limit

\begin{gather*} \lim_{x \to 1} \frac{x^3-x^2}{x-1}. \end{gather*}

If we try to apply the arithmetic of limits then we compute the limits of the numerator and denominator separately

\begin{align*} \lim_{x \to 1} x^3-x^2 &= 1-1 = 0\\ \lim_{x \to 1} x-1 &= 1-1 = 0 \end{align*}

Since the denominator is zero, we cannot apply our theorem and we are, for the moment, stuck. However, there is more that we can do here — the hint is that the numerator and denominator both approach zero as \(x\) approaches 1. This means that there might be something we can cancel.

So let us play with the expression a little more before we take the limit:

\begin{align*} \frac{x^3-x^2}{x-1} &= \frac{x^2(x-1)}{x-1} = x^2 & \text{ provided } x \neq 1. \end{align*}

So what we really have here is the following function

\begin{align*} \frac{x^3-x^2}{x-1} &= \begin{cases} x^2 & x \neq 1\\ \text{undefined } & x = 1 \end{cases} \end{align*}

If we plot the above function the graph looks exactly the same as \(y=x^2\) except that the function is not defined at \(x=1\) (since at \(x=1\) both numerator and denominator are zero).

When we compute a limit as \(x \to a\text{,}\) the value of the function exactly at \(x=a\) is irrelevant. We only care what happens to the function as we bring \(x\) very close to \(a\text{.}\) So for the above problem we can write

\begin{align*} \frac{x^3-x^2}{x-1} &= x^2 & \text{when $x$ is close to $1$ but not at $x=1$} \end{align*}

So the limit as \(x \to 1\) of the function is the same as the limit \(\ds \lim_{x\to 1} x^2\) since the functions are the same except exactly at \(x=1\text{.}\) By this reasoning we get

\begin{align*} \lim_{x \to 1} \frac{x^3-x^2}{x-1} &= \lim_{x \to 1} x^2 = 1 \end{align*}

The reasoning in the above example can be made more general:

How do we know when to use this theorem? The big clue is that when we try to compute the limit in a naive way, we end up with \(\frac{0}{0}\text{.}\) We know that \(\frac{0}{0}\) does not make sense, but it is an indication that there might be a common factor between numerator and denominator that can be cancelled. In the previous example, this common factor was \((x-1)\text{.}\)

Using this idea compute

\begin{gather*} \lim_{h \to 0} \frac{(1+h)^2-1}{h} \end{gather*}
  • First we should check that we cannot just substitute \(h=0\) into this — clearly we cannot because the denominator would be \(0\text{.}\)
  • But we should also check the numerator to see if we have \(\frac{0}{0}\text{,}\) and we see that the numerator gives us \(1-1 = 0\text{.}\)
  • Thus we have a hint that there is a common factor that we might be able to cancel. So now we look for the common factor and try to cancel it.
    \begin{align*} \frac{(1+h)^2-1}{h} &= \frac{1+2h+h^2-1}{h} & \text{expand}\\ &= \frac{2h+h^2}{h} = \frac{h(2+h)}{h} & \text{factor and then cancel}\\ &= 2+h \end{align*}
  • Thus we really have that
    \begin{align*} \frac{(1+h)^2-1}{h}&= \begin{cases} 2+h & h \neq 0 \\ \text{undefined} & h=0 \end{cases} \end{align*}
    and because of this
    \begin{align*} \lim_{h \to 0} \frac{(1+h)^2-1}{h} &= \lim_{h \to 0} 2+h\\ &= 2 \end{align*}

Of course — we have written everything out in great detail here and that is way more than is required for a solution to such a problem. Let us do it again a little more succinctly.

Compute the following limit:

\begin{gather*} \lim_{h \to 0} \frac{(1+h)^2-1}{h} \end{gather*}

If we try to use the arithmetic of limits, then we see that the limit of the numerator and the limit of the denominator are both zero. Hence we should try to factor them and cancel any common factor. This gives

\begin{align*} \lim_{h \to 0} \frac{(1+h)^2-1}{h} &= \lim_{h \to 0} \frac{1+2h+h^2-1}{h}\\ &= \lim_{h \to 0} 2+h\\ &= 2 \end{align*}

Notice that even though we did this example carefully above, we have still written some text in our working explaining what we have done. You should always think about the reader and if in doubt, put in more explanation rather than less. We could make the above example even more terse

Compute the following limit:

\begin{gather*} \lim_{h \to 0} \frac{(1+h)^2-1}{h} \end{gather*}

Numerator and denominator both go to zero as \(h\to 0\text{.}\) So factor and simplify:

\begin{align*} \lim_{h \to 0} \frac{(1+h)^2-1}{h} &= \lim_{h \to 0} \frac{1+2h+h^2-1}{h}\\ &= \lim_{h \to 0} 2+h = 2 \end{align*}

A slightly harder one now

Compute the limit

\begin{gather*} \lim_{x \to 0} \frac{x}{\sqrt{1+x}-1} \end{gather*}

If we try to use the arithmetic of limits we get

\begin{align*} \lim_{x \to 0} x &= 0\\ \lim_{x \to 0} \sqrt{1+x}-1 &= \sqrt{ \lim_{x \to 0} 1+x}-1 = 1-1 =0 \end{align*}

So doing the naive thing we'd get \(0/0\text{.}\) This suggests a common factor that can be cancelled. Since the numerator and denominator are not polynomials we have to try other tricks  5 While these tricks are useful (and even cute 6 Mathematicians tend to have quite strong opinions on the beauty of mathematics. For example, Paul Erdős  7 Arguably the most prolific mathematician of the 20th century — definitely worth a google. The authors do not know his opinion on nested footnotes  8 Nested footnotes are generally frowned upon, since they can get quite contorted; see XKCD-1208 and also the novel “House of Leaves” by Mark Z. Danielewski.. said “Why are numbers beautiful? It's like asking why is Beethoven's Ninth Symphony beautiful. If you don't see why, someone can't tell you. I know numbers are beautiful. If they aren't beautiful, nothing is.”. — this footnote is better in the online edition), Taylor polynomials (see Section 3.4) give us a more systematic way of approaching this problem.. We can simplify the denominator \(\sqrt{1+x}-1\) a lot, and in particular eliminate the square root, by multiplying it by its conjugate \(\sqrt{1+x}+1\text{.}\)

\begin{align*} \frac{x}{\sqrt{1+x}-1} &=\frac{x}{\sqrt{1+x}-1} \times \frac{\sqrt{1+x}+1}{\sqrt{1+x}+1} & \text{multiply by $\frac{\text{conjugate}}{\text{conjugate}}=1$}\\ &=\frac{x \left( \sqrt{1+x}+1\right)} {\left(\sqrt{1+x}-1\right)\left(\sqrt{1+x}+1\right)} & \text{bring things together }\\ &=\frac{x \left( \sqrt{1+x}+1\right)} {\left(\sqrt{1+x}\right)^2 - 1\cdot 1} &\!\!\!\!\!\!\! \text{since $(a\!-\!b)(a\!+\!b)=a^2\!-\!b^2$}\\ &=\frac{x \left( \sqrt{1+x}+1\right)} {1+x - 1} & \text{clean up a little}\\ &=\frac{x \left( \sqrt{1+x}+1\right)}{x}\\ &= \sqrt{1+x}+1 & \text{cancel the $x$} \end{align*}

So now we have

\begin{align*} \lim_{x \to 0} \frac{x}{\sqrt{1+x}-1} &= \lim_{x \to 0} \sqrt{1+x}+1\\ &= \sqrt{1+0}+1 = 2 \end{align*}

How did we know what to multiply by? Our function was of the form

\begin{gather*} \frac{a}{\sqrt{b} - c} \end{gather*}

so, to eliminate the square root from the denominator, we employ a trick — we multiply by 1. Of course, multiplying by 1 doesn't do anything. But if you multiply by 1 carefully you can leave the value the same, but change the form of the expression. More precisely

\begin{align*} \frac{a}{\sqrt{b} - c} &= \frac{a}{\sqrt{b} - c} \cdot 1\\ &= \frac{a}{\sqrt{b} - c} \cdot \underbrace{\frac{\sqrt{b}+c}{\sqrt{b}+c}}_{=1}\\ &= \frac{a \left(\sqrt{b}+c \right)}{\left(\sqrt{b} - c\right)\left(\sqrt{b}+c \right)} & \text{expand denominator carefully}\\ &= \frac{a \left(\sqrt{b}+c \right)} {\sqrt{b} \cdot \sqrt{b} - c\sqrt{b} + c\sqrt{b} - c\cdot c} & \text{do some cancellation}\\ &= \frac{a \left(\sqrt{b}+c \right)} {b - c^2} \end{align*}

Now the numerator contains roots, but the denominator is just a polynomial.

Before we move on to limits at infinity, there is one more theorem to see. While the scope of its application is quite limited, it can be extremely useful. It is called a sandwich theorem or a squeeze theorem for reasons that will become apparent.

Sometimes one is presented with an unpleasant ugly function such as

\begin{align*} f(x) &= x^2 \sin(\pi/x) \end{align*}

It is a fact of life, that not all the functions that are encountered in mathematics will be elegant and simple; this is especially true when the mathematics gets applied to real world problems. One just has to work with what one gets. So how can we compute

\begin{gather*} \lim_{x \to 0} x^2 \sin(\pi/x) ? \end{gather*}

Since it is the product of two functions, we might try

\begin{align*} \lim_{x \to 0} x^2 \sin(\pi/x) &= \left( \lim_{x \to 0} x^2 \right) \cdot \left( \lim_{x \to 0} \sin(\pi/x) \right)\\ &= 0 \cdot \left( \lim_{x \to 0} \sin(\pi/x) \right)\\ & = 0 \end{align*}

But we just cheated — we cannot use the arithmetic of limits theorem here, because the limit

\begin{align*} \lim_{x \to 0} \sin(\pi/x) &= DNE \end{align*}

does not exist. Now we did see the function \(\sin(\pi/x)\) before (in Example 1.3.5), so you should go back and look at it again. Unfortunately the theorem “the limit of a product is the product of the limits” only holds when the limits you are trying to multiply together actually exist. So we cannot use it.

However, we do see that the function naturally decomposes into the product of two pieces — the functions \(x^2\) and \(\sin(\pi/x)\text{.}\) We have sketched the two functions in the figure on the left below.

While \(x^2\) is a very well behaved function and we know quite a lot about it, the function \(\sin(\pi/x)\) is quite ugly. One of the few things we can say about it is the following

\begin{align*} -1 \leq \sin(\pi/x) \leq 1 && \text{provided $x \neq 0$} \end{align*}

But if we multiply this expression by \(x^2\) we get (because \(x^2 \geq 0\))

\begin{align*} -x^2 \leq x^2\sin(\pi/x) \leq x^2 && \text{provided $x \neq 0$} \end{align*}

and we have sketched the result in the figure above (on the right). So the function we are interested in is squeezed or sandwiched between the functions \(x^2\) and \(-x^2\text{.}\)

If we focus in on the picture close to \(x=0\) we see that \(x\) approaches \(0\text{,}\) the functions \(x^2\) and \(-x^2\) both approach \(0\text{.}\) Further, because \(x^2\sin(\pi/x)\) is sandwiched between them, it seems that it also approaches \(0\text{.}\)

The following theorem tells us that this is indeed the case:

Using the above theorem we can compute the limit we want and write it up nicely.

Compute the limit

\begin{equation*} \lim_{x \to 0} x^2 \sin(\pi/x) \end{equation*}

Since \(-1 \leq \sin(\theta) \leq 1\) for all real numbers \(\theta\text{,}\) we have

\begin{align*} -1 \leq \sin(\pi /x ) \leq 1 && \text{for all } x \neq 0 \end{align*}

Multiplying the above by \(x^2\) we see that

\begin{align*} -x^2 \leq x^2 \sin(\pi /x ) \leq x^2 && \text{for all } x\neq0 \end{align*}

Since \(\ds \lim_{x \to 0} x^2 = \lim_{x \to 0} (-x^2) = 0\) by the sandwich (or squeeze or pinch) theorem we have

\begin{align*} \lim_{x \to 0} x^2 \sin(\pi/x) &= 0 \end{align*}

Notice how we have used “words”. We have remarked on this several times already in the text, but we will keep mentioning it. It is okay to use words in your answers to maths problems — and you should do so! These let the reader know what you are doing and help you understand what you are doing.

Let \(f(x)\) be a function such that \(1 \leq f(x) \leq x^2-2x+2\text{.}\) What is \(\ds \lim_{x \to 1} f(x)\text{?}\)

We are already supplied with an inequality, so it is likely that it is going to help us. We should examine the limits of each side to see if they are the same:

\begin{align*} \lim_{x \to 1} 1 &= 1\\ \lim_{x \to 1} x^2-2x+2 &= 1-2+2 = 1 \end{align*}

So we see that the function \(f(x)\) is trapped between two functions that both approach \(1\) as \(x \to 1\text{.}\) Hence by the sandwich / pinch / squeeze theorem, we know that

\begin{align*} \lim_{x \to 1} f(x) & =1 \end{align*}

To get some intuition as to why the squeeze theorem is true, consider when \(x\) is very very close to \(a\text{.}\) In particular, consider when \(x\) is sufficiently close to \(a\) that we know \(h(x)\) is within \(10^{-6}\) of \(L\) and that \(f(x)\) is also within \(10^{-6}\) of \(L\text{.}\) That is

\begin{align*} |h(x)-L| & \lt 10^{-6} & \text{and}&& |f(x)-L| & \lt 10^{-6}. \end{align*}

This means that

\begin{align*} L-10^{-6} & \lt f(x) \leq h(x) \lt L+10^{-6} \end{align*}

since we know that \(f(x) \leq h(x)\text{.}\)

But now by the hypothesis of the squeeze theorem we know that \(f(x) \leq g(x) \leq h(x)\) and so we have

\begin{align*} L-10^{-6} & \lt f(x) \leq g(x) \leq h(x) \lt L+10^{-6} \end{align*}

And thus we know that

\begin{equation*} L-10^{-6} \leq g(x) \leq L+10^{-6} \end{equation*}

That is \(g(x)\) is also within \(10^{-6}\) of \(L\text{.}\)

In this argument our choice of \(10^{-6}\) was arbitrary, so we can really replace \(10^{-6}\) with any small number we like. Hence we know that we can force \(g(x)\) as close to \(L\) as we like, by bringing \(x\) sufficiently close to \(a\text{.}\) We give a more formal and rigorous version of this argument at the end of Section 1.9.