# When can we plug in values in a limit?

When is it that we can plug in the limit point into the function to evaluate a limit?

I believe for real limit points, we can do this when the function is continuous at the point. But what about for limits at $\infty$ and $-\infty$? Is there a general statement that we can make about this?

Example: It is easy to believe that the following limit evaluates to $0$ $$\lim_{n\to\infty}{\sqrt{n^2+n}-n}$$

How can we not fall into these traps?

EDIT: Yes, the above limit is simple to evaluate correctly (it's $1/2$). But what I'm asking is for a rigorous condition under which we can know whether or not we can naively plug in the value to get the correct answer.

-
There is a number system called "Riemann sphere" where "plug in $\infty$" can be done. But even in that case, $\infty - \infty$ is undefined. Or (as they say in calculus) indeterminate. –  GEdgar Jul 25 '11 at 14:46
@tskuzzy: The problem here is not "plugging in" or "not plugging in"; the problem here is that you get an indeterminate form, namely $\infty-\infty$. If you don't get an indeterminate form, then you're fine. For example, $\lim\limits_{n\to\infty}\sqrt{1+\frac{1}{n}} - n$ does evaluate to "$1-\infty=-\infty$", because $c-\infty$ is not indeterminate. –  Arturo Magidin Jul 25 '11 at 16:44
@Arturo: What about the case where the indeterminate form is encountered "at the end"? For example, the limit laws apply to $$\lim_{n\to\infty}\left({n\sqrt{1+\frac{1}{n}}-n}\right)$$ which equals $\infty\cdot 1 - \infty$. Why does one not conclude that the limit does not exist in this case? Does an indeterminate form always mean that another approach needs to be taken? –  raxacoricofallapatorius Sep 20 '11 at 22:12
@raxacoricofallapatorius: No, the limit law that says that the limit of a difference is the difference of the limits when they both exist most definitely does not apply to that limit. What makes you think it does? –  Arturo Magidin Sep 21 '11 at 4:15
@Arturo: Working outward: $1/n\to0$, so $\sqrt{{1}+{1/n}}\to 1$, so $n\sqrt{{1}+{1/n}}\to \infty \cdot 1$. Where am I going wrong? Is it because $L=\infty$ isn't really a limit in the sense of the limit law? –  raxacoricofallapatorius Sep 21 '11 at 4:32

First, I don't think you actually asked what you meant to ask. I'll answer what you actually asked, and then comment on what I think you meant to ask.

You are correct that if $\lim\limits_{x\to a}f(x) = k\in\mathbb{R}$ and $g$ is continuous at $k$, then $$\lim_{x\to a}\;g(f(x)) = g\left(\lim_{x\to a}f(x)\right) = g(k);$$ and this also holds if $a$ is replaced by $\infty$ or $-\infty$.

It gets a bit trickier if the limit of $f$ is $\infty$ or $-\infty$; for one thing, it no longer makes sense to write $g(\lim\limits_{x\to a}f(x))$, so instead we must talk about $\lim\limits_{t\to\infty}g(t)$. But even with that correction, we do not have an easy criteria for when it makes sense to "plug in"; here are two propositions and one example along those lines.

Proposition 1. If $\lim\limits_{x\to a}f(x) = \infty$, and $\lim\limits_{t\to\infty}g(t) = k\in\mathbb{R}\cup\{\infty,-\infty\}$, then $\lim\limits_{x\to a}\;g(f(x))=k$.

Proof. Suppose $\lim\limits_{t\to\infty}g(t) = k$. First, take $k\in\mathbb{R}$. We show that $\lim\limits_{x\to a}\;g(f(x)) = k$. Let $\epsilon\gt 0$. Then there exists $M\gt 0$ such that if $t\gt M$, then $|g(t)-k|\lt \epsilon$. Since $\lim\limits_{x\to a}f(x) = \infty$, there exists $\delta\gt 0$ such that if $0\lt |x-a|\lt \delta$, then $f(x)\gt M$. Thus, if $0\lt |x-a|\lt \delta$, then $f(x)\gt M$, hence $|g(f(x))-k|\lt\epsilon$. Therefore, $\lim\limits_{x\to a}\;g(f(x)) = k$, as claimed.

Now consider the case $k=\infty$. Let $N\gt 0$; then there exists $M\gt 0$ such that if $t\gt M$, then $g(t)\gt N$. Since $\lim\limits_{x\to a}f(x)=\infty$, there exists $\delta\gt 0$ such that if $0\lt |x-a|\lt \delta$, then $f(x)\gt M$; hence $g(f(x))\gt N$ whenever $0\lt |x-a|\lt \delta$, proving that $\lim\limits_{x\to a}\;g(f(x))=\infty$. The same argument holds if $k=-\infty$. QED

The result also holds if $a$ is replaced with $\infty$ or $-\infty$.

The converse doesn't work in general:

Example: Functions $f$ and $g$, with $g$ continuous everywhere (in fact, uniformly continuous), $\lim\limits_{x\to a}f(x)=\infty$, $\lim\limits_{x\to a} \;g(f(x))$ exists, and $\lim\limits_{t\to\infty}g(t)$ does not exist.

Let $f(x) = \lfloor x\rfloor\pi$, $g(t)=\sin(t)$, $a=\infty$. Then $\lim\limits_{x\to \infty}\;g(f(x))=0$, but $\lim\limits_{t\to\infty}g(t)$ does not exist, nor is it equal to $\infty$ or $-\infty$. It is not hard to come up with similar examples with $a\in\mathbb{R}$. QED

Proposition 2. Let $f$ and $g$ be functions, and assume that:

1. $\lim\limits_{x\to a}f(x)=\infty$; and
2. For every $\delta\gt 0$ there exists $M_{\delta}\gt 0$ such that $(M_{\delta},\infty)\subseteq f\Bigl( (a-\delta,a)\cup(a,a+\delta)\Bigr)$.

If $\lim\limits_{x\to a}\;g(f(x))=k\in\mathbb{R}\cup\{\infty,-\infty\}$, then $\lim\limits_{t\to\infty}g(t) = k$.

Proof. We do the case $k\in\mathbb{R}$; the other two cases are similar. Let $\epsilon\gt 0$. Then there exists $\delta\gt 0$ such that if $0\lt|x-a|\lt \delta$, then $|g(f(x))-k|\lt\epsilon$.

By (2), there exists $M_{\delta}$ such if $t\gt M_{\delta}$, then there exists $x\in (a-\delta,a)\cup(a,a+\delta)$ with $f(x)=t$.

Therefore, if $t\gt M$, then there exists $x$, $0\lt |x-a|\lt \delta$ such that $g(t) = g(f(x))$, hence $|g(t)-k| = |g(f(x))-k|\lt \epsilon$, with the last inequality by choice of $\delta$. Therefore, $\lim\limits_{t\to\infty}g(t)=k$, as claimed. QED

Similar results hold if we replace $a$ with $\infty$ or $-\infty$.

Corollary. Let $f$ and $g$ be functions with $\lim\limits_{x\to a}f(x) =\infty$ and $\lim\limits_{x\to a}\;g(f(x))=k\in\mathbb{R}\cup\{\infty,-\infty\}$. If $f$ is continuous on an open punctured neighborhood of $a$, then $\lim\limits_{t\to\infty}\;g(t)=k$.

Proof. If $f$ is continuous on an open punctured neighborhood of $a$, then the condition that $f(x)\to\infty$ as $x\to a$ ensures that $f$ satisfies condition 2 of Proposition 2. QED

In fact, it's enough that $f$ be continuous on either an interval of the form $(a-\delta_f,a)$, or on an interval of the form $(a,a+\delta_f)$.

Continuity can even be weakened further:

Corollary. Let $f$ and $g$ be functions with $\lim\limits_{x\to a}f(x)=\infty$ and $\lim\limits_{x\to a}\;g(f(x))=k\in\mathbb{R}\cup\{\infty,-\infty\}$. If there exists $\delta_f\gt 0$ such that $f$ has the intermediate value property on either $(a-\delta_f,a)$ or on $(a,a+\delta_f)$, then $\lim\limits_{t\to \infty} g(t) = k$.

Proof. Assume that $f$ has the intermediate value property on $(a-\delta_f,a)$; the other case is similar. We prove that $f$ satisfies condition (2) of Proposition 2.

Let $\delta\gt 0$; we may assume that $\delta\leq\delta_f$.

Let $M=f(a-\frac{\delta}{2})$; let $z\gt M$. Since $\lim\limits_{x\to a}\;f(x)=\infty$, there exist $x_1$, $a-\frac{\delta}{2}\lt x_1 \lt a$ such that $f(x_1)\gt z$. Since $f$ has the intermediate value property on $(a-\delta,a)$ and $f(a-\frac{\delta}{2})\lt z\lt f(x_1)$, we can find $x_2\in (a-\frac{\delta}{2},x_1)$ such that $f(x_2)= z$; thus, $z\in f(a-\delta,a)$. This proves that for all $z\gt M$, $z\in f(a-\delta,a)$, hence $(M,\infty)$ is contained in the image and Condition (2) of Proposition 2 holds; conclusion of the corollary now follows from Proposition 2. QED

Note that in my example above, $f$ does not have the intermediate value property, which is what leads to problems.

That said: the real issue with your example lies in the indeterminate form $\infty-\infty$, rather than a problem with "plugging in", I think.

Instead, what you are dealing with here is an attempt at applying the limit laws that say, for example, that the limit of a difference is the difference of the limits:

If $\lim\limits_{x\to a}f(x) = L$ and $\lim\limits_{x\to a}g(x)=M$, then $\lim\limits_{x\to a}\Bigl(f(x)-g(x)\Bigr) = L-M$.

If we try to extend this (and related results on sums, products, and quotients) to the cases where limits are equal to $\infty$ or $-\infty$, then you have to deal with the extended reals, $\mathbb{R}\cup\{\infty,-\infty\}$. The problem here is that not every operation among extended reals is well-defined. Some operations are well defined and the limits laws work for them:

• $\infty+a = \infty$ for all real numbers $a$;
• $-\infty+a = -\infty$ for all real numbers $a$;
• $\pm\infty\times a =\pm\infty$ if $a\gt 0$ or $a=\infty$;
• $\pm\infty\times a = \mp\infty$ if $a\lt 0$ or $a=-\infty$;
• $\frac{\pm\infty}{a} = \pm\infty$ if $a\gt 0$;
• $\frac{\pm\infty}{a} = \mp\infty$ if $a\lt 0$;
• $\frac{a}{\pm\infty} = 0$.

But other expressions are indeterminate forms: the limit laws don't apply to them. They don't apply to expressions like $\infty-\infty$ or $\frac{\infty}{\infty}$ (just like they don't apply in the real numbers to expressions like $\frac{a}{0}$).

So the problem is not one of "plugging in", but rather that the mistake you mention lies in trying to apply the limit laws and forgetting that $\infty-\infty$ is an indeterminate form and not an operation that can be performed.

-
(+1) for actually answering the question! –  The Chaz 2.0 Jul 26 '11 at 1:14
+1 yet another amazing answer. Wish I could do +more, for what it's worth ($\epsilon$) –  Ross Millikan Jul 26 '11 at 4:19
@The Chaz: (and Arturo) Sorry, I menat the rep is worth $\epsilon$. The answer is worth much more. –  Ross Millikan Jul 26 '11 at 13:04
I keep seeing these excerpts of the book "Everything I Wished I was Taught in Math" by Arturo Magidin, yet I can't seem to find the book anywhere... when is it coming out, and if it does come out, where can I buy a copy? –  Ｊ. Ｍ. Jul 27 '11 at 3:10
@J.M. Well, as my just-completed edit shows, it needs to go through several rounds of refereeing... –  Arturo Magidin Jul 27 '11 at 3:12

For $x\to\pm\infty$, consider the change of variables $u=1/x$ and let $u\to 0^{\pm}$.

-
That's a method of evaluating such limits. But how can we use this to know that we can simply plug in $0^\pm$? –  tskuzzy Jul 25 '11 at 14:20
@tskuzzy, you can when the function $f(u)$ is continuous at 0. –  lhf Jul 25 '11 at 14:50
Are you trying to say "never"? Because $f(u)$ is always undefined at 0 and thus discontinuous. –  tskuzzy Jul 25 '11 at 14:52
The function is continuous at 0 in this case is a shorthand phrase for: there exists a continuous extension to 0. –  Florian Jul 25 '11 at 14:58
@tskuzzy: What Ihf means is that even if the function is not defined at zero, thus discontinuous, the disctontinuity might be removable...Keep in mind that after you do some algebraic manipulations/simplifications sometimes you obtain expressions which are defined at 0. –  N. S. Jul 25 '11 at 15:14

In this case its rather easy to see if you notice that

$$\sqrt{n^2+n}-n=\sqrt{n^2+n+\frac{1}{4}-\frac{1}{4}}-n = \sqrt{(n+\frac{1}{2})^2-\frac{1}{4}}-n$$

In general, I think the best thing to do is to expand it into a polynomial, and look at what the resulting structure looks like.

-
I know the correct way of evaluating the above limit. But how can we avoid evaluating it the wrong way? Under what conditions can we rigorously show that a limit can/cannot be evaluated by plugging in the value? –  tskuzzy Jul 25 '11 at 14:24
I sort of mentioned it later in my statement. You would want to expand it and see what the terms are. In this case you would have something like $n+\frac{1}{2}+... - n$ –  picakhu Jul 25 '11 at 14:26
To me, that still seems more like an algorithm or a heuristic to evaluate it. But what if I gave you the limit $\frac{n+0.5}{n}$? Clearly it's 0 via plugging in $\infty$. In general, why is it that we can do this for certain classes of limits? –  tskuzzy Jul 25 '11 at 14:29
you cannot in general "plug in" $\infty$, you would have you apply l'hopitals in that case to know (if its a fraction) –  picakhu Jul 25 '11 at 14:32
@tskuzzy: I imagine you meant two comments ago that the limit was clearly $1$. "Plugging in" $\infty$ will almost never work. One could come up with a small number of types of problem in which it will work, but they will almost never be useful, and when they are useful, correct methods are very fast also. –  André Nicolas Jul 25 '11 at 15:04
show 1 more comment