Closed form of $x_{n+1} =\frac{1}{2}\left(x_n-\frac{1}{x_n}\right)$ with $x_0 \neq 0,1$

Consider $$x_{n+1} =\frac{1}{2}\left(x_n-\frac{1}{x_n}\right)$$

I am seeking for the closed form of $x_n$ for $x_0 \not\in \{0,1\}$?

My task is try to find its closed expression. My first guess was to look at some trigonometric expressions.


Notice that $$\frac{x_{n+1}-i}{x_{n+1}+i}=\frac{x_n-2i-\dfrac1{x_n}}{x_n+2i-\dfrac1{x_n}}=\frac{x_n^2-2ix_n-1}{x_n^2+2ix_n-1}=\left(\frac{x_n-i}{x_n+i}\right)^2.$$

By induction,

$$\frac{x_{n}-i}{x_{n}+i}=\left(\frac{x_0-i}{x_0+i}\right)^{2^n},$$ from which you can draw $x_n$ as a function of $x_0$.


Note that $$ \cot 2\theta=\frac{1}{2}(\cot\theta-\tan\theta)=\frac{1}{2}\left(\cot\theta-\frac{1}{\cot\theta}\right) $$

If you set $x_0=\cot\theta$, then $x_1=\cot 2\theta$, $x_2=\cot 4\theta$ and so on. Obviuosly, $$ x_{n}=\cot(2^n \theta) $$