# How to calculate this limit $\lim\limits_{n\to\infty}\left(\sum\limits_{i=1}^{n}\frac{1}{\sqrt{i}} - 2\sqrt{n}\right)$

Calculate below limit $$\lim_{n\to\infty}\left(\sum_{i=1}^{n}\frac{1}{\sqrt{i}} - 2\sqrt{n}\right)$$

-
I think you can now accept an answer. You have been given a great solution by Dane. – Pedro Tamaroff Feb 26 '12 at 17:19
This limit was evaluated at this MSE link. – Marko Riedel Feb 15 '14 at 0:33

As a consequence of Euler's Summation Formula, for $s > 0$, $s \neq 1$ we have $$\sum_{j =1}^n \frac{1}{j^s} = \frac{n^{1-s}}{1-s} + \zeta(s) + O(|n^{-s}|),$$ where $\zeta$ is the Riemann zeta function. In your situation, $s=1/2$, so $$\sum_{j =1}^n \frac{1}{\sqrt{j}} = 2\sqrt{n} + \zeta(1/2) + O(n^{-1/2}) ,$$ and we have the limit $$\lim_{n\to \infty} \left( \sum_{j =1}^n \frac{1}{\sqrt{j}} - 2\sqrt{n} \right) = \lim_{n\to \infty} \big( \zeta(1/2) + O(n^{-1/2}) \big) = \zeta(1/2).$$

-
Little problem with your argument : $\zeta(1/2)$ is either infinite (if you don't consider the extension of $\zeta$ to the complex plane without the pole) or finite (if you consider it). But the finite sum where $\zeta$ appears is only consistent if $\zeta(1/2)$ is finite, and your result in the end only works if $\zeta(1/2)$ is infinite (see JavaMan's answer below). So there's a bit of inconsistency somewhere in this answer. And I think there's a typo in your first line : you should replace $1/n^s$ by $1/i^s$. – Patrick Da Silva Feb 15 '12 at 16:50
@PatrickDaSilva: no, Dane's first formula holds even though the series on the left doesn't converge as $n\to\infty$. (In fact, the first term on the right-hand side indicates exactly how the series diverges.) Check chapter 1 of Montgomery-Vaughan's book or other books on analytic number theory - or do the partial summation argument yourself. – Greg Martin Feb 15 '12 at 16:54
@Greg : So letting $n=1$ you're saying that $1/1 = 1^{1/2}/(1-1/2) + \zeta(1/2) + O(1^{-1/2})$ makes sense? This is saying that $1 = \infty + O(1)$ ; I certainly don't agree with that. – Patrick Da Silva Feb 15 '12 at 16:57
@Greg: Damn, I am so wrong. I computed things too quick and forgot to subtract $2 \sqrt n$ while following JavaMan's hint. I said nothing. – Patrick Da Silva Feb 15 '12 at 17:03
@PatrickDaSilva: when you say that $\zeta(1/2)=\infty$, you're mistaken. $\zeta(1/2)$ is a well-defined number that comes from the analytic continuation of $\zeta$; the divergence of the series $\sum j^{-1/2}$ is irrelevant. – Greg Martin Feb 15 '12 at 17:03

The following is an elementary consideration, which shows how to compute the limit in terms of an infinite series. It's evaluation requires usage of Euler's summation formula, already covered by Dane.

Consider the following transformation $$\sum_{k=1}^n \frac{1}{\sqrt{k}} = \sum_{k=1}^n \left(\frac{1}{\sqrt{k}} - \frac{2}{\sqrt{k} + \sqrt{k+1}} \right) + \sum_{k=1}^n \frac{2}{\sqrt{k} + \sqrt{k+1}}$$ Then use $\sqrt{k+1}-\sqrt{k} = \frac{\left(\sqrt{k+1}-\sqrt{k}\right)\left(\sqrt{k+1}+\sqrt{k}\right)}{\sqrt{k+1}+\sqrt{k}} = \frac{(k+1)-k}{\sqrt{k+1}+\sqrt{k}} = \frac{1}{\sqrt{k+1}+\sqrt{k}}$: $$\sum_{k=1}^n \frac{1}{\sqrt{k}} = \sum_{k=1}^n \frac{1}{\sqrt{k} \left( \sqrt{k} + \sqrt{k+1} \right)^2} + 2 \sum_{k=1}^n \left( \sqrt{k+1}-\sqrt{k} \right)$$ The latter sum telescopes: $$\sum_{k=1}^n \left( \sqrt{k+1}-\sqrt{k} \right) = \left( \sqrt{2}-\sqrt{1} \right) + \left( \sqrt{3}-\sqrt{2} \right) + \cdots + \left( \sqrt{n+1}-\sqrt{n} \right) = \sqrt{n+1}-1$$ From here: $$\begin{eqnarray} \left(\sum_{k=1}^n \frac{1}{\sqrt{k}} \right)- 2 \sqrt{n} &=& \sum_{k=1}^n \frac{1}{\sqrt{k} \left( \sqrt{k} + \sqrt{k+1} \right)^2} + 2 \left( \sqrt{n+1}-\sqrt{n}-1\right) \\ &=& \sum_{k=1}^n \frac{1}{\sqrt{k} \left( \sqrt{k} + \sqrt{k+1} \right)^2} + 2 \left( \frac{1}{\sqrt{n+1}+\sqrt{n}}-1\right) \end{eqnarray}$$ In the limit: $$\lim_{n\to \infty} \left(\sum_{k=1}^n \frac{1}{\sqrt{k}} \right)- 2 \sqrt{n} = -2 + \sum_{k=1}^\infty \frac{1}{\sqrt{k} \left( \sqrt{k} + \sqrt{k+1} \right)^2}$$

-