I've encountered the following problem in a set of course notes on complex analysis, but I can't seem to solve it:
Prove that if f is a continuous real-valued function with $|f(z)| \leq 1$, then $\left|\int_{|z| = 1} f(z)\,dz\right| \leq 4$.
This is my work so far:
\begin{align*} \left|\int_{|z| = 1} f(z) \,dz \right| &= \left|\int_0^{2\pi}f\left(e^{i\theta}\right)ie^{i\theta}\,d\theta\right| \\ &= \left|\int_0^{2\pi}f\left(e^{i\theta}\right)\cos\theta\,d\theta + i\int_0^{2\pi}f\left(e^{i\theta}\right)\sin\theta\,d\theta\right| \end{align*}
I initially tried to use the triangle inequality at this point and then bound the real integrals, but this gives me an upper bound of $4\pi$. Using the estimation lemma on the initial integral gives me an upper bound of $2\pi$. I can't manage to get it any tighter.
The emphasis on real-valued makes it seem that this is a key point. Any ideas?