I saw this proof in the textbook and wonder what might have motivated it?
Set $\theta = \arg \int^b_a f(t) \,dt$ then $$\left|\int^b_a f(t) \,dt\right|=e^{-i\theta}\int^b_a f(t) \,dt = \Re e^{-i\theta}\int^b_a f(t) \,dt=\int^b_a\Re e^{-i\theta}f(t)\,dt \leq\int_a^b|f(t)|\,dt$$
It makes sense but how does one come up with this?