Suppose that $f:\mathbb{R}\to \mathbb{R}$ satisfying that $f(x+y)+f(x-y)=2f(x)f(y)$ forall $x,y\in \mathbb{R}$ and there exists $x_0$ such that $f(x_0)=-1$. Prove that $f$ is a periodic function.
Here is what I did.
First, letting $x=y=0$, I have $f(0)=0$ or $f(0)=1$. If $f(0)=0$ then $f\equiv 0$, contradiction. Hence $f(0)=1$. Letting $y=0$, I have $f$ is an even function.
After that, letting $y=x_0$ implies that $f(x+x_0)+f(x)=-\big(f(x)+f(x-x_0)\big)$. It means that, if $g(x)=f(x)+f(x-x_0)$ then $g(x+2x_0)=g(x)$ and thus $g$ is a period function.
I have tried to calculate some special values. I have proved that $f(2^nx_0)=1,\forall n\in \mathbb{N}$
I'm stuck here. Can somebody help me?