Find the limit of $(x_n)$ defined by $x_{n+1}=c_nu(x_n)$ Find $\displaystyle \lim_{n\rightarrow \infty }x_n$ :
$$\left\{\begin{matrix}x_1=a>0\\ \\ x_{n+1}=\frac{2x_n\cdot \cos\left(\frac{\pi}{2^n+1}\right)}{x_n+1}\end{matrix}\right.$$
I have tried that :
Let $a_n=\dfrac{1}{x_n}$ . So :
$$a_{n+1}=\frac{1}{2\cos\left(\frac{\pi}{2^{n+1}}\right)}.a_n+\frac{1}{2\cos\left(\frac{\pi}{2^{n+1}}\right)}$$
So I tried to have geometric series: 
By let :
$$a_{n+1}+f(n+1)=\frac{1}{2\cos\left(\frac{\pi}{2^{n+1}}\right)}(a_n+f(n))$$
So we must find one $f(n)$:
$$\frac{f(n)}{2\cos\left(\frac{\pi}{2^{n+1}}\right)}-f(n+1)=\frac{1}{2\cos\left(\frac{\pi}{2^{n+1}}\right)}$$
As $$f(n)-f(n+1)\cdot 2\cos\frac{\pi}{2^{n+1}}=1$$
Can you give me the way to find one $f(n)$ sastisfied that ; or anyone has nice way to solve this problem
 A: An incomplete answer that assumes the existence of the limit:
Since $\cos\frac{\pi}{2^n+1}$ goes to one for $n\to\infty$, the limit $x_\infty=\lim_{n\to\infty}x_n$ will, if it exists, satisfy the fixed-point equation $x_\infty=2x_\infty/(x_\infty+1)$. The only solutions of this equation are $0$ and $1$.
The derivative of $x\mapsto 2x\cos\frac{\pi}{2^n+1}/(x+1)$ at $x=0$ equals $2\cos\frac{\pi}{2^n+1}$ which is greater than one for $n>1$. Fixed-point theory then tells us that $x=0$ can not be the limit of your recursion. The derivative at $x=1$, in contrast, equals $1/2\cos\frac{\pi}{2^n+1}$ which is always positive and less than unity.
A: 
$$\lim\limits_{n\to\infty}x_n=1$$

To show this, note that: first, $x_n\gt0$ for every $n\geqslant1$; second, $x_n\leqslant x^0_n$ for every $n\geqslant1$, where $x^0_1=a$ and 
$$
x^0_{n+1}=\frac{2x^0_n}{x^0_n+1},
$$ 
for every $n\geqslant1$; third, $x^0_n\to1$ when $n\to\infty$. Thus, $\limsup\limits_{n\to\infty}x_n\leqslant1$.
On the other hand, $\cos\left(\frac\pi{2^n+1}\right)\to1$ when $n\to\infty$. For every positive $b\lt1$, choose some positive integer $n(b)$ such that $\cos\left(\frac\pi{2^n+1}\right)\geqslant b$ for every $n\geqslant n(b)$ and define $(x^b_n)_{n\geqslant n(b)}$ by $x^b_{n(b)}=x_{n(b)}$ and 
$$
x^b_{n+1}=\frac{2bx^b_n}{x^b_n+1},
$$ 
for every $n\geqslant n(b)$. Then, $x_n\geqslant x^b_n$ for every $n\geqslant n(b)$ and, provided $b\gt\frac12$, $x^b_n\to x^b=2b-1$ when $n\to\infty$. 
Hence $\liminf\limits_{n\to\infty}x_n\geqslant x^b$. Since $x^b\to1$ when $b\to1$, this proves the result.

The same method shows that every sequence $(x_n)_{n\geqslant1}$ defined by $x_1=a\gt0$ and 
$$
x_{n+1}=\frac{c_nx_n}{x_n+1},
$$ 
for every $n\geqslant1$, with $c_n\gt0$ for every $n\geqslant1$ and $\lim\limits_{n\to\infty}c_n=c$ with $c\geqslant1$, converges to $c-1$. If $0\leqslant c\leqslant1$, $\lim\limits_{n\to\infty}x_n=0$.
