$|f(x)-f(y)|\le C |g(x)-g(y)|$ and integrability of $g$ implies that of $f$ Let $S\subset \mathbb R^n$ be a closed rectangle and $f,g: S\to \mathbb R$ functions such that $$|f(x)-f(y)|\le C |g(x)-g(y)|$$ for all $x,y\in S$. Show that if $g$ is Riemann integrable, then so if $f$, and if $f$ is, then so if $|f|$.
There is an integrability criterion which I don't know how to connect with the given inequality. If $P$ is a partition, then $U(f,P)-L(f,P) < \epsilon $. Or should I use something different?

Let $P$ be a partition of $S$ such that $(U(g,P) - L(g,P)<\epsilon/C$. On each subrectangle of partition $s$, $\sup_s f-\inf_s f=f(x_s)-f(y_s)$ (the sup and inf are attained because $f$ is continuous on the compact $s$). For each $s$, $|f(x_s)-f(y_s)|\le C |g(x_s)-g(y_s)| \le C (\sup_s g-\inf_s g)$. Thus $$U(f,P)-L(f,P)=\sum_s (\sup_s f-\inf_s f)\operatorname{vol}(s)\le C \sum_s(\sup_s g-\inf_s g)\operatorname{vol}(s)=C (U(g,P) - L(g,P)) < \epsilon$$
 A: As @Sangchul Lee suggests, let's prove the inequality $U(f,P)-L(f,P)\leq C(U(g,P)-L(g,P))$ for any partition $P$.
Fix $\varepsilon > 0$. Let $s$ be a subrectangle of $S$. There exist $x_s, y_s \in s$ such that $f(x_s) > \sup_s f - \frac{\varepsilon}2$ and $f(y_s) < \inf_s f + \frac{\varepsilon}2$. Note that you cannot assume that $f$ and $g$ are continuous here.
Then we have
\begin{align}
\sup_s f - \inf_s f &< \left(f(x_s) + \frac{\varepsilon}2\right) - \left(f(y_s) - \frac{\varepsilon}2\right)\\
&= f(x_s) - f(y_s) + \varepsilon\\
&\le \left|f(x_s) - f(y_s)\right| + \varepsilon\\
&\le C\left|g(x_s) - g(y_s)\right| + \varepsilon\\
&\le C(\sup_s g - \inf_s g) + \varepsilon\\
\end{align} 
Since $\varepsilon$ was arbitrary, we conclude $\sup_s f - \inf_s f \le C(\sup_s g - \inf_s g)$.
$$U(f,P)-L(f,P)=\sum_s (\sup_s f-\inf_s f)\operatorname{vol}(s)\le C \sum_s(\sup_s g-\inf_s g)\operatorname{vol}(s)=C (U(g,P) - L(g,P))$$
Now for every $\varepsilon > 0$, let $P$ be a partition of $S$ such that $U(g,P) - L(g,P)< \frac{\varepsilon}{C}$ so
$$U(f,P)-L(f,P)\leq C(U(g,P)-L(g,P)) < \varepsilon$$
For the second question, we can use the reverse triangle inequality:
$$\left|\left|f(x)\right| - \left|f(y)\right|\right| \le \left|f(x) - f(y)\right|, \quad\forall x,y \in S$$
Hence if $f$ is integrable, so is $\left|f\right|$ using the first statement for $C = 1$.
