How to solve $\displaystyle x=\sqrt{4+\sqrt{4-\sqrt{4+\sqrt{4-x}}}}$ for $x$? How to solve $\displaystyle x=\sqrt{4+\sqrt{4-\sqrt{4+\sqrt{4-x}}}}$ for $x$?
I tried this way:
Let
$$f(x)=\sqrt{4+\sqrt{4-x}}$$
So,  $x=f^2(x)=f^{2n}(x)$ where $n\in\mathbb{N}$. Then, I tried to prove that $f^k(x)=f^{k+1}(x)$ for any $k\in\mathbb{N}$, but I cannot find any easy way to prove this. If I succeed to prove this, I can write
$$x=\sqrt{4+\sqrt{4-x}}$$
because for $k=0$ I have $f^0(x)=f^1(x)$, but then it will be hard to solve $x=\sqrt{4+\sqrt{4-x}}$.
My question is: how to prove that $f^k(x)=f^{k+1}(x)$ and how to solve $x=\sqrt{4+\sqrt{4-x}}$? If you have any easier method, post your solution.
 A: $\displaystyle x=\sqrt{4+\sqrt{4-\sqrt{4+\sqrt{4-x}}}}$, the replace $x$ at RHS by the same equaility, we get
$$x=\sqrt{4+\sqrt{4-\sqrt{4+\sqrt{4-\sqrt{4+\sqrt{4-\sqrt{4+\sqrt{4-x}}}}}}}}$$.
Continue in this way then we know that $x$ is equal to the limit(provided it exists) of $$\sqrt{4+\sqrt{4-\sqrt{4+\sqrt{4-\sqrt{4+\sqrt{4-\sqrt{4+\sqrt{4-\cdots}}}}}}}}$$.
To compute the limit, say $l$, we have $l = \sqrt{4+\sqrt{4-l}}$, which is not hard to solve.
As for existence of the limit, remark that if $a_1(x) = \sqrt{4+\sqrt{4-x}}$ and $a_{n+1}(x) = a_n(a_1(x))$, then $|a_n(x)-a_n(y)| \leq |a_n(4) - a_n(0)|$(since $a_n(x)$ is either increasing or decreasing), which tends to $0$ by repeating using $\sqrt{x}-\sqrt{y} =\frac{x-y}{\sqrt{x}+\sqrt{y}}$. So $a_n(x)$ is Cauchy(since $a_{n+k}(x)= a_n(y)$ for some $y$) and the limit exists
A: First asume that we have a solution $x_0$ to 
$$f(f(x)) = x$$
then, as $f(y)\geq 2 \ \ \forall y \in (-\infty,4]$, we have $x_0\geq 2$,
so we can restrict to $[2,4]$.Also, if $x \in [2,4]$,
$$ 4-x\leq 2$$
$$ \sqrt{4-x}\leq \sqrt{2}$$
$$ 4 + \sqrt{4-x}\leq 4 + \sqrt{2}$$
$$ \sqrt{4 + \sqrt{4-x}}\leq\sqrt{ 4 + \sqrt{2}}=:\alpha<4$$
so $x_0\in [2,\alpha]$ and even more the function 
$$f:[2,\alpha]\rightarrow [2,\alpha]$$
is well defined. so if a solution to $f(f(x)) = x$ exists, it have to be in $[2,\alpha]$.
Now we have that 
$$f'(x) = \frac{-1}{2\sqrt{4 + \sqrt{4-x}}\sqrt{4-x}}$$
$$|f'(x)| \leq \frac{1}{2\sqrt{4 + \sqrt{4-\alpha}}\sqrt{4-\alpha}}$$
and you can verify that
 $$\frac{1}{2\sqrt{4 + \sqrt{4-\alpha}}\sqrt{4-\alpha}}\approx 0.168 <1$$
So $f$ is a strict contraction and so it is $f^2$.By Banach fixed point theorem 
$f^2$ have one and only one fixed point $x_0$ in $[2,\alpha]$
$$f(f(x_0)) = x_0$$
$$f(f(f(x_0))) = f(x_0)$$
if we call $x_1 = f(x_0)$
$$f(f(x_1)) = x_1$$
so $x_1$ is also a fixed point of $f^2$ hence , $x_0 = x_1 = f(x_0)$ ($f^2$ have only one fixed point).
To summarise: the equation $f(f(x)) = x$ have only one solution and is also a solution to $f(x) = x$.
