Value of $\frac{\sqrt{10+\sqrt{1}}+\sqrt{10+\sqrt{2}}+\cdots+\sqrt{10+\sqrt{99}} }{\sqrt{10-\sqrt{1}}+\sqrt{10-\sqrt{2}}+\cdots+\sqrt{10-\sqrt{99}}}$

Here is the question:

$$\frac{\sqrt{10+\sqrt{1}}+\sqrt{10+\sqrt{2}}+\cdots+\sqrt{10+\sqrt{99}} }{\sqrt{10-\sqrt{1}}+\sqrt{10-\sqrt{2}}+\cdots+\sqrt{10-\sqrt{99}}} = \;?$$

(original image)

I think we need to simplify it writing it in summation sign as you can see here:

$$\frac{\sum\limits_{n=1}^{99} \sqrt{10 + \sqrt{n}}}{\sum\limits_{n=1}^{99} \sqrt{10 - \sqrt{n}}}$$

or in Wolfram Alpha input in comments.

I can compute it too! It's easy to write a script for this kind of question. I need a way to solve it. How would you solve it on a piece of paper?


Hint: Show that for all relevant $n$ $$ \frac{\sqrt{10+\sqrt{100-n}}+\sqrt{10+\sqrt{n}}}{\sqrt{10-\sqrt{100-n}}+ \sqrt{10-\sqrt{n}}}=\sqrt2 +1. $$ IOW pair up terms in the numerator and the denominator starting from both ends.


[Edit:]

Claim. Assume that $a,b,c$, all positive, are the lengths of the sides of a right angled triangle - a Pythagorean triple if you like - $c$ is the hypotenuse. Then $$ \frac{\sqrt{c+a}+\sqrt{c+b}}{\sqrt{c-a}+\sqrt{c-b}}=1+\sqrt2. $$

Proof. The left hand side of the claim is clearly immune to scaling. We can adjust the scale so that $c-b=2$. Then a calculation (familiar to enthusiasts of Pythagorean triples) shows that for some positive real number $m$ we have $$c=m^2+1,\quad b=m^2-1,\quad a=2m.$$ (IOW instead of the usual integer parametrization in terms of $(m,n)$ we set $n=1$, and let $m$ be arbitrary.) We then see that the numerator is $m+1+\sqrt2 m=m(1+\sqrt2)+1$, and the denominator is $m-1+\sqrt2$. Because $(\sqrt2+1)^{-1}=\sqrt2-1$ the claim follows. Q.E.D.

Leaving it to the reader to derive the identity of my hint as a corollary of the claim.


For the Calculation of $$\displaystyle \frac{\sum_{k=1}^{n^2-1}\sqrt{n+\sqrt{k}}}{\sum_{k=1}^{n^2-1}\sqrt{n-\sqrt{k}}} = $$

Let $$\displaystyle A_{n} = \sum_{k=1}^{n^2-1}\sqrt{n+\sqrt{k}}$$ and $$\displaystyle B_{n} = \sum_{k=1}^{n^2-1}\sqrt{n-\sqrt{k}}$$ , where $n>1$

Now $$\left(\sqrt{n+\sqrt{k}}-\sqrt{n-\sqrt{k}}\right)^2 = 2n-2\sqrt{n^2-k}$$

So $$\left(\sqrt{n+\sqrt{k}}-\sqrt{n-\sqrt{k}}\right) = \sqrt{2}\cdot \sqrt{n-\sqrt{n^2-k}}$$

So $$\displaystyle \sum_{k=1}^{n^2-1}\left(\sqrt{n+\sqrt{k}}-\sqrt{n-\sqrt{k}}\right) = \sum_{k=1}^{n^2-1}\sqrt{2}\cdot \sqrt{n-\sqrt{n^2-k}}$$

So So $$\displaystyle \sum_{k=1}^{n^2-1}\left(\sqrt{n+\sqrt{k}}-\sqrt{n-\sqrt{k}}\right) = \sum_{k=1}^{n^2-1}\sqrt{2}\cdot \sqrt{n-\sqrt{k}}$$

So $$A_{n}-B_{n} = B_{n}\sqrt{2}$$

So $$A_{n} = B_{n}\left(1+\sqrt{2}\right)$$

So $$\displaystyle \frac{A_{n}}{B_{n}} = 1+\sqrt{2}$$

Now Put $\displaystyle n^2-1 = 99\Rightarrow n= 10\;,$ So we get $$\displaystyle \frac{\sum_{k=1}^{99}\sqrt{n+\sqrt{k}}}{\sum_{k=1}^{99}\sqrt{n-\sqrt{k}}} =\frac{A_{10}}{B_{10}} = 1+\sqrt{2}.$$


The hint $$ \frac{ \sqrt{1+\sin(x)}+\sqrt{1+\cos(x)} }{ \sqrt{1-\sin(x)}+\sqrt{1-\cos(x)} }=1+\sqrt2 \quad \text{for } x\in [0,\pi/2] $$ is spot on.

We have $$ \begin{align} \sqrt{10+\sqrt{1}}+\sqrt{10+\sqrt{99}} &= \sqrt{10}\left(\sqrt{1+\sqrt{0.01}}+\sqrt{1+\sqrt{0.99}}\right) \\&= \sqrt{10}\left(\sqrt{1+\sin(t)}+\sqrt{1+\cos(t)}\right) \\&= \sqrt{10}(1+\sqrt 2)\left(\sqrt{1-\sin(t)}+\sqrt{1-\cos(t)}\right) \\&= \sqrt{10}(1+\sqrt 2)\left(\sqrt{1-\sqrt{0.01}}+\sqrt{1-\sqrt{0.99}}\right) \\&= (1+\sqrt 2)\left(\sqrt{10-\sqrt{1}}+\sqrt{10-\sqrt{99}}\right) \end{align} $$ for some $t$. Therefore, we can rearrange the numerator to be $1+\sqrt 2$ times the denominator. (You need to handle the middle terms separately but it works out the same.)


Let $f(n)=\frac{\sum_{k=1}^{n} \sqrt{\sqrt{n+1}+\sqrt{k}}}{\sum_{k=1}^{n} \sqrt{\sqrt{n+1}-\sqrt{k}}}$, and the original problem is to calculate $f(99)$.

Now we claim that $f(n)=\sqrt{2}+1$ for $\forall n>0$.

$f(n)=\frac{\sqrt{\sqrt{2}+1}}{\sqrt{\sqrt{2}-1}} \cdot \frac{\sum_{k=1}^{n} \sqrt{(\sqrt{n+1}+\sqrt{k})(\sqrt{2}-1)}}{\sum_{k=1}^{n} \sqrt{(\sqrt{n+1}-\sqrt{k})(\sqrt{2}+1)}}$

$=(\sqrt{2}+1) \cdot \frac{\sum_{k=1}^{n} \sqrt{A(k)+B(k)}}{\sum_{k=1}^{n} \sqrt{A(k)-B(k)}}$, where $A(k)=\sqrt{2(n+1)}-\sqrt{k}$, $B(k)=\sqrt{2k}-\sqrt{n+1}$.

Notice that:

$\left(\sqrt{A(k)+B(k)}-\sqrt{A(k)-B(k)}\right)^2=2A(k)-2\sqrt{A(k)^2-B(k)^2}\\=2\left(\sqrt{2(n+1)}-\sqrt{k}-\sqrt{n+1-k}\right)$

That means

$\left(\sqrt{A(n+1-k)+B(n+1-k)}-\sqrt{A(n+1-k)-B(n+1-k)}\right)^2\\=2\left(\sqrt{2(n+1)}-\sqrt{n+1-k}-\sqrt{k}\right)$

So that

$\sqrt{A(k)+B(k)}-\sqrt{A(k)-B(k)}\\=\sqrt{A(n+1-k)-B(n+1-k)}-\sqrt{A(n+1-k)+B(n+1-k)}$

So that

$\sum_{k=1}^{n} \sqrt{A(k)+B(k)}=\sum_{k=1}^{n} \sqrt{A(k)-B(k)}$

So that $f(n)=\boxed{\sqrt{2}+1}$