I don't know how to present this rigorously, but I can tell you from an intuitive perspective why this makes perfect sense. First of all, the first thing to notice is that the only values in question are those located on the unit circle. The entire integration is done on those points. As far as the rest of the complex plane is concerned, they could be 0 or undefined or whatever. So perhaps an easier way to think about this might be to think of it as a function
Make the substitution . Then your integral becomes:
Notice that the absolute value of the left part of the integrand is bounded by M, as stated in the problem. Furthermore, the right side of the integrand (the ) is on the unit circle, so according to the theorems about multiplying complex numbers, the absolute value of the entire integrand is bounded by M. And since the integral ranges from 0 to 2Pi, the only way the absolute value of the integral is 2*Pi*M is if the pieces, if you will, of the integral, cooperate perfectly - there can be no "destructive interference" based on different angles. Also, the absolute value needs to actually be M, and not any less, otherwise the integral loses the chance to be 2*Pi*M, which is only possible in perfect conditions.
The only way this is possible is if and only if the argument (angle) of the integrand, whatever it may be - is constant. Lets see our integrand: . Now recall, that the absolute value of the integrand also MUST be equal to M.
So we have two requirements: 1) the absolute value of the integrand is constant M, and 2) the argument of the integrand is a constant. If both the absolute value and the argument is constant, the entire integrand itself must be constant! Let's call this number c: it can be any complex number who's absolute value is M.
So we have this: (I dropped the [times i] for simplicity because it can be "absorbed" into c: it doesn't change the absolute value of c, which was the only restriction.)
Solving for the function f, we get
. Substiting back the z for yields
Now I know this post was wordy, but hopefully it leads you to the right track. You will probably have to formalize it a little bit. Tell me if there's anything that's too confusing in my post.