Function $f$ such that $f(x+a) = \frac12 + \sqrt {f(x)-(f(x))^2}$ is periodic. 
Let $f$ be a real valued function defined for all real numbers $x$ such that for some positive constant $a$ the equation $f(x+a) = \frac12 + \sqrt {f(x)-(f(x))^2}$ holds for all $x$. Prove the function $f$ is periodic. 

I have tried by replacing $x$ several times but couldn't find the period.
 A: Note that $f(x)-f^2(x)\ge 0$ and thus $0\leq f(x)\leq 1$. Also $f(x)-\frac{1}{2}\ \ge 0$ which imply $\frac{1}{2}\le f(x)\le 1 $.
Now we compute $f(x+2a).$
$$f(x+2a)=\frac{1}{2}+\sqrt{f(x+a)-f^2(x+a)}\,.$$
$$f(x+a)-f^2(x+a)=f(x+a)-\frac{1}{4}-\sqrt{f(x)-f^2(x)}- f(x)+f^2(x)=$$
$$=f^2(x)-f(x)+\frac{1}{4}.$$
$$f(x+a)-f^2(x+a) =\left(\frac{1}{2}-f(x)\right)^2.$$ and then:
$$f(x+2a)=\frac{1}{2}+|\frac{1}{2}-f(x)|=$$
$$=\frac{1}{2}-\frac{1}{2}+f(x)$$ since $f(x)-\frac{1}{2}\ge 0.$
$$\text {Therefore }\;f(x+2a)=f(x).$$
A: Rewrite the starting equation like this:
$$\left(f(x+a)-\frac{1}{2}\right)^2=\color{red}{{1\over 4}-{1\over 4}}+{f(x)-f^2(x)}= {1\over 4}- \left(f(x)-{1\over 2}\right)^2$$
so we have also 
$$\left(f(x)-\frac{1}{2}\right)^2= {1\over 4}- \left(f(x-a)-{1\over 2}\right)^2$$
Combining both equations we get $$\left(f(x+a)-\frac{1}{2}\right)^2 = \left(f(x-a)-{1\over 2}\right)^2$$
and so $$\left|f(x+a)-\frac{1}{2}\right| = \left|f(x-a)-{1\over 2}\right|$$
But $f(x)\geq 1/2$ for all $x$ so we have $$f(x+a)-\frac{1}{2} = f(x-a)-{1\over 2}$$
which means that $f$ is periodic with period $2a$ and thus the limit doesn't exist unless $f$ is constant.
