Question: I understand the main principles of Cauchy sequences and metric spaces, but I have a particular question about determining whether or not a space is a complete space. *If a space has all cauchy sequences converge to a point contained within that space, then it is a complete space.* 

My question is: **How do you determine if there is a cauchy sequence that doesn't converge?**

I realize this is a rather vague question, so let me clarify a bit using an example, and you can just provide an answer to this particular example. For the space containing all real numbers $\mathbb R^1$, if our space is defined as the interval $(0,1)$ then it is not a complete space since there is a Cauchy sequence $x\_n = \frac{1}{n}$ for which the limit converges to $0$, which is not contained in the space.

* How did they come up with this sequence $x\_n = \frac{1}{n}$? Is it just from experience working in the field of complete spaces and you start recognizing things like this? Or is there a more formal way to find it?
* For that sequence, if $n \le 1 $ then $x\_n$ is not in the given space. Do we need to specify that $n \gt 1$ when defining the sequence?

Thanks! If you can answer those two bullet points I think I'd understand this a bit more thoroughly =).

Answer: 
> 
> How did they come up with this sequence $x\_n = 1/n$?
> 
> 
> 

In my experience, coming up with counterexamples is something of an art, and sometimes much more difficult than proving a theorem! As you seem to agree, when proving theorems and solving problems, there is often some vague direction as to where you need to go; however, with these counterexamples, there does not usually seem like there is a well-defined route!

But this does not mean that counterexamples come out of nowhere. Instead, counterexamples tend to arise when you begin understanding the the object at hand a lot more. A complete space, for example, is an object in which sequences that clump together must eventually arrive at some destination. But in the set $(0, 1)$, no matter how close you get to the end points, you cannot get to the endpoint! So there is no way that $(0,1)$ can be a complete space. Formalizing this into the language of sequences gives us the sequence $x\_n = 1/n$.

In short, the key is to *really* understand what you are dealing with. Also, when looking for counterexamples to certain theorems, you might want to examine the assumptions used in the proof, and exploit those weak spots when thinking up a counterexample.

> 
> For that sequence, if $n \leq 1$, then $x\_n$ is not in the given space.
> 
> 
> 

When talking about sequences, we usually only consider $n \geq 1$---in particular, the positive integers---as indices. So unless otherwise stated, you can assume that $n \in \mathbb{Z}^+$. Formally, sequences are usually defined as functions $\mathbf{x}: \mathbb{Z}^+ \to X$, where $X$ is some space. For convenience, however, we often write $\mathbf{x}(n) = x\_n$, and denote the set of all $\mathbf{x}(n)$ by $\{x\_n\}\_{n=1}^\infty$, or something alike.
This is more of a sharpening of what other answers have already said, but here goes:

Theorem: Let $(X,d)$ be a metric space, and let $Y \subset X$. If $(Y,d)$ is complete, then $Y$ is closed in $X$.

Proof: If not, then there is $x \in X \setminus Y$ and a sequence $\{y\_n\}$ in $Y$ with $y\_n \rightarrow x$. Since $\{y\_n\}$ is convergent in $X$, it is Cauchy in $X$, hence it is Cauchy in $Y$. Since limits in metric spaces are unique if they exist, $\{y\_n\}$ is not convergent in $Y$.

This provides a nice approach to the present example, since $(0,1)$ is naturally given as a non-closed subset of the (complete) metric space $\mathbb{R}$. Note also that $(0,1)$ is *homeomorphic* to $\mathbb{R}$, but this is not good enough: here it is really the "extrinsic" rather than the "intrinsic" topology that matters.

If we add an additional hypothesis on $X$, we can get a better result:

Theorem: If $(X,d)$ is a **complete metric space** and $Y \subset X$, then $(Y,d)$ is complete if and only if $Y$ is closed in $X$.

Proof: Even without the completeness hypothesis on $X$ we saw that it is necessary for $Y$ to be closed. Conversely, if it is then every Cauchy sequence in $Y$ is convergent in the complete space $X$, and since $Y$ is closed, the limit is an element of $Y$. So $Y$ is complete.

[Corollary: Any compact metric space is complete.

Sneaky proof: Let $X$ be compact, and embed it in its completion $\tilde{X}$. Then $X$ is a compact subset of the Hausdorff space $\tilde{X}$, so it is closed. Apply the theorem.]

Here is the moral, I think: if you are trying to decide whether a metric space is complete, embed it in a complete metric space and see whether the image is closed. In theory this always succeeds since any metric space embeds in its completion. In practice, the last sentence is a tautology but nevertheless the strategy seems to work in many cases.