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:
- Both $f_-(x)$ and $f_+(x)$ are continuous
- Both $f_-(x)$ and $f_+(x)$ are discontinuous
- $f_-(x)$ is continuous and $f_+(x)$ is discontinuous
- $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?
Hint: Prove that $g\left(x\right)=\max\left\{0,x\right\}$ (and similarly $\min$) is continuous. This is much simpler. Now use composition.