Given a function $f:\mathbb{R}\rightarrow\mathbb{R}$ such that $$f(x+y)+f(x-y)=2f(x)f(y)$$ for all real $x$ and $y$. Find all possible functions $f(x)$.
The optimal solutions are $f(x)=0$, $f(x)=1$, $f(x)=\cos x$, but I can't fully solve the question.
Some things that I have proved:
- $f(x)$ is even
- $f(x)$ is periodic
- Let $T>0$ be the least number such that $f(x+T)=f(x)$, then we have $f(T)=1$, $f(T/2)=-1$, $f(T/4)=0$
- There exists some $r$ such that $f(r)=0$
I may want to assume $z(x)=f(x)+ig(x)$ where $z:\mathbb{R}\rightarrow\mathbb{C}$ and $g:\mathbb{R}\rightarrow\mathbb{R}$. Then we may have $z(x+y)=z(x)z(y)$.