# Absolute Values and Continuous Functions

1. Jul 24, 2007

### Rosey24

1. The problem statement, all variables and given/known data

We recently proved that if a function, f, is continuous, it's absolute value |f| is also continuous. I know, intuitively, that the reverse is not true, but I'm unable to come up with an example showing that, |f| is continuous, b f is not. Any examples or suggestions would be appreciated. Thanks!

2. Relevant equations

3. The attempt at a solution

2. Jul 24, 2007

### CompuChip

What about $f(x) = -1$ if $x < 0$ and 1 if $x \ge 0$?
Then $|f(x)| = 1$ for all x - about as continuous as you get them, but f is not. In fact, you could even do something pathetic like make f equal -1 on all rationals and 1 on all irrational numbers :)