I am trying to calculate a sum of square roots $\sum\limits_{i=1}^n \sqrt{a + i}$ and after some struggling and googling I gave up on this. Is there any way to get a closed formula for this sum (actually even approximation with epsilon $10^{-4}$ would suffice)
-
2What is your range for $n$ and $a$? – DanielV Nov 29 '14 at 10:47
-
@DanielV a is pretty small from 0 to 10. N is pretty big (10^8 and bigger), otherwise I would be able to calculate it with a program in a few seconds. – Salvador Dali Nov 29 '14 at 12:19
-
I updated my answer and added a picture to help explain (and fixed an error). Let me know if this helps. Btw, any computer made after 1995 should be able to calculate a sum for that range in less than 5 seconds. – DanielV Nov 29 '14 at 16:14
2 Answers
It depends on how large $n$ is. You could approximate it by:

The green area is the sum exactly. The red line is the graph of $\sqrt{x + a}$. The Blue line is the graph of $\sqrt{x + a + 1}$ (both for a = 0 for simplicity of graphing). By comparing the areas, you can see:
$$\underbrace{\int_{i=0}^{n} \sqrt{a+i} ~d i}_\text{Lower Bound} < \sum_{i=1}^n \sqrt{a + i} < \underbrace{\int_{i=0}^n \sqrt{a + i + 1} ~d i}_\text{Upper Bound}$$ So: $$\text{Lower Bound} = L = \frac {(2n + 2a)\sqrt{a + n} - (2a)\sqrt{a}}{3} $$ $$\text{Upper Bound} = U = \frac {(2n + 2a + 2)\sqrt{a + n + 1} - (2a + 2)\sqrt{a + 1}}{3}$$ $$\sum_{i=1}^n \sqrt{a + i} \approx \text{Average} = \frac{U + L}2$$
For example, with $N=10^8$ and $A = 10$, it gives:
Lower: 666666766645.587
Average: 666666771646.6416
Actual: 666666771647.26367
Upper: 666666776647.696
With $1 - \frac{\text{Average}}{\text{Actual}} = 9.3 \times 10^{-13}$
The larger your numbers, the more accurate the approximation will be, since the difference $\sqrt{a + i} - \sqrt{a + i - 1}$ is decreasing.
- 23,556
For each square root you could use the Taylor expansion of $\sqrt{1+x}$: $$\sqrt{1+x}=1+\frac{1}{2}x-\frac{1}{8}x^2+\ldots$$ But this only works if $x<1$, which would for example be the case if $n<a$.
- 1,262