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.

Which function ($f$) is continuous nowhere but $|f(x)|$ is continuous everywhere?

I found this question here, the question seems much interesting but for obvious reason it is closed there, I was wondering how to derive such a function?

share|improve this question
2  
you should either put $|x|\to |f|$ or take any discontinuous $f$ as an answer –  Ilya Oct 24 '11 at 15:58
    
You might want to work this out for yourself, so here is a hint: take a non-zero constant function for $|f(x)|$ (which is what I think you must mean, with $f$ mapping real line to real line). Then you need to think of a way of constructing $f(x)$ so that it is discontinuous - how could you make it discontinuous at a point? How could you use that on enough points to make it discontinuous everywhere? –  Mark Bennet Oct 24 '11 at 16:00

1 Answer 1

up vote 15 down vote accepted

You could take $$f(x)=\begin{cases}1&x\in \mathbb Q \\ -1&x\in\mathbb R\setminus\mathbb Q\end{cases}$$

share|improve this answer
    
Could you explain how? –  Quixotic Oct 24 '11 at 15:59
1  
I assume you meant that $x\mapsto|f(x)|$ should be continuous everywhere. That is true here because $|f(x)|=1$ for all $x$. Did you mean something else by "$|x|$ is continuous everywhere"? –  Henning Makholm Oct 24 '11 at 16:01
    
Also known as $f=2\cdot\chi_{\Bbb Q}-1,$ for those familiar with characteristic/indicator functions. –  Cameron Buie Dec 17 '13 at 0:56

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.