I know this might be a duplicate, but I just wanted to see if my proof is correct.
I want to prove that if $f,g: [a,b]\rightarrow \mathbb{R}$ is bounded and Riemann integrable then $\max\{f,g\}$ and $\min\{f,g\}$ will also be Riemann integrable on $[a,b]$.
In order to show this, I've decided to prove that if $f$ is RI, then $|f|$ is RI. And then by arithmetic of limits, $$\max(f,g)(x) = \frac{f(x)+g(x) + |f(x)-g(x)|}{2}$$ and $$\min(f,g)(x) = \frac{f(x)+g(x) - |f(x)-g(x)|}{2}$$ will also be RI. My proof is as follows:
Since $f,g$ are RI on $[a,b]$, then by arithmetic of limits we know that $f+g$ is RI on $[a,b]$ and similarly $f-g$ is RI on $[a,b]$** (do I need to prove this or can this be safely assumed from the fact that $f-g = f+(-g)$?. And so, all there is left to show is that if $f$ is RI, then $|f|$ is RI.
By triangle inequality, we have that:
$\begin{align}\sup_{x \in [x_{j-1},x_j]}|f|(x) - \inf_{x \in [x_{j-1},x_j]}|f|(x) \\&=\sup_{x,y \in [x_{j-1},x_j]}| |f(x)|-|f(y)|| \\ &\leqslant \sup_{x,y \in [x_{j-1},x_j]}| f(x)-f(y)| \\ & \leq \sup_{x \in [x_{j-1},x_j]}f(x) - \inf_{x \in [x_{j-1},x_j]}f(x).\end{align}$
And thus, there exists a partition $P$ such that:
$U(P,|f|) - L(P,|f|) = \sum_{j=1}^n \left(\sup_{x \in [x_{j-1},x_j]}|f|(x) - \inf_{x \in [x_{j-1},x_j]}|f|(x)\right)(x_j - x_{j-1})\\ \leqslant \sum_{j=1}^n \left(\sup_{x \in [x_{j-1},x_j]}f(x) - \inf_{x \in [x_{j-1},x_j]}f(x)\right)(x_j - x_{j-1})\\= U(P,f) - L(P,f)$
Since $f$ is RI, we have that:
$U(P, |f|) - L(P, |f|) \leqslant U(P,f)-L(P,f) < \epsilon.$
Therefore, by the arithmetic of RI functions and the fact that if $f$ is RI then $|f|$ is RI, we have that $\max\{f,g\}$ and $\min\{f,g\}$ are RI.
Is this a sufficient proof? Or am I oversimplifying things/do I have to do a direct $\epsilon$ proof?