Let S be the sum of all the real coefficients of the expansion of \({(1+ix)}^{2009}\). What is \(\log_{2}(S)\)?
\(\text{The sum of all the real coefficients is simply the real part of }\\ \left . (1+ix)^{2009} \right |_{x=1}\)
\((1+i)^{2009} = \sqrt{2}^{2009}e^{i 2009 \left(\frac \pi 4\right)} = \sqrt{2}^{2009}\left(\cos\left(\dfrac \pi 4\right)+i \sin\left(\dfrac \pi 4 \right)\right)\)
\(Re\left[(1+i)^{2009}\right] = \sqrt{2}^{2009} \cdot \dfrac{\sqrt{2}}{2} = 2^{1004}\\ \log_2\left(2^{1004}\right) = 1004\)
.