A multiplicative functional equation I was trying to solve the following problem:

Find all functions $f:(0,\infty)\to\Bbb R$ satisfying 
  $$f(x)f(y)+f\left(\frac5x\right)f\left(\frac5y\right)=2f(xy)$$ for every $x,y\in(0,\infty)$  and $f(5)=1$.

It's easy to show that $f(1)=1$ (take $ x=y=1$). If we take $y=\frac5x$, we obtain $f(x)f(y)=f(xy)$ and $f(x)=f\left(\frac5x\right)$. Therefore $f(x)^2=1$ for every $x>0$.
Here is my problem: The solution should be $f(x)\equiv 1$ and I can't show that (I tried contradiction). 
Help!
 A: $f(x)=1$ is not the only function satisfying the given relation.
Define an auxiliary function $g(x)=f(5^x)$, then the given relation is
$$g(x)g(y)+g(1-x)g(1-y)=2g(x+y)$$
and the derived equations are
$$g(x)g(y)=g(x+y)\tag1$$
$$g(x)=g(1-x)$$
$$g(0)=g(1)=1\tag2$$
From the last two equations above we can get
$$g(x)=g(-x)\tag3$$
(corresponding to $f(x)=f(1/x)$). From equations $(1,2,3)$ we can derive the original relation and conditions, so we lose nothing by using only them.
It is clear that $g(x)=1$ for all integer $x$, but we can set $g(x)=-1$ for all non-integer $x$ and still satisfy all relations. In general, we can have for an arbitrary $n\in\Bbb N^+$:
$$g(x)=\begin{cases}1&x\in\frac1n\Bbb Z\\-1&\text{otherwise}\end{cases}$$
and the relations would still be satisfied. Because $\frac1n\Bbb Z$ (the set of numbers whose product with $n$ is an integer) is closed under addition and subtraction, $g(x)=1$ is only fixed for those $x$ that are members of that set, leaving us free to map non-members to 1. Of course, $g(x)=1$ for all $x$ is also a solution.
Translated back, $f(x)$ is either constant 1 (the given solution) or
$$\begin{cases}1&\log_5x\in\frac1n\Bbb Z\\-1&\text{otherwise}\end{cases}$$
where $n\in\Bbb N^+$.
