Continued fraction: Show $\sqrt{n^2+2n}=[n; \overline{1,2n}]$ I have to show the following identity ($n \in \mathbb{N}$):
$$\sqrt{n^2+2n}=[n; \overline{1,2n}]$$
I had a look about the procedure for $\sqrt{n}$ on Wiki, but I don't know how to transform it to $\sqrt{n^2-2n}$.
Any help is appreciated.
EDIT:
I tried the following:
$\sqrt{n^2+2n}>n$, so we get $\sqrt{n^2+2n}=n+\frac{n}{x}$, and $\sqrt{n^2+2n}-n=\frac{n}{x}$ and further $x=\frac{n}{\sqrt{n^2+2n}}$.
So we get $x=\frac{n}{\sqrt{n^2+2n}-n}=\frac{n(\sqrt{n^2+2n}+n)}{(\sqrt{n^2+2n}-n)(\sqrt{n^2+2n}+n}$ I don't know if it's right and how to go on.
 A: HINT $\rm\  x = [\overline{1,2n}]\ \Rightarrow\  x\ = \cfrac{1}{1+\cfrac{1}{2\:n+x}}\ \iff\ x^2 + 2\:n\ x - 2\:n = 0\ \iff\ x = -n \pm \sqrt{n^2 + 2\:n} $
A: The first few convergents of $[3;\overline{1,6}]$ are $3,4,\frac{27}7,\frac{31}8,\frac{213}{55}$, and $\frac{244}{63}$; $\frac{213}{55}=3.8\overline{72}$, and $\frac{244}{63}$ is a little over $3.873$, so $[3;\overline{1,6}]$ is clearly not $\sqrt{3^2-2\cdot3}=\sqrt3$.
In fact, $n^2-2n=(n-1)^2-1$, so the integer part and first convergent of $\sqrt{n^2-2n}$ will be $n-2$. But $\sqrt{n^2-2n}$ isn’t $[n-2;\overline{1,2n}]$, either, since, as you can see here, $\sqrt3=[1;\overline{1,2}]$.
$\sqrt8=[2;\overline{1,4}]$, so your identity should probably be $\sqrt{n^2-2n}=[n-2;\overline{1,2(n-2)}]$ for $n\ge 3$.
Now let $m=n-2$ and consider the continued fraction $x=[m;\overline{1,2m}]$.
$$\begin{align*}
x+m&=[2m;\overline{1,2m}]\\
&=2m+\frac1{1+\frac1{[2m;\overline{1,2m}]}}\\
&=2m+\frac1{1+\frac1{x+m}}\\
&=2m+\frac{x+m}{x+m+1}\\
&=\frac{(2m+1)x+2m^2+3m}{x+m+1}\;,
\end{align*}$$
and you can finish it off by solving for $x$ in terms of $m$ (and then in terms of $n$).
If the identity was supposed to have $\sqrt{n^2+2n}$ on the lefthand side, the same basic approach will work, though the details will obviously be different, and you won’t need $m$.
Added: I see that you have edited the problem statement to make the lefthand side $\sqrt{n^2+2n}$; I’ll leave my solution to the original version as an extended hint for the corrected version.
A: Because $n^2+2n=(n+1)^2-1$, the leading term in the continued fraction expansion will be $n$.  Multiplying by a form of $1$, we have
$$\sqrt{n^2+2n}-n=\frac{2n}{n+\sqrt{n^2+2n}}$$
 and $1<\frac{n+\sqrt{n^2+2n}}{2n}<2,$ so the next term will be $1$.  Since $\frac{n+\sqrt{n^2+2n}}{2n}-1=\frac{\sqrt{n^2+2n}-n}{2n}$ and we can again rationalize the denominator to simplify $\frac{2n}{\sqrt{n^2+2n}-n}=n+\sqrt{n^2+2n}$.  Because $n<\sqrt{n^2+2n}<n+1$, the next term in the continued fraction expansion is $2n$, and subtracting 2n yields $\sqrt{n^2+2n}-n$, at which point the pattern continues.
In the end, it all boils down to the useful trick that $\frac{1}{\sqrt{a}-\sqrt{b}}=\frac{\sqrt{a}+\sqrt{b}}{a-b}$, which can be viewed as a application of $a^2-b^2=(a+b)(a-b)$.  Judging from your edit, you are aware of this idea, but you just didn't carry out the necessary algebraic simplifications to see that it actually leads somewhere.
