Limits: How is it possible to change the way to write an equation and have different results? I still have a very brief experience with calculus and limits, so this might actually be a silly question with a very simple answer. 
Imagine you are trying to find the limit of $f(x)$ when $x$ approaches 1, being 
$f(x) = \frac{\sqrt x-1}{x-1}$
Replacing $x$ by 1 right away makes this $\frac{0}{0}$. 
If you say that the denominator $x-1$ is equal to $(\sqrt x+1)(\sqrt x-1)$, and continue the equation,
$\lim \limits_{x \to 1} = \frac{\sqrt x-1}{(\sqrt x+1)(\sqrt x-1)} \to \lim \limits_{x \to 1} = \frac{1}{\sqrt x+1} \to \lim \limits_{x \to 1} = \frac{1}{2}$
you get $\frac{1}{2}$, which is, according to my answer sheet, indeed the limit of $f(x)$ as $x$ approaches 1. 
What I don't understand though, is how did I get different results($\frac{0}{0}$ and $\frac{1}{2}$) just by changing the way to write the equation, not just in this case, but in almost any basic limit example question i've encountered. It is clear that changing the denominator to another expression that means exactly the same drastically change the final result, but how is this possible? 
 A: The limit of a function does not depend on the function at the point where you are taking the limit. So, asking $\lim\limits_{x \to 1} f(x)$ does not ask the value of $f(1)$ (in fact, in your case, $f(1)$ is undefined), but rather it asks if there is some value $y$ such that as $x$ gets arbitrarily close to $1$ (without hitting $1$), do the values of $f(x)$ get arbitrarily close to this value $y$. Now, as you agreed $x-1 = (\sqrt{x}+1)(\sqrt{x}-1)$ and hence, for $x \neq 1$,
$$
\frac{\sqrt{x}-1}{x-1} = \frac{1}{\sqrt{x}+1}.
$$
Therefore, since $f(x) = \frac{1}{\sqrt{x}+1}$ for all values $x \neq 1$, you can use this expression to evaluate $\lim\limits_{x \to 1} f(x)$. 
As another quick example, consider the function
$$
g(x) = \begin{cases}
0 & x \neq 1\\
1 & x =1
\end{cases}
$$
Here $g(1) = 1$, but $\lim\limits_{x \to 1} g(x) = 0$. Why? Because for all values of $x \neq 1$, we have $g(x) = 0$.
A: You pinned the principle of continuity: a function is continuous on $x_0$ if and only if $f(x_0) = \displaystyle\lim_{x \to x_0}f(x)$.
What does it mean? Well, for continuous functions $f$, the closer $x$ gets to $x_0$, the closer $f(x)$ gets to $f(x_0)$. Roughly speaking, a continuous function is a function you can draw without lifting the pen. Whereas, if $f$ is not continuous on $x_0$, then you don't have this property (you'll have to lift the pen to draw $f$ on $x_0$).
In your post, you get $\frac00$ when you try to compute $f(0)$, and $\frac 12$ when you compute $\displaystyle \lim_{x\to 0}f(x)$. These results are not contradictory, since they refer to different concepts.
In your case, $f$ is not continuous on $0$ --well, it's not even defined on $0$--, so both results are different.
A: As an addendum to Tom's answer, the reason why we can use the value of the function $\frac{1}{\sqrt{x}+1}$ at $x=1$ to find the limit is because the function, as a composition of continuous functions, is continuous itself. Thus, its value at a point must be equal to its limit there. Infact, this is how continuity is defined.
