Suppose that $f$ is a bounded function on $[a, b]$ such that either $f^{+}=\operatorname{max}\{f, 0\}$ or $f^{-}=\operatorname{max}\{-f, 0\}$ (but not necessarily both) is in $R[a, b]$. Does it necessarily follow that $f$ is also in $R[a, b]$?!
It seems that if both of these functions were in $R[a, b]$, then due to the famous formula $f = f^{+} - f^{-}$, once can easily derive the Riemann integrability of function $f$. However, in case if exactly one of them becomes Riemann integrable, is it necessarily true that $f$ will be integrable as well?! Is there any sufficient counterexample, since this seems to be wrong intuitively.
No. Define $f:[0, 1] \to \mathbb{R}$ $$ f(x) = \begin{cases} -1 \text{ if } x \in \mathbb{Q}\cap[0,1]\\ 0 \text{ if } x \not \in \mathbb{Q}\cap[0,1] \end{cases} $$
Then $f^{+} = 0$ and
$$ f^{-} = \begin{cases} 1 \text{ if } x \in \mathbb{Q}\cap[0,1]\\ 0 \text{ if } x \not \in \mathbb{Q}\cap[0,1] \end{cases} $$
Therefore, $f^{+} \in \mathcal{R}[0,1], f^{-} \not \in \mathcal{R}[0,1]$ and $f \not \in \mathcal{R}[0,1]$.