# Let $f:\Bbb X\subset\Bbb R \to \Bbb R$ define continuous function. Prove that $f_-(x)$ and $f_+(x)$ are continuous

Let $$f(x)$$ define a continuous function on some interval $$\Bbb X$$. Prove that the following functions are continuous in $$\Bbb X$$: f_+(x) = \begin{cases} \begin{align} f(x),\ &f(x) > 0 \\ 0,\ &f(x) \le 0 \end{align} \end{cases} f_-(x) = \begin{cases} \begin{align} 0,\ &f(x) \ge 0 \\ f(x),\ &f(x) < 0 \end{align} \end{cases}

It looks like if we sum up both functions we eventually get $$f(x)$$ itself, so: $$f(x) = f_-(x) + f_+(x)$$

My main idea was to arrive at a contradicton. The function is either continuous or discontinuous so we have $$4$$ possible cases:

1. Both $$f_-(x)$$ and $$f_+(x)$$ are continuous
2. Both $$f_-(x)$$ and $$f_+(x)$$ are discontinuous
3. $$f_-(x)$$ is continuous and $$f_+(x)$$ is discontinuous
4. $$f_-(x)$$ is discontinuous and $$f_+(x)$$ is continuous

I've proven a while ago that if a function $$f$$ is continuous and $$g$$ is discontinuous at some point then $$f+g$$ is also discontinuous at that point. That means for cases $$3$$ and $$4$$: \begin{align*} f(x) = f_-(x) + f_+(x) \iff f(x) - f_-(x) = f_+(x)\tag 3\\ f(x) = f_-(x) + f_+(x) \iff f(x) - f_+(x) = f_-(x)\tag 4 \end{align*} So we have arrived at a contradiction by the sum of continuous function must be continuous. By this we're left with cases $$1$$ and $$2$$.

Unfortunately, I couldn't eliminate case $$2$$ because the sum of discontinuous functions may be either continuous or discontinuous.

Is it possible to apply similar reasoning to eliminate case $$2$$? If not how do I show what's asked in the problem statement?

• Can you use the fact that the composition of continuous functions is continuous? – eranreches Jun 17 '19 at 17:08
• @eranreches Yes, I've proven that recently – roman Jun 17 '19 at 17:09

Hint: Prove that $$g\left(x\right)=\max\left\{0,x\right\}$$ (and similarly $$\min$$) is continuous. This is much simpler. Now use composition.
Note that $$f_+(x)=\max\{0,f(x)\}=\frac12 (f(x)+|f(x)|),$$ which is continuous as a sum of continuous functions.