We have f(x)=log2(1+tan(4πx)) and need to evaluate limn→∞n2(f(n1)+f(n2)+…+f(1)).
This expression is a Riemann sum. Writing n2∑k=1nf(nk)=2⋅n1∑k=1nf(nk), which converges to 2∫01f(x)dx as n→∞.
So we need I=2∫01log2(1+tan(4πx))dx.
Let u=4πx, so du=4πdx, and when x=0, u=0; when x=1, u=4π.
I=2⋅π4∫0π/4log2(1+tanu)du=π8∫0π/4log2(1+tanu)du.
We use the well-known result: ∫0π/4ln(1+tanu)du=8πln2. This follows from the substitution u→4π−u: 1+tan(4π−u)=1+1+tanu1−tanu=1+tanu2, so ∫0π/4ln(1+tanu)du=∫0π/4ln2du−∫0π/4ln(1+tanu)du, giving 2∫0π/4ln(1+tanu)du=4πln2.
Since log2(1+tanu)=ln2ln(1+tanu), we get ∫0π/4log2(1+tanu)du=ln21⋅8πln2=8π.
Therefore I=π8⋅8π=1.