Proving a function is continuous but unbounded Problem:
Hi, I'm working on the following math problem:

Suppose a set $S$ contains a sequence that converges to a point
  $x_{0}$ that is not in $S$. Show that the function $f : S
 \rightarrow \mathbb{R}$ defined by $f(x) = 1/|x - x_{0}|$ for all $x$
  in $S$ is continuous but unbounded.

Here is the definition of continuity that I am referring to. Note, however, that I am not using the typical $\epsilon-\delta$ definition of continuity:

Definition: A function $f : D \rightarrow \mathbb{R}$ is said to be continuous at the point $x_{0}$ in $D$  provided that whenever
  $\{x_{n}\}$ is a sequence in $D$ that converges to $x_{0}$, the image
  sequence $\{f(x_{n})\}$ converges to $f(x_{0})$.


My attempt:
Let $\{x_{n}\}$ be a sequence in $S$ that converges to the point $x_{0}$, which is not in $S$. By the definition of convergence provided, this means $\forall \epsilon > 0, \exists N$ s.t. 
$$|x_{n} - x_{0}| < \epsilon$$
$\forall n \geq N$. To prove continuity at $x_{0}$, I must show that there is some index $N'$ so that $\forall \epsilon > 0$, 
$$|f(x_{n}) - f(x_{0}) | < \epsilon$$
$\forall \epsilon > 0$. By our definition of $f$, I can write
$$|f(x_{n}) - f(x_{0}) | = |1/(x - x_{0}) - 1/(x_{0} - x_{0})|,$$
but the right-hand term is not defined, so I'm not sure if my approach is correct.

Some additional info:
In case it helps, this problem is part of a two-part problem. The first part of this problem asked me to show that if $S$ contains an unbounded sequence, then show that the function $f : S \rightarrow \mathbb{R}$ defined by $f(x) = x$ for all $x$ in $S$ is continuous but unbounded. So, I can cite this fact if I want. I'm guessing that I'll have to since it's part of the same problem, but I'm not sure where that'll come into play.
Thank you to anyone who tries to help.
 A: Your approach is not correct because $x_0\notin D$. So, it makes no sense to ask whethr $f$ is continuous at $x_0$. The function $f$ is continuous because, for instance:


*

*the function $x$ is continuous;

*so, $x-x_0$ is continuous;

*since the absolute value function is continuous, $\lvert x-x_0\rvert$ is continuous;

*therefore, $\dfrac1{\lvert x-x_0\rvert}$ is continuous.


And $f$ is unbounded because, if $(x_n)_{n\in\mathbb N}$ is such that $\lim_{n\to\infty}x_n=x_0$, then $\lim_{n\to\infty}f(x_n)=+\infty$.
A: The problem asks to show continuity for all $x \in S$ and $x_0\not\in S$!
So if $x_n\to x$ then we have to prove that for all $\epsilon>0$,  eventually
$$|f(x_{n}) - f(x) | = \left|\frac{1}{|x_n - x_{0}|} - \frac{1}{|x - x_{0}|}\right|<\epsilon.$$ 
As regards the second part, show that there is a sequence $x_n\to x_0$ in $S$ such that , for all $M>0$,  eventually
$$|f(x_{n})| = \frac{1}{|x_n - x_{0}|}>M.$$ 
P.S. Note that
$$\left|\frac{1}{|x_n - x_{0}|} - \frac{1}{|x - x_{0}|}\right|=\frac{||x - x_{0}|-|(x_n-x)+(x - x_{0})||}{|x - x_{0}|\cdot|x_n - x_{0}|}\\
\leq \frac{|x_n - x|}{|x - x_{0}|\cdot ||x - x_{0}|-|x_n - x||}$$
because, by triangle inequality, $||a|-|b||\leq |a-b|$. Finally, given $\epsilon>0$, consider $|x-x_n|<\epsilon'$, with 
$$\epsilon'=\frac{1}{2}\min(|x-x_0|,\epsilon|x-x_0|^2).$$
