I was reading Rudin and I stumbled upon a proof that I do not seem to understand. It is on page 325 of Baby Rudin $3^{rd}$ edition.
In case you do not have a copy I shall write some background information:
Suppose $\mu$ is a measure on $X$, and $f$ is a complex measurable function on $X$. Then, $$\int |f|\;d\mu < +\infty$$ and we define $$\int f \;d\mu = \int u \; d\mu + i\int v \; d\mu$$.
Now onto, my question. He wants to prove the following $$ \left| \int f \; d\mu \right| \leq \int |f| \; d\mu. $$
He begins as follows:
If $f \in \mathscr{L}(\mu)$, there is a complex number $c$, $|c| =1$, such that $$ c\int f \; d\mu \geq 0 $$
Put $g = cf = u +iv$ where $u$ and $v$ are real.Then
$$ \left| \int f \; d\mu \right| = c\int f \;d\mu = \int g \;d\mu = \int u \;d\mu \leq \int |f| \; d\mu.$$
The thing that bothers me is the following equality $$\int g \;d\mu = \int u\;d\mu .$$
How are these two functions equal? If we had assumed that $g = u +iv$, so should not g be $$\int g \;d\mu = \int u \; d\mu + i\int v \; d\mu?$$.