How can I calculate the following limit:
$$\lim \limits_{n \to \infty}(n-\sum_{k=1}^n\cos{\frac{\sqrt{k}}{n})}$$
A hint or direction would be appreciated (please not a solution for now, I would post mine once I get it).
I have tried to use 3rd order of taylor but I couldn't get through with the algebra.
Thank you
Note that using Taylor series to first term, you get
$$n-\sum_{k=1}^{n}\cos\frac{\sqrt{k}}{n}\approx\sum_{k=1}^{n} \frac{k}{2 n^2} = \frac{1}{2}\int_{0}^{1} xdx = \frac{1}{4}$$
Alternatively you can use $\sum_{k=1}^n k = \frac{n(n+1)}{2}$