0

I was playing around with python and I observed this:

for i in range(0, 100):
   if i > 0:
      print((i ** 0.5) - ((i -1) ** 0.5))
1.0
0.41421356237309515
0.31783724519578205
0.2679491924311228
0.2360679774997898
0.21342176528338808
0.19626156828141283
0.18267581368159957
0.1715728752538097
...
0.1162582564213892
0.11323701145890563
0.0519877143675167
0.05170895383970375
0.051434629976304436
0.05116462632374841
0.0508988306633924
0.050637134815561424
0.05037943445453408

Why does this happen?

Vaguely remembering from calculus, this might be the derivative of an iterative function?

Caveat: I'm not substantially proficient in math, so if this common place knowledge, then I apologize in advance for asking such question!

Thank you.

  • 1
    $\displaystyle,\sqrt{,n,}, - ,\sqrt{,n - 1,}, = {1 \over ,\sqrt{,n,}, + ,\sqrt{,n - 1,}}, \sim {1 \over 2,\sqrt{,n,},}$ as $\displaystyle n \to \infty$. – Felix Marin May 07 '18 at 02:16
  • 1
    Another intuition is that because the square root grows slower and slower. That means the difference between each becomes smaller and smaller because it is growing slower and slower in that interval. This comes from the fact that the square (x^2) grows larger and larger and thus inversely, the square root grows slower and slower. – Andrew Li May 07 '18 at 03:10
  • Thank you for the answers! – Manuel Martinez May 08 '18 at 02:45

5 Answers5

4

Note that $$( \sqrt {n+1}- \sqrt {n}) = \frac {1}{\sqrt {n+1}+ \sqrt {n}}$$

The fraction on the right is a decreasing function as you noticed with your data.

3

$$ \sqrt{n+1} - \sqrt n = \frac{1}{\sqrt{n+1} + \sqrt n} $$

Will Jagy
  • 139,541
2

Well, you could think of it as a calculus thing, but that's just postponing the problem - you could say "it's because the derivative of $\sqrt{x}$ is decreasing", but then you have to explain why the derivative of $\sqrt{x}$ is decreasing! Here's a better reason, using only basic algebra: it's because the space between square numbers is increasing.

The difference between $n^2$ and $(n + 1)^2$ is $(n + 1)^2 - n^2 = n^2 + 2n + 1 - n^2 = 2n + 1$. When $n$ gets bigger, so does this difference. So the square numbers are getting more and more "spread out" as they get bigger.

Now, when $k$ is between $n^2$ and $(n + 1)^2$, that means $\sqrt{k}$ has to be between $n$ and $n + 1$. As we consider larger and larger numbers, more and more numbers appear between $n^2$ and $(n + 1)^2$, so more and more numbers have to have their square roots crammed in between $n$ and $n + 1$. For example, between $1^2$ and $2^2$ there are only two numbers ($2$ and $3$) so the square roots of $2$ and $3$ are pretty evenly spread out between $1$ and $2$. But between $100^2$ and $101^2$ there are more than $200$ numbers, so their square roots have to get really packed in.

1

The number $\sqrt n$ is the size a square has to be so that its area is $n$. The difference $\sqrt{n+1}-\sqrt n$ is by how much you need to increase the sides so that the area increases by $1$.

Lengthening the sides by some fixed value $x$ will result in a larger increase in area as the sides get bigger. Hence the required lengthening to increase the area by $1$ is less and less as the sides get bigger.

An increase by L impacts the area in a way that depends on how big the area already is: enter image description here

1

Since you already received good answers, let me add a little for your curiosity.

$$\Delta_n=\sqrt{n}-\sqrt{n-1}=\sqrt{n}\left(1-\sqrt{1-\frac{1}{n}} \right)$$ Now, using the binomial theorem ot Taylor series, for small values of $\epsilon$ $$\sqrt{1-\epsilon}=1-\frac{\epsilon }{2}-\frac{\epsilon ^2}{8}-\frac{\epsilon ^3}{16}+O\left(\epsilon ^4\right)$$ Make now $\epsilon=\frac 1n$ $$\Delta_n=\sqrt{n}\left(\frac{1}{2 n}+\frac{1}{8 n^2}+\frac{1}{16 n^3}+O\left(\frac{1}{n^4}\right)\right)=\frac 1 {2 n^{1/2}}+\frac 1 {8 n^{3/2}}+\frac 1 {16 n^{5/2}}+\cdots$$

Using $n=100$, the above expansion would give $\Delta_{100}=\frac{80201}{1600000}\approx 0.050125625$ while your exact calculations would give $\Delta_{100}=10-3 \sqrt{11}\approx 0.050125629$.