Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I have a simple true/false question that I am not sure on how to prove it.

If $|f(x)|$ is continuous in $]a,b[$ then $f(x)$ is piecewise continuous in $]a,b[$

Anyone that can point me in the right direction or give a counterexample, even though I think it's true. Thanks in advance!

share|improve this question
    
Hint: What happens if $f$ only takes the values $1$ and $-1$? –  Tobias Kildetoft Jan 24 '13 at 19:50
    
@Tobias So you think the statement is false? I don't see the problem with a function defined like this: \begin{cases} 1 & x <0\\-1 & x \geq 0\end{cases} –  tim_a Jan 24 '13 at 19:58
    
What I mean is that if $f$ only takes those two values, then $|f|$ is automatically continuous. But there are nowhere continuous functions with just those two values. –  Tobias Kildetoft Jan 24 '13 at 20:02
    
Ok, I think I understand what you mean. But the statement is in the other direction. If you already know that $|f|$ is continuous, does this imply that $f$ is piecewise continuous in any case. –  tim_a Jan 24 '13 at 20:07
    
No, what I mentioned gives you a way to construct a counter example. –  Tobias Kildetoft Jan 24 '13 at 20:08
show 1 more comment

1 Answer

up vote 1 down vote accepted

Here is a counter example to the statement:

Define $f(x)$ to be $1$ if $x$ is rational and $-1$ if $x$ is irrational. Now $f$ is not continuous anywhere, but $|f|$ is identically $1$ and thus continuous.

share|improve this answer
    
Thank you for helping me! Do you know if there is a way of defining such a function with symbolic math software like Maple? –  tim_a Jan 24 '13 at 20:21
    
You were starting light for the OP. –  B. S. Jan 24 '13 at 20:31
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.