This question already has an answer here:

I'm a student just starting calculus in college, and my math skills are pretty stale.

So... how come finding limits using change of variable works?

For example: $$\lim_{x \to 1}\frac{x\cos(x-1) -1}{x-1}$$

A way to solve this is to invent "out of thin air" $t = x-1$, and then the limit above is equal to: $$\lim_{t \to 0}\frac{(t + 1)\cos(t) - 1}{t}$$

How come this works?
A limit is not an algebraic equation. what about domains of definition? We are actually finding a different limit of a different function in a different place, how come they are equal (in general)?

just to clarify I'm not asking about this specific example. I'm asking in general, when can you do this to find limits? when not? and why?


marked as duplicate by Xander Henderson, Did calculus Jul 10 '18 at 20:15

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


There is a very general result which guarantees such substitutions. Let $\lim\limits_{x \to a}f(x) = L$ exist and let $\lim\limits_{t \to b}g(t) = a$ exist and also assume that $g(t) \neq a$ when $t$ is in a certain neighborhood of $b$ then $\lim_{t \to b}f(g(t)) = L$.

Please understand that the theorem is valid only under the conditions given in the above result and one of the first conditions is that $\lim_{x \to a}f(x)$ exists. If we don't know in advance whether the limit of $f(x)$ exists then how do we make a substitution $x = g(t)$ (in this question we put $x = t + 1$)?

To answer this we need to understand that the substitution $x = g(t)$ ($x = t + 1$) used here is invertible so that we have an inverse substitution $t = h(x)$ ($t = x - 1$) with $x = g(h(x)), t = h(g(t))$ which will allow us to infer the existence of limit $\lim_{x \to a}f(x)$ on the basis of existence of limit $\lim_{t \to b}f(g(t))$ via the theorem given in the beginning of this post.

Another condition which is very very important is to ensure that $g(t) \neq a$ when $t$ is near $b$. Clearly this holds in the substitution used in the current question when $x = t + 1$ and $a = 1, b = 0$.

If we think deeply we will find that if $g(t)$ is invertible in the neighborhood of $t = b$ then it will automatically ensure that $g(t) \neq a$ in a certain neighborhood of $b$. So in practice we use the following :

Theorem: If $x = g(t)$ is an invertible function with inverse $t = h(x)$ in the deleted neighborhood of $t = b$ and $\lim\limits_{t \to b}g(t) = a, \lim\limits_{x \to a}h(x) = b$ then either both the limits $\lim\limits_{x \to a}f(x)$ and $\lim\limits_{t \to b}f(g(t))$ exist and are equal or both of them don't exist.

Note that there is no condition on $f$ for the above theorem.

  • $\begingroup$ After further thought and reading your answer again, the change of variables you commented on my post is essentialy the counter example you wanted, and rightfully pointed out could exist. Here is a fix (your counter example failed because of the continuity of $f$). Let $$h(x) = \begin{cases} x & x \neq 0 \\ 1 & x = 0. \end{cases}$$ Then, for $g(t) = t \sin(\frac{1}{t})$, we have $\lim_{t \rightarrow 0} h(g(t)) $ does not exist. Because of the lack of a punctured neighborhood around $0$ where $g(t) \neq 0$. Thanks for your precision and diligence. $\endgroup$ – mlg4080 Dec 19 '14 at 20:14
  • $\begingroup$ @mlg4080: My counterexample is OK, but yours is simpler. Thanks. $\endgroup$ – Paramanand Singh Dec 20 '14 at 5:18
  • $\begingroup$ @ParamandSing If you don't trust me, check your favorite computer algebra system (or work it yourself) the limit in your example exists and is two when you say it does not exist. $\endgroup$ – mlg4080 Dec 20 '14 at 20:13
  • $\begingroup$ @mlg4080: you should use symbolic software for heavy calculation and not for simple conceptual problems. The reason limit of $$f(g(t))=\dfrac{(1+t\sin(1/t))^{2}-1}{t\sin(1/t)}$$ as $t\to 0$ does not exist is because the function is not defined when $t=1/n\pi$. Symbolic package will try to simplify $f(g(t))=2+t\sin(1/t)$ without noticing that this simplification fails when $t=1/n\pi$ because when this happens both numerator and denominator of $f(g(t))$ are $0$. $\endgroup$ – Paramanand Singh Dec 21 '14 at 7:38
  • $\begingroup$ @ParamanandSingh it is a great post, I still have a question, sometimes $x=g(t)$ may be very complicated, rather than $t+1$. is there some theorem let us know whether or not a function is inverse in a deleted neighborhood? thank you $\endgroup$ – noname1014 Nov 28 '15 at 20:14

It works because the equality holds: $$ {x\cos(x-1)-1\over x-1}={(t+1)\cos(t)-1\over t} \quad \text{where }t=x-1.\tag{1} $$ This is no different than rewriting $2+2$ or $3+1$ or $7-3$ whenever you see a $4$. They are just different ways to same the same thing.

Now, since in the original problem, we had $x\to 1$, then in the new variable we have $t=x-1\to 1-1=0$, i.e., $t\to 0$. Hence, $(1)$ becomes $$ \lim_{x\to 1}{x\cos(x-1)-1\over x-1}=\lim_{t\to 0}{(t+1)\cos(t)-1\over t}.\tag{2} $$

You said limits aren't an algebraic equation---that is correct. But they are an "operation" that one can apply to both sides of an existing equation, such as $(1)$ and maintain equality such as in $(2)$.

Edit based on the comments:

Suppose you have the algebraic expression $f(x)$ and make the change of variables $x=g(t)$. Then $$f(x)=f(g(t)).\tag{3}$$ This is a generalized version of the type of statement in $(1)$.

Moreover, if $g$ is a continuous function then $x\to a\implies g(t)\to a$, but then from $(3)$ we see $$ \lim_{x\to a}f(x)=\lim_{g(t)\to a}f(g(t)). $$ which is a generalized version of $(2)$.

  • $\begingroup$ Ok... is this always true? doesn't it depend on the functions involved? how can one prove this is true? $\endgroup$ – AK_ Dec 15 '14 at 21:14
  • $\begingroup$ Is what always true? (1) or (2)? Clearly the left-hand side and right-side of $(1)$ are equal because one is just a rewriting of the other. As for (2), so long as the change of variables is continuous (as $t=x-1$ is), then taking (correct) limits of both sides of (1) maintains the equality. $\endgroup$ – JohnD Dec 15 '14 at 21:22
  • 1
    $\begingroup$ @JohnD: I think it is the continuity of $f$ which is required and not $g$. Thus we have the result that if $\lim\limits_{t \to b}g(t) = a$ and $f$ is continuous at $a$ then $\lim\limits_{x \to a}f(x) = \lim\limits_{t \to b}f(g(t))$. $\endgroup$ – Paramanand Singh Dec 18 '14 at 7:16
  • 1
    $\begingroup$ @JohnD: You can see that just continuity of $g$ is not sufficient as shown in the counterexample in my comment to "mlg4080" answer. $\endgroup$ – Paramanand Singh Dec 18 '14 at 7:26
  • 1
    $\begingroup$ This answer does not address the problem at all. It just regurgitates the state of limbo in which the OP sees himself. $\endgroup$ – Christian Blatter Dec 18 '14 at 9:39

If a limit of a function exists, then you can define your function to be continuous there. And then if you make a continuous change of variable, you get that continuity preserves the limit, e.g. $\lim_{x \to 1}$ is the same as $\lim_{t \to 0}$.

  • $\begingroup$ won't the same hold even if the function is not continuous? limit arithmetic should still hold... $\endgroup$ – AK_ Dec 15 '14 at 21:06

The reason that a change of variables works, is two fold. As JohnD mentioned, it's partially by direct substitution. However, you also must take into account the fact that your change of variables is defined by a continuous function. Continuous functions are (in this setting) loosely speaking, the functions that play nicely with limits.

  • 1
    $\begingroup$ Please note continuity of change of variables is not sufficient. For example if $f(x) = \dfrac{(1 + x)^{2} - 1}{x}$ then $\lim_{x \to 0}f(x) = 2$ and if we put $x = g(t) = t\sin(1/t)$ then $x = g(t)$ is continuous and $\lim_{t \to 0}g(t) = 0$, but $\lim_{t \to 0}f(g(t))$ does not exist. $\endgroup$ – Paramanand Singh Dec 18 '14 at 7:24
  • $\begingroup$ @ParamanandSingh At first I was shocked, and a little concerned after reading your comment. However, the limit of $\lim_{t \rightarrow 0} f (g(t))$ does exist. Moreover, it also equals $2$. L'Hopital's is sufficient to prove this. $\endgroup$ – mlg4080 Dec 19 '14 at 20:04
  • 1
    $\begingroup$ Perhaps you should note that $g(t) = 0$ for an infinity of values of $t$ near $0$ (namely as $t = 1/n\pi$ with $n$ integer). If $g(t) = 0$ then it is obvious that $f(g(t))$ is not defined because of denominator vanishing. Hence $f(g(t))$ is not defined in a neighborhood of $t = 0$. Because of this reason the limit does not exist. $\endgroup$ – Paramanand Singh Dec 20 '14 at 5:15
  • 1
    $\begingroup$ You obtain an "indeterminate form" each time $t=0$. However, this does not mean that your limit cannot exist. In fact, because it is a removable singularity the limit still exists. $\endgroup$ – mlg4080 Dec 20 '14 at 20:14
  • 1
    $\begingroup$ You obtain an indeterminate form each time $t=1/n\pi$ and hence the function is not defined in any neighborhood of $t=0$. Note that the being defined in the neighborhood of point under consideration is the first prerequisite for talking about limit of a function at a given point. $\endgroup$ – Paramanand Singh Dec 21 '14 at 7:43

Not the answer you're looking for? Browse other questions tagged or ask your own question.