Evaluating Limits Algebraically

In the last section, we saw lots of rules for limits that ultimately led us to a simple conclusion: if ff is continuous at the point x=c,x = c, then limxcf(x)=f(c)\lim_{x \to c} f(x) = f(c) so we can evaluate the limit simply by substituting in the value of cc for x.x.

Example 1Limit by Substitution

Evaluate the limit limxπ5cos(3x)\lim_{x \to -\pi} 5 \cos (3x)


Solution

limxπ5cos(3x)=5cos(3π)=5\lim_{x \to -\pi} 5 \cos (3x) = 5 \cos (3\pi) = \boxed{-5}

Easy, right?

Because this is so simple, most of the interesting problems deal with cases where you can't do this. In other words, we usually refer to limits only when there is a discontinuity or something else interesting happening to the function.

In practice, this often means that you'll see division by zero when you try substitution.

Example 2Factor and Cancel

Evaluate the limit limx2x26x+8x24\lim_{x \to 2} \dfrac{x^2-6x+8}{x^2-4}


Solution

Let's begin by substituting 22 for x,x, because if that works, then we're done very quickly. (2)26(2)+8(2)24=00\dfrac{(2)^2 - 6(2) + 8}{(2)^2 - 4} = \dfrac{0}{0}

This is what we call an indeterminate form. There are two competing rules here:

  • The first says that 0 divided by anything is 0, so it would claim that the result here should be 0.
  • The second says that division by 0 is impossible, so the result is undefined.

The reality is more interesting. If you look back at the very first example we considered when introducing limits, you'll see limx3x29x3\lim_{x \to 3} \dfrac{x^2-9}{x-3} and in that example, plugging in 3 also led us to 0/0, this same indeterminate form.

After some investigation, we found that there was a hole in the graph at x=3,x=3, and by canceling a term in the numerator and denominator, we could essentially remove that hole. Let's try that here.

Let's simplify the function in this example by factoring and looking for something we can cancel: x26x+8x24=(x4)(x2)(x+2)(x2)=(x4)(x2)(x+2)(x2)=x4x+2\begin{align*} \dfrac{x^2-6x+8}{x^2-4} &= \dfrac{(x-4)(x-2)}{(x+2)(x-2)}\ &= \dfrac{(x-4)\cancel{(x-2)}}{(x+2)\cancel{(x-2)}}\ &= \dfrac{x-4}{x+2} \end{align*}

Now here's the key: as we pointed out in the first section, x26x+8x24=x4x+2\dfrac{x^2-6x+8}{x^2-4} = \dfrac{x-4}{x+2} as long as x2x \neq 2.

But to calculate the limit as xx approaches 2,2, we simply plug in values very close to 22 and see what the function returns. This means that we can use the simplified version to calculate the limit, and to do so, all we have to do is substitute x=2x=2 into the simplified version (which we couldn't do in the original version of the function).

limx2x26x+8x24=limx2x4x+2=242+2=12\begin{align*} \lim_{x \to 2} \dfrac{x^2-6x+8}{x^2-4} &= \lim_{x \to 2} \dfrac{x-4}{x+2}\ &= \dfrac{2-4}{2+2}\ &= \boxed{-\dfrac{1}{2}} \end{align*}

Let's make sure that makes sense: when we evaluate f(c)f(c) and get 00\frac{0}{0}, that immediately tells us that there's a hole in the graph. We then know that if we can simplify the function until f(c)f(c) doesn't give us division by zero, that's equivalent to filling in the hole and making a new function that looks just like the old one but is continuous.

Process for Evaluating Limits

To evaluate limxcf(x)\lim_{x \to c} f(x) begin by calculating f(c).f(c).

  • If that works, you're done.
  • If you get 00,\dfrac{0}{0}, simplify the function until you can evaluate f(c)f(c) without dividing by zero.
  • If you get k0\dfrac{k}{0} for some nonzero value of kk: we'll get to this in the next section.

This first example made it easy to see how 0/0 can be dealt with by simplifying: if two quadratics both yield 0 for the same input, that means they share a factor in common, and that factor can be canceled.

Try It

Evaluate limx4x24xx23x4\lim_{x \to 4} \dfrac{x^2-4x}{x^2-3x-4}

Factor and cancel to simplify. Note that you should keep the limit notation in front of each step, to indicate that you still need to evaluate the limit after simplifying. limx4x24xx23x4=limx4x(x4)(x+1)(x4)=limx4xx+1=45\begin{align*} \lim_{x \to 4} \dfrac{x^2-4x}{x^2-3x-4} &= \lim_{x \to 4} \dfrac{x(x-4)}{(x+1)(x-4)}\ &= \lim_{x \to 4} \dfrac{x}{x+1}\ &= \boxed{\dfrac{4}{5}} \end{align*}

This pattern of factoring and canceling is one of several techniques that we can use to simplify limits with the indeterminate form 0/0. In the examples that follow, we'll look at a few other patterns like this.

The first we'll see involves expanding a quadratic before factoring and canceling.

Example 3Expand, Factor, and Cancel

Evaluate the limit limx016(4+x)2x\lim_{x \to 0} \dfrac{16-(4+x)^2}{x}


Solution

As always, we begin by evaluating this function at x=0:x=0: 16(4)20=00\dfrac{16-(4)^2}{0} = \dfrac{0}{0} Seeing this indeterminate form, we immediately recognize that we need to simplify. The only thing we can really do at first is to expand the term (4+x)2,(4+x)^2, so let's do that. limx016(4+x)2x=limx016(16+8x+x2)x\lim_{x \to 0} \dfrac{16-(4+x)^2}{x} = \lim_{x \to 0} \dfrac{16-(16+8x+x^2)}{x} There are two common mistakes that I see here, so let's make sure to avoid both of them:

  • (4+x)242+x2,(4+x)^2 \neq 4^2 + x^2, no matter how much some students wish these were equal. Make sure to carefully expand quadratics like this: (4+x)2=42+4x+4x+x2.(4+x)^2 = 4^2 + 4x + 4x + x^2.
  • The minus sign in front of (4+x)2(4+x)^2 means that all of that is being subtracted, so make sure to include parentheses after expanding the quadratic, and carefully distribute the minus sign.

We now (after carefully expanding and distributing) arrive at limx016168xx2x\lim_{x \to 0} \dfrac{16-16-8x-x^2}{x} This, of course, simplifies to limx08xx2x\lim_{x \to 0} \dfrac{-8x-x^2}{x} and we can factor an xx from the numerator to cancel with the one in the denominator: limx08xx2x=limx0x(8x)x=limx0x(8x)x=limx08x1\begin{align*} \lim_{x \to 0} \dfrac{-8x-x^2}{x} &= \lim_{x \to 0} \dfrac{x(-8-x)}{x}\ &= \lim_{x \to 0} \dfrac{\cancel{x}(-8-x)}{\cancel{x}}\ &= \lim_{x \to 0} \dfrac{-8-x}{1}\ \end{align*} At this point we're free to plug in 00 for x,x, so limx016(4+x)2x=limx08x1=8\lim_{x \to 0} \dfrac{16-(4+x)^2}{x} = \lim_{x \to 0} \dfrac{-8-x}{1} = \boxed{-8}

Try It

Evaluate each of the following limits.

  1. limh0(3+h)29h\lim_{h \to 0} \dfrac{(3+h)^2-9}{h}

  2. limh0(3+h)29h=limh09+6h+h29h=limh06h+h2h=limh0h(6+h)h=limh06+h1=6\begin{align*} \lim_{h \to 0} \dfrac{(3+h)^2-9}{h} &= \lim_{h \to 0} \dfrac{9+6h+h^2-9}{h}\ &= \lim_{h \to 0} \dfrac{6h+h^2}{h}\ &= \lim_{h \to 0} \dfrac{\cancel{h}(6+h)}{\cancel{h}}\ &= \lim_{h \to 0} \dfrac{6+h}{1}\ &= \boxed{6} \end{align*}

  3. limx1(2x1)29x+1\lim_{x \to -1} \dfrac{(2x-1)^2 - 9}{x+1}

  4. limx1(2x1)29x+1=limx14x24x+19x+1=limx14x24x8x+1=limx14(x2x2)x+1=limx14(x+1)(x2)x+1=limx14(x2)1=12\begin{align*} \lim_{x \to -1} \dfrac{(2x-1)^2 - 9}{x+1} &= \lim_{x \to -1} \dfrac{4x^2-4x+1 - 9}{x+1}\ &= \lim_{x \to -1} \dfrac{4x^2-4x-8}{x+1}\ &= \lim_{x \to -1} \dfrac{4(x^2-x-2)}{x+1}\ &= \lim_{x \to -1} \dfrac{4\cancel{(x+1)}(x-2)}{\cancel{x+1}}\ &= \lim_{x \to -1} \dfrac{4(x-2)}{1}\ &= \boxed{-12} \end{align*}

The third pattern for simplifying involves combining fractions by finding a common denominator. This is one case where you may not see 0/0 when you first try substituting.

Example 4Combining Fractions

Evaluate the limit limt01t1t2+t\lim_{t \to 0} \dfrac{1}{t} - \dfrac{1}{t^2+t}


Solution

When we substitute 0 for xx we don't get 0/0, but we do get 1010\dfrac{1}{0} - \dfrac{1}{0} which is a similar kind of indeterminate form, so we'll go ahead and simplify this one and see what happens.

We need to get a common denominator. If nothing else, you can always do this simply by multiplying the two denominators together. But if you want to be more efficient, you can factor each denominator, which gives us tt and t(t+1).t(t+1).

Notice that they share a factor of t,t, so if we multiply the first fraction by t+1t+1 (on the top and bottom) the denominators will match: limt01t(t+1)(t+1)1t(t+1)=limt0t+1t(t+1)1t(t+1)\lim_{t \to 0} \dfrac{1}{t} {\color{red}\cdot \dfrac{(t+1)}{(t+1)}} - \dfrac{1}{t(t+1)} = \lim_{t \to 0} \dfrac{t+1}{t(t+1)} - \dfrac{1}{t(t+1)} We can now subtract the numerators: limt0tt(t+1)\lim_{t \to 0} \dfrac{t}{t(t+1)} Notice that the factor of tt can be canceled from the numerator and denominator (which will remove the zero from both of them when we plug in 0 for tt): limt0tt(t+1)=limt01t+1=1\lim_{t \to 0} \dfrac{\cancel{t}}{\cancel{t}(t+1)} = \lim_{t \to 0} \dfrac{1}{t+1} = \boxed{1}

Try It

Evaluate each of the following limits.

  1. limx015+x15x\lim_{x \to 0} \dfrac{\dfrac{1}{5+x} - \dfrac{1}{5}}{x}

  2. limx015+x15x=limx015+x55155+x5+xx=limx055(5+x)5+x5(5+x)x=limx0x5(5+x)x=limx0x5(5+x)1x=limx015(5+x)=125\begin{align*} \lim_{x \to 0} \dfrac{\dfrac{1}{5+x} - \dfrac{1}{5}}{x} &= \lim_{x \to 0} \dfrac{\dfrac{1}{5+x} {\color{red}\cdot \dfrac{5}{5}} - \dfrac{1}{5} {\color{red}\cdot \dfrac{5+x}{5+x}}}{x}\ &= \lim_{x \to 0} \dfrac{\dfrac{5}{5(5+x)} - \dfrac{5+x}{5(5+x)}}{x}\ &= \lim_{x \to 0} \dfrac{\dfrac{-x}{5(5+x)}}{x}\ &= \lim_{x \to 0} \dfrac{-x}{5(5+x)} \cdot \dfrac{1}{x}\ &= \lim_{x \to 0} \dfrac{-1}{5(5+x)}\ &= \boxed{-\dfrac{1}{25}} \end{align*}

  3. limx4141x4x\lim_{x \to 4} \dfrac{\dfrac{1}{4} - \dfrac{1}{x}}{4-x}

  4. limx4141x4x=limx414xx1x444x=limx4x4x44x4x=limx4x44x14x=limx41(4x)4x14x=limx414x=116\begin{align*} \lim_{x \to 4} \dfrac{\dfrac{1}{4} - \dfrac{1}{x}}{4-x} &= \lim_{x \to 4} \dfrac{\dfrac{1}{4} {\color{red}\cdot \dfrac{x}{x}} - \dfrac{1}{x} {\color{red}\cdot \dfrac{4}{4}}}{4-x}\ &= \lim_{x \to 4} \dfrac{\dfrac{x}{4x} - \dfrac{4}{4x}}{4-x}\ &= \lim_{x \to 4} \dfrac{x-4}{4x} \cdot \dfrac{1}{4-x}\ &= \lim_{x \to 4} \dfrac{-1(4-x)}{4x} \cdot \dfrac{1}{4-x}\ &= \lim_{x \to 4} \dfrac{-1}{4x}\ &= \boxed{-\dfrac{1}{16}} \end{align*}

The last technique for simplifying occurs when we have something like x1\sqrt{x} - 1 and takes advantage of the fact that if we multiply this by its conjugate (the same expression with a plus sign instead of minus) it starts to look more familiar: (x1)(x+1)=x1(\sqrt{x} - 1)(\sqrt{x} + 1) = x - 1 This is similar to how we can factor x21x^2-1 into (x1)(x+1),(x-1)(x+1), but we just aren't as used to doing this with square roots.

Example 5Multiplying by the Conjugate

Evaluate the limit limx1x1x1\lim_{x \to 1} \dfrac{\sqrt{x} - 1}{x-1}


Solution

It probably isn't obvious yet how this will simplify, but let's try this trick of multiplying by the conjugate; of course, we'll have to multiply it on the top and bottom of the fraction: limx1x1x1x+1x+1=limx1x1(x1)(x+1)\lim_{x \to 1} \dfrac{\sqrt{x} - 1}{x-1} {\color{red}\cdot \dfrac{\sqrt{x} + 1}{\sqrt{x} + 1}} = \lim_{x \to 1} \dfrac{x-1}{(x-1)(\sqrt{x} + 1)}

This might look more complicated than what we started with, but notice that we can now cancel the factor (x1)(x-1) from the whole fraction: limx1x1(x1)(x+1)=limx11x+1\lim_{x \to 1} \dfrac{\cancel{x-1}}{\cancel{(x-1)}(\sqrt{x} + 1)} = \lim_{x \to 1} \dfrac{1}{\sqrt{x} + 1}

At this point we can substitute 1 for xx without dividing by zero, since the offending factor was canceled: limx11x+1=12\lim_{x \to 1} \dfrac{1}{\sqrt{x} + 1} = \boxed{\dfrac{1}{2}}

If we had noticed that we could factor x1x-1 into (x1)(x+1)(\sqrt{x} - 1)(\sqrt{x} + 1) at the beginning, we could have gotten to this conclusion a bit faster, but that's not the kind of factoring that you're probably comfortable doing.

Try It

Evaluate the limit limh01+h1h\lim_{h \to 0} \dfrac{\sqrt{1+h} - 1}{h}

limh01+h1h1+h+11+h+1=limh0(1+h)1h(1+h+1)=limh0hh(1+h+1)=limh011+h+1=12\begin{align*} \lim_{h \to 0} \dfrac{\sqrt{1+h} - 1}{h} {\color{red} \cdot \dfrac{\sqrt{1+h}+1}{\sqrt{1+h}+1}} &= \lim_{h \to 0} \dfrac{(1+h)-1}{h(\sqrt{1+h}+1)}\ &= \lim_{h \to 0} \dfrac{\cancel{h}}{\cancel{h}(\sqrt{1+h}+1)}\ &= \lim_{h \to 0} \dfrac{1}{\sqrt{1+h}+1}\ &= \boxed{\dfrac{1}{2}} \end{align*}

The Squeeze Theorem

We'll finish this section with a short discussion of an important theorem known as the Squeeze Theorem (or sometimes the Sandwich Theorem).

The idea behind this theorem is fairly simple: suppose we don't directly know how to evaluate a limit with a particular function, but we can show that two functions, one above and one below our function, both converge to the same value. In that case, we can conclude that our function must have the same limit.

Three functions are graphed.  The top one is blue and labeled h, the middle one is green and labeled g, and the bottom one is red and labeled f.  All three functions meet at a single point in the middle, labeled (c, L)

Notice how f(x)f(x) and h(x)h(x) in the picture above squeeze g(x)g(x) between them; f(xf(x is often called the lower bound for g(x),g(x), and h(x)h(x) is called the upper bound.

Squeeze Theorem

Suppose [a,b][a,b] is an interval containing a point x=c,x = c, and suppose that f,g,f, g, and hh are functions defined on this interval (except perhaps at cc). If f(x)g(x)h(x)f(x) \leq g(x) \leq h(x) for all values of xx in this interval where they are defined, and limxcf(x)=limxch(x)=L\lim_{x \to c} f(x) = \lim_{x \to c} h(x) = L then limxcg(x)=L.\lim_{x \to c} g(x) = L.

Note that cc could also be one of the endpoints of the interval (although we'd have to change the notation slightly), and this theorem would still apply (with a right- or left-sided limit as appropriate).

Let's take a look at one simple example using the Squeeze Theorem.

Example 6Squeeze Theorem

Evaluate the limit limx0x2sin(1x)\lim_{x \to 0} x^2 \sin \left(\dfrac{1}{x}\right)


Solution

Let's start by looking at the graph of this function.

The graph of this function, oscillating closer and closer to 0.

Just from this graph, we can probably guess what the limit will be as xx approaches 0, but to prove it, we'll rely on our new theorem.

Notice that the upper and lower edges of the oscillating wave look like they follow parabolic curves. This shouldn't be surprising, because if we look at the function, we have x2x^2 multiplied by a sine function. We know that a sine wave is bounded between 1-1 and 1,1, so this product should be bounded between x2-x^2 and x2.x^2.

Sure enough, if we graph those two functions as well, we can see them form neat upper and lower bounds for the function we're interested in.

The graph of the same function, but this time with parabolas above and below drawn in red, bounding the oscillating function between them.

By our knowledge of the properties of sin(x)\sin (x) as well as the graph above, we can conclude that x2x2sin(1x)x2-x^2 \leq x^2 \sin \left(\dfrac{1}{x}\right) \leq x^2 for all values of x,x, so we don't need to worry about picking a specific interval [a,b][a,b] around 0.

As x0,x \to 0, x20x^2 \to 0 and x20,-x^2 \to 0, so based on the Squeeze Theorem we can conclude that limx0x2sin(1x)=0\lim_{x \to 0} x^2 \sin\left(\dfrac{1}{x}\right) = 0

Homework: Evaluating Limits Algebraically

Evaluate the following limits or show that they do not exist.

  1. limx22x2+5x+9\displaystyle\lim_{x \to 2} 2x^2+5x+9

  2. limx2f(x)\displaystyle\lim_{x \to -2^-} f(x) and limx2+f(x)\displaystyle\lim_{x \to -2^+} f(x) for f(x)={x22x2 if x24x if x>2f(x) = \left{\begin{array}{r l} x^2-2x-2 & \textrm{ if } x \leq -2\ -4x & \textrm{ if } x > -2\end{array}\right.

  3. limx12x22x2x3+7\displaystyle\lim_{x \to 1} \dfrac{-2x^2-2x-2}{x^3+7}

  4. limx1f(x)\displaystyle\lim_{x \to -1^-} f(x) and limx1+f(x)\displaystyle\lim_{x \to -1^+} f(x) for f(x)=4x48f(x) = \sqrt{-4x-4}-8

  5. limx33x22x+12x22\displaystyle\lim_{x \to 3} \dfrac{3x^2-2x+1}{2x^2-2}

  6. limx1f(x)\displaystyle\lim_{x \to 1} f(x) for f(x)={x if x<12x+2 if x1f(x) = \left{\begin{array}{r l} x & \textrm{ if } x < 1\ 2x+2 & \textrm{ if } x \geq 1\end{array}\right.

  7. limx12x22\displaystyle\lim_{x \to 1} \sqrt{2x-2} - 2

  8. limx1f(x)\displaystyle\lim_{x \to 1^-} f(x), limx1+f(x),\displaystyle\lim_{x \to 1^+} f(x), and limx1f(x)\displaystyle\lim_{x \to 1} f(x) for f(x)={1x if x1x2+x if x>1f(x) = \left{\begin{array}{r l} 1-x & \textrm{ if } x \leq 1\ -x^2+x & \textrm{ if } x > 1\end{array}\right.

  9. limx52x+8\displaystyle\lim_{x \to -5} |2x+8|

  10. limx3x+12x3\displaystyle\lim_{x \to 3} \dfrac{\sqrt{x+1}-2}{x-3}

  11. limx1x26x55x5\displaystyle\lim_{x \to -1} \dfrac{-x^2-6x-5}{-5x-5}

  12. limx0(4x3)295x\displaystyle\lim_{x \to 0} \dfrac{(-4x-3)^2-9}{-5x}

  13. limx23x2+2x82x29x10\displaystyle\lim_{x \to -2} \dfrac{3x^2+2x-8}{-2x^2-9x-10}

  14. limx13x2+5x22x211x+9\displaystyle\lim_{x \to 1} \dfrac{-3x^2+5x-2}{2x^2-11x+9}

  15. limx081(9x)22x\displaystyle\lim_{x \to 0} \dfrac{81-(9-x)^2}{-2x}

  16. limx41x+4+7(x+4)(x3)\displaystyle\lim_{x \to -4} \dfrac{1}{x+4} + \dfrac{7}{(x+4)(x-3)}

  17. limx21x12x2\displaystyle\lim_{x \to 2} \dfrac{\dfrac{1}{x}-\dfrac{1}{2}}{x-2}

  18. limx5x41x5\displaystyle\lim_{x \to 5} \dfrac{\sqrt{x-4}-1}{x-5}

  19. limx4115x+119125x+118\displaystyle\lim_{x \to 4} \dfrac{\dfrac{1}{1-5x}+\dfrac{1}{19}}{\dfrac{1}{2-5x} + \dfrac{1}{18}}

  20. limx81x+8+5(x+8)(x+3)\displaystyle\lim_{x \to -8} \dfrac{1}{x+8} + \dfrac{5}{(x+8)(x+3)}

  21. limx71x+17x+7\displaystyle\lim_{x \to -7} \dfrac{\dfrac{1}{x}+\dfrac{1}{7}}{x+7}

Homework Answers

  1. 2727

  2. 66 and 88

  3. 34-\dfrac{3}{4}

  4. 8-8 and DNE

  5. 118\dfrac{11}{8}

  6. DNE

  7. DNE

  8. 0,0, 0,0, and 00

  9. 22

  10. 14\dfrac{1}{4}

  11. 45\dfrac{4}{5}

  12. 245-\dfrac{24}{5}

  13. 1010

  14. 17\dfrac{1}{7}

  15. 9-9

  16. 17-\dfrac{1}{7}

  17. 14-\dfrac{1}{4}

  18. 12\dfrac{1}{2}

  19. 324361\dfrac{324}{361}

  20. 15-\dfrac{1}{5}

  21. 149-\dfrac{1}{49}