I'm reading Rudin's proof of theorem 6.13,
$$\left|\int_a^b f\ d\alpha \right| \le \int_a^b |f| \ d\alpha$$
and realizing there's a step I can't seem to understand. We let $c=\pm 1$ such that
$$\left|\int f \right| = c\int f = \int c f \leq \int |f|$$
The last step is justified by $cf\leq |f|$. But it seems to me that it could be possible that both $c = 1$ and also $f(x) < 0$ for some values of $x$. I assume we must be saying here that, at every $x\in[a,b]$ we have $cf(x) \leq |f(x)|$, but this doesn't seem true. I'm sure I'm misinterpretting or misunderstanding something, but can't find what it is. Because if we're saying that $cf(x)\leq |f(x)|$ holds for all $x$ then that seems false. And if we say that it holds for some $x$ then it seems like we can't infer $\int cf \leq \int |f|$.
My thought about how to approach this problem would have been to break $f$ into regions where it is positive and negative, and integrate on each region. However, that would assume $f$ is piece-wise continuous, and we'd like a more general result. So it seems to me that this style of proof would be inadequate.
The number $c$ is either $1$ or $-1$, and therefore $cf(x)$ is either $f(x)$ or $-f(x)$. And both $f(x)$ and $-f(x)$ are smaller than or equal to $|f(x)|$. So, yes, $(\forall x\in[a,b]):cf(x)\leqslant|f(x)|$. And it follows from this that, indeed$$\int_a^bcf(x)\,\mathrm dx\leqslant\int_a^b|f(x)|\,\mathrm dx.$$