Give an example to show that convergence of $|x_n|$ does not imply the convergence of $x_n$ I'm taking $x_n=(-1)^n=(-1,1,-1,1,\cdots)$, which is divergent, 
but $|x_n|=(1,1,1,1,1,\cdots)$ converges to $1$. Is this example correct? 
 A: Yeah that one looks good. $x_n$ certainly diverges while $|x_n|$ obviously converges to 1.
A: Yes, your sequence is correct (and actually a very good choice).
More generally, you can use any two sequences $(a_n)$ and $(b_n)$ such that $\lim_{n\to\infty}a_n = -\lim_{n\to\infty}b_n\ne 0$ and interleave them, that is, generate the sequence
$$a_1, b_1, a_2, b_2, a_3, b_3, \ldots$$
Your example is then recovered by the choice of the constant sequences $a_n=-1$ and $b_n=1$.
Another way to combine them could be to use an infinite set $S$ of natural numbers whose complement is also infinite (for example, the set of primes, or the set of natural numbers with an odd digit count), and then use
$$c_n = \begin{cases}a_n & n\in S\\b_n & \text{otherwise}\end{cases}$$
Again, your example is a special case of this, with $a_n=-1$, $b_n=1$ and $S=2\mathbb N$ (the set of even natural numbers).
Note however that  this is just to give a more general picture; as specific counterexample, your sequence is definitely better than a general rule.
