functions satisfying $f(x - y) = f(x) f(y) - f(a - x) f(a + y)$ and $f(0)=1$ A real valued function $f$ satisfies the functional equation
$$f(x - y) = f(x) f(y) - f(a - x) f(a + y) \tag 1 \label 1$$
Where $a$ is a given constant and $f(0) = 1$. Prove that $f(2a - x) = -f(x)$, and find all functions which satisfy the given functional equation.
My Try:
Put $x=y=0$ in equation \eqref{1}.
$\implies f(0)=f(0)^2-f(a)\cdot f(a)\implies f(a)^2=0\implies f(a)=0$.
Now Put $x=a$ and $y=x-a$.
$\implies f(2a-x)=f(a)\cdot f(x-a)-f(0)\cdot f(x) = -f(x)$.
My question is how can I find all function which satisfy the given functional equation.
Help me.
Thanks.
 A: Partial progress:
Let $P(x,y)$ be the property that $f(x-y) = f(x)f(y)-f(a-x)f(a+y)$. 
Then, $P(0,0)$ gives $f(0) = f(0)f(0)-f(a)f(a)$ which yields $f(a) = 0$. 
Also, $P(a,x)$ gives $f(a-x) = f(a)f(x)-f(0)f(a+x)$ which yields $f(a-x)=-f(a+x)$. 
Then, $P(x,x)$ gives $f(0) = f(x)f(x)-f(a-x)f(a+x)$ which yields $f(x)^2 + f(x+a)^2 = 1$ (*).
Using (*), we have $f(x)^2+f(x+a)^2 = 1$ and $f(x+a)^2+f(x+2a)^2 = 1$ for all $x \in \mathbb{R}$.
Hence, $f(x+2a) = \pm f(x)$ for all $x \in \mathbb{R}$. Therefore, $f(x+4a) = f(x)$ for all $x \in \mathbb{R}$.
It's pretty clear that $f(x) = \cos\dfrac{\pi x}{2a}$ is a solution. Now, can we show that there aren't any more?
A: It seems that if $a \ne 0$, then $f(x) = \cos\frac{\pi }{2a}x$, and if $a = 0$, there is no solution!
Sketch of proof: The case $a=0$ is obvious. So let that $a\ne0$. With a change of variable the equation can be change to
$$
f(x+y) = f(x)f(y)-f(\pi/2-x)f(\pi/2-y).
$$
Let $g(x)=f(x)+i f(\pi/2 -x)$. Then one can easily see that $g(x+y)=g(x)g(y)$. From this and $g(0)=1 $ one can see that $g(x) = e^x$ and the rest is straightforward.
