Horrible limit envolving floor function Let $x\in [0,1]$, $\ell\in\mathbb{Z}$ and $\tau>0$. I want to calculate
$$\lim_{L\to\infty}\sum_{k=0}^{\lfloor \tau L^2\rfloor}\frac{1}{2^{\lfloor \tau L^2\rfloor}}\binom{\lfloor \tau L^2\rfloor}{k}\cos\left(2\pi \ell\frac{\lfloor xL\rfloor-\lfloor \tau L^2\rfloor+2k}{L}\right).$$
I think the result is $\exp(-2\pi^2\ell^2\tau)\cos(2\pi\ell x)$ but I have no idea in how to prove it.
I tried estimating the binomial with Stirling's aproximation but without success.
 A: You are correct. We have that
$$\begin{aligned}
& \sum_{k=0}^{\lfloor \tau L^2\rfloor}\frac{1}{2^{\lfloor \tau L^2\rfloor}}\binom{\lfloor \tau L^2\rfloor}{k}\cos\left(2\pi \ell\frac{\lfloor xL\rfloor-\lfloor \tau L^2\rfloor+2k}{L}\right) \\
= &\sum_{k=0}^{\lfloor \tau L^2\rfloor}\frac{1}{2^{\lfloor \tau L^2\rfloor}}\binom{\lfloor \tau L^2\rfloor}{k}\Re\left(\exp(i2\pi\ell \frac{\lfloor xL\rfloor-\lfloor \tau L^2\rfloor+2k}{L})\right) \\
=& \frac{1}{2^{\lfloor \tau L^2\rfloor}}\Re\left(\sum_{k=0}^{\lfloor \tau L^2\rfloor}\binom{\lfloor \tau L^2\rfloor}{k}\exp(i2\pi\ell \frac{\lfloor xL\rfloor-\lfloor \tau L^2\rfloor+2k}{L})\right) \\
=& \frac{1}{2^{\lfloor \tau L^2\rfloor}}\Re\left(\exp\left(i2\pi\ell\frac{\lfloor xL\rfloor -\lfloor\tau L^2\rfloor}{L}\right)\left(1+\exp\left(i\frac{4\pi\ell}{L}\right)\right)^{\lfloor \tau L^2\rfloor}\right).
\end{aligned}$$
Since we are taking the limit as $L\to\infty$ we have that
$$\frac{\lfloor xL\rfloor -\lfloor\tau L^2\rfloor}{L}\to x-\tau L$$
so we can consider the expression
$$\frac{1}{2^{\lfloor \tau L^2\rfloor}}\Re\left(\exp\left(i2\pi\ell(x-\tau L)\right)\left(1+\exp\left(i\frac{4\pi\ell}{L}\right)\right)^{\lfloor \tau L^2\rfloor}\right).$$
Again since we only care about $L\to\infty$ we can let $L\mapsto L/\sqrt{\tau}$ so that we are considering the expression
$$\begin{aligned}
&\frac{1}{2^{L^2}}\Re\left(\exp\left(i2\pi\ell(x-\sqrt{\tau} L)\right)\left(1+\exp\left(i\frac{4\pi\ell\sqrt{\tau}}{L}\right)\right)^{L^2}\right) \\
=&\Re\left(\exp(i2\pi\ell x)\left(\frac{\exp\left(-i\frac{2\pi\ell\sqrt{\tau}}{L}\right)+\exp\left(i\frac{2\pi\ell\sqrt{\tau}}{L}\right)}{2}\right)^{L^2}\right) \\
=&\cos\left(\frac{2\pi\ell\sqrt{\tau}}{L}\right)^{L^2}\Re\left(\exp(i2\pi\ell x)\right) \\
=& \cos\left(\frac{2\pi\ell\sqrt{\tau}}{L}\right)^{L^2}\cos(2\pi\ell x).
\end{aligned}$$
Taking the limit we indeed get
$$\lim_{L\to\infty} \cos\left(\frac{2\pi\ell\sqrt{\tau}}{L}\right)^{L^2}\cos(2\pi\ell x)=\exp(-2\pi^2\ell^2\tau)\cos(2\pi\ell x).$$
