Let $[a,b]\subseteq \mathbb{R}$ and $\varphi:[a,b]\to\mathbb{C}$ be continuous such that $|\varphi(t)|\leq M$ for all $t \in [a,b]$ where $M>0$. We have to prove that if $\left| \displaystyle\int_a^b \varphi(t)\space dt \right| = M(b-a)$ then $\varphi(t)=c$, where $c\in\mathbb{C}$ such that $|c|=M$.
So far I have only got that if $\varphi$ is a constant function and let $\varphi (t)=c$ then:
$\left| \displaystyle\int_a^b \varphi(t)\space dt \right| = \left| \displaystyle\int_a^b c\space dt \right| = |c|\left| \displaystyle\int_a^b dt \right| = |c||b-a|=|c|(b-a)=M(b-a)$ which implies $|c|=M$.
However, I don't know how to prove that $\varphi$ is constant. I would thank you a lot if you could give me some hints on this. Please don't give me the full solution, just small hints.
Thanks!
First let's assume $\displaystyle\int_a^b \varphi(t)\space dt \ = M(b-a)$ where $|\phi(t)| \le M$.
Then $\Re \phi(t) \le M$ and by taking the real part in the integral above, we get $\displaystyle\int_a^b \Re\varphi(t)\space dt \ = M(b-a)$ hence $\displaystyle\int_a^b (M-\Re\varphi(t))\space dt \ = 0$. But the integrand is non-negative, hence it is zero a.e, hence by continuity it is zero everywhere, so $\Re \phi(t) =M$ and since $|\phi(t)| \le M$, it follows $\Im \phi(t)=0$ and $|\phi(t)|=\phi(t)=M$
In the general case we know that $\displaystyle\int_a^b \varphi(t)\space dt \ = e^{i\theta}M(b-a)$ for some argument $\theta$, hence $\displaystyle\int_a^b \psi(t)\space dt \ = M(b-a)$, where $\psi(t)=e^{-i\theta}\phi(t)$ satisfies the same hypotheis (continuity, modulus bound) as $\phi$ hence by the previous case $\psi(t)=M, \phi(t)=e^{i\theta}M$ and we are done!