The following proof is given in my notes:
Write the complex integral $\int_a^bf(t)dt = Re^{i\theta}$
where
$$
R=\int_a^bf(t)dt. \quad(1)
$$
On the other hand,
$$
R=\int_a^be^{-i\theta}f(t)dt.\quad(2)
$$
Write $e^{-i\theta}f(t)=U(t)+iV(t)$ where $U(t)$ and $V(t) $ are real-valued functions. Then because R is real,
$$ R=\int_z^bU(t)dt\quad(3) $$ But now, $$ U(t)= Re\ e^{-i\theta}f(t) \le e^{-i\theta}f(t)=\vert f(t)\vert\quad(4) $$ Therefore, from the properties of real integrals, $$ \int_a^bU(t)dt\le\int\vert f(t)\vert dt $$ which proves the desired result.
I have trouble figuring out how each of the numbered equations actually hold. After writing the integral as $\int_a^bf(t)dt = Re^{i\theta}$ How can we say that (1) and (2) hold. (3) sort of makes sense as R has to be real.