Finding a limit using change of variable- how come it works? 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?
 A: 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)$.
A: 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.
A: 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}$.
A: 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.
