Let $f:\mathbb{R}\to\mathbb{R^*}$ be a function such that $f(x+y)+f(x-y)=2f(x)f(y),\forall x,y\in\mathbb{R}$. Prove that $f(x)=1,\forall x\in\mathbb{R}$.
I have managed to prove the following:
1) $f(0)=1$
Set $x=y=0$ so: $f(0)=f^2(0)\Rightarrow f(0)=0\lor f(0)=1$. We cannot have $f(0)=0$, since $f:\mathbb{R}\to\mathbb{R^*}$, so $f(0)=1$.
2) $f(x)=f(-x),\forall x\in\mathbb{R}$
Set $x=0$ so: $f(y)+f(-y)=2f(y)\Rightarrow f(y)=f(-y)$
3) $f(x)=2f^2\left( \frac{x}{2}\right) -1$
Set $y=x$ so: $f(2x)+1=2f^2(x)\Rightarrow f(2x)=2f^2(x)-1$ and setting where x, $x/2$ we get: $f(x)=2f^2\left( \frac{x}{2}\right) -1\Rightarrow f(x)>-1$
I cannot move any further... Any hint?