Let $z _1=|z _1 |e^{i \alpha _1 } , ... , z _N=|z _N |e^{i \alpha _N } $ be complex numbers.
Write $\sum _{k=1} ^N |z _k |\cos ^+(\alpha _k - \theta )$, where $\cos ^+ $ is defined to equal 0 if $\cos(\alpha _k - \theta )<0$ .
Chose $\theta $ as to maximize the sum.
Now Rudin states that "this sum is at least as large as the average of the sum over $[- \pi , \pi ]$ , and this average is $\pi ^{-1 } \sum |z _k |$, because
$$\frac {1 } {2 \pi } \int _{- \pi } ^{\pi } \cos ^+ ( \alpha - \theta ) d \theta = \frac {1 } {\pi } $$
What is meant with the sum over $[- \pi , \pi ]$ as this is an uncountable set?
Also, how do I evaluate the integral with $\cos ^+$?, is it correct that the integral is equal to $\int _{\pi /2 } ^{\pi /2 } \cos (x ) d x $ for any $\alpha $, as the function is zero outside this interval?
Thanks in advance!