Show that there exists $\phi :X\to \mathbb{R}$ which is continuous and not bounded. Let $X$ be a metric space and $(a_n)$ a Cauchy sequence in $X.$
Let $f(x) = \lim_{n\to \infty}d(a_n,x)$ (the limit exists since $d(a_n,x)$ is a Cauchy sequence and hence convergent). I have shown that $f$ is continous. Now suppose that $X$ is not complete, then we want to show that there exists $\phi :X\to \mathbb{R}$ which is continuous and not bounded. 
I am guessing that $\phi = f,$ but I am not able to argue why $f$ is not bounded. Any ideas will be much appreciated. 
 A: First things first: you assume that $X$ is not complete, so you know there exists a Cauchy sequence $(a_{n})$ in $X$ with no limit in $X.$ So you should fix such a sequence, and use that in your definition of $f. $
Now, your function $f$ might be bounded, namely if the metric space $X$ is bounded (for example, take $X$ to be the rational numbers between $0$ and $1;$ then $f$ is bounded below by $0$ and bounded above by $1$).
So now the question becomes: can you use $f$ to define a different function $\phi\colon X\to\mathbb{R}$ which is unbounded, but which is also continuous?
Hint:

 Due to your choice of $(a_{n}),$ you know that $f$ never takes the value $0.$ Use this to your advantage.

A: Do you know that metric space completions exist? If so, then consider $\tilde{X}$, the metric space completion of $X$, and the metric $\tilde{d}$ on $\tilde{X}$ which coincides with $d$ on elements of $X$. Since $X$ was not complete, there exists a point $\tilde{x} \in \tilde{X}$ which is not in $X$, and a Cauchy sequence $(a_n)$ of elements of $X$ which converges to $\tilde{x}$. Then the function $f(x) = \lim_{n \to \infty} \tilde{d}(a_n, x)$ is continuous, as you have shown. It should also take on non-zero values for any $x \in X$ (why?). I think the restriction of $1/f$ to $X$ will be your desired function.
