[Math] Show that $f(x) = |x|$ is continuous on $\mathbb R$

continuityproof-verificationreal-analysis

I want to use the sequential criterion to prove that $f(x) = |x|$ is continuous on $\mathbb R$.

For reference, here is the sequential criterion according to Introduction to Real Analysis by Bartle:

$f:A \rightarrow \mathbb R$ is continuous at the point $c\in A$ if and only if for every sequence $(x_n)$ that converges to $c$, the sequence $(f(x_n))$ converges to $f(c)$.

So my attempt was this:
Let $x \in \mathbb R$ and define the sequence $(x_n) = x + \frac{1}{n}$ for $n \in \mathbb N$ so $(x_n)$ converges to $x$. Then $(f(x_n)) = |x_n| = |x + \frac{1}{n}|$ so $(f(x_n))$ converges to $|x|$. Since this is true for all $x \in \mathbb R$, therefore $f(x) = |x|$ is continuous on $\mathbb R$.

My main source of doubt comes from that it seems you can show a lot of functions are continuous simply by slapping on a "$+\frac{1}{n}$".
Is this proof valid? Or is there a constraint that I am not meeting?

Best Answer

You're right to doubt that! The sequential criterion you want to apply requires convergence for "every sequence". That's an important word. It's not enough to prove convergence for a sequence of your own choice. You have to prove it for an arbitrary sequence, which might not have any intelligible formula at all. The only thing you can assume about $(x_n)$ is that it converges to $c$. You don't know how fast it converges, or whether it's monotonic, etc.

Also, in this part of your argument:

Then $(f(x_n)) = |x_n| = |x + \frac{1}{n}|$ so $(f(x_n))$ converges to $|x|$.

That "so" is not justified. It would be justified if we already knew that the absolute value is continuous, but you can't assume that; you're trying to prove it!

You can take Opal E's advice on how to start the proof. And by the way, it may be helpful to consider the cases $c>0,c=0,c<0$ separately.