How prove $g(x)$ is odd function :$g(x)=-g(-x)$ QUestion:

let $f(x),g(x)$ is continuous on $R$,and such
  $$f(x-y)=f(x)f(y)-g(x)g(y)$$
  and $f(0)=1$
show that: for any $x\in R$, have $g(x)=-g(-x)$

my try: let $x=y=0$,then
$$f(0)-[f(0)]^2=g(0)g(0)\Longrightarrow g(0)=0$$
and let $x=0$, note $f(0)=1,g(0)=0$,so
$$f(-y)=f(y)$$
since
$$g(x)g(y)=f(x)f(y)-f(x-y)$$
so
$$g(-x)g(y)=f(-x)f(y)-f(-x-y)=f(x)f(y)-f(x+y)$$
since
$$f(x+y)=f(x)f(-y)-g(x)g(-y)\Longrightarrow g(x)g(-y)=f(x)f(y)-f(x+y)$$
so
$$g(-x)g(y)=g(x)g(-y)$$
But I can't have $g(x)=-g(-x)$
 A: Since the proof comes directly from Kelenner's comment, I post this answer in community wiki, so as to not earn undeserved points.
We assume $f(0)=1$ and
$$\forall x,y \in \Bbb R, f(x-y)=f(x)f(y)-g(x)g(y)$$
Notice that we use nowhere the assumption that $f$ or $g$ is continuous.
Then, for all $x\in\Bbb R$,
$$1=f(0)=f(x-x)=f(x)^2-g(x)^2$$
And
$$f(2x)=f(x)f(-x)-g(x)g(-x)$$
Also, $\forall x,y\in \Bbb R$,
$$f(y-x)=f(x)f(y)-g(x)g(y)=f(x-y)$$
Hence $\forall x\in\Bbb R$, $f(x)=f(-x)$, that is, $f$ is even.
Therefore, $f(-x-y)=f(x+y)$, or, $\forall x,y\in \Bbb R$,
$$f(-x)f(y)-g(-x)g(y)=f(x)f(-y)-g(x)g(-y)$$
Hence, $\forall x,y\in \Bbb R$, $g(-x)g(y)=g(x)g(-y)$.
Now, let's suppose $g(y_0)\neq0$ for some $y_0 \in \Bbb R$.
We have then, $\forall x\in\Bbb R$, such that $g(x)\neq0$,
$$\frac{g(-x)}{g(x)}=\frac{g(-y_0)}{g(y_0)}=a$$
Where $a$ is a constant real number.
And if $g(x)=0$, then from $g(-x)g(y_0)=g(x)g(-y_0)=0$ and $g(y_0)\neq0$, we have that $g(-x)=0$ too.
That is, $\forall x\in\Bbb R$, $g(-x)=ag(x)$.
But then $\forall x\in\Bbb R$, $g(x)=ag(-x)=a^2g(x)$, and since $g(y_0)\neq0$, we can simplify and $a^2=1$, or $a=\pm1$. Thus the function $g$ is either even or odd.
If $g$ is even, then $\forall x\in\Bbb R$,
$$f(2x)=f(x)^2-g(x)^2=1$$
So $f$ is constant ($=1$).
But then $\forall x\in\Bbb R$, $g(x)^2=f(x)^2-f(2x)=0$.
Hence, if $g$ is even, it's the null function.
But that means $g$ is always odd, since either it is odd, either it is null (thus also odd).
A: Hint (using that $f(-x)=f(x)$ and $g(x)g(-y)=g(-x)g(y)$ the results form the question above).
$x$ should be arbitrary in the whole calculation.
With $\forall x,y\in R$ $$g(x)g(-y)=g(-x)g(y)\tag{i}$$
set $y\to -x$ then $$g(x)^2=g(-x)^2\tag{ii}$$ 
Because of $g$ is real $$g(-x)=\pm g(x)\tag{iii}$$
If there is any $x_+$ so that $g(-x_+)=g(x_+)$, then with (i) $\qquad\forall y\in R: g(-y)=g(y)$.
Or there is a $x_-$ with $g(x_-)=-g(x_-)$, then with (i) $\qquad\forall y\in R:g(-y)=-g(y)$
Thus the sign in $(iii)$ must be the same for all values of $x$.
Now starting with
$$f(x-y)=f(x)f(y)-g(x)g(y) \tag{1}$$
Set $y\to x$
$$1=f(0)=f(x)^2-g(x)^2\tag{2}$$
Now look at
$$f(x+y)=f(x)f(y)-g(x)g(-y)\tag{3}$$
Assume that $\forall x_+\in R:g(-x_+)=+g(x_+)$
Then set $y\to x_+$
$$f(2x_+)=f(x_+)^2-g(x_+)^2\tag{4}$$
Comparing $(2)$ and $(4)$ you see then $\forall x_+\in R:f(2x_+)=1$.
With $\forall x_+\in R:f(x_+)=1$ and $(2)$ you get $\forall x_+\in R$ $$g(-x_+)=g(x_+)=0=-g(x_+) \tag{5}$$ or the assumption was wrong.
In summary you get $$\forall x\in R:g(-x)=-g(x) \tag{6}$$
Did I make any bad mistakes or is something missing?
A: I like these problems, so let me give it a try and write it down neatly.
Since the right hand side is invariant under the swapping $x$ and $y$ we have $f(-t)=f(t)$. Applying the identity with $-x$ and $-y$, using that $f$ is even, gives that $g(-x)g(-y) = g(x)g(y)$, for all $x$ and $y$. (1) Setting $x=y$ implies that  $g(-x)\in \{ g(x), -g(x)\}$ for all x. 
If $g\not\equiv 0$, then take any $y$ such that $g(y)\neq 0$. Then either $g(y)=g(-y)$ or $g(y)=-g(-y)$, and substituting and dividing by $g(y)$ in equation (1) shows that $g$ is either even or odd. (Or identically zero but that's ok because both even and odd.)
If $g$ is even then applying the first identity with $x$ and $-y$, using that $f$ and $g$ are both even, results in $f(x-y)=f(x+y)$, thus  $f$ would be a constant namely $f\equiv 1$. Contradiction because then $g(x) g(y) = 0$ for all $x$ and $y$ , thus $g\equiv 0$ but we already dismissed that case.
A: First note that by using $f(x)=f(-x)$
$$
f(0) = f(x-x) = f(x)^2- g(x)^2  \\
f(0) = f(-x-(-x))=f(x)^2-g(-x)^2 \\
g(x)^2 = g(-x)^2 
$$
Thus let one define into two sets (note an element may be in both)
$$
\Gamma^+=\{x \in \mathbb{R} : g(x) = g(-x) \} \\
\Gamma^-=\{x \in \mathbb{R} : g(x) = -g(-x) \} \\
$$
Clearly $\mathbb{R}=\Gamma^+ \cup \Gamma^-$, such that $g$ is even for $x\in\Gamma^+$, and odd for $x\in\Gamma^-$.
Consider $x\in\Gamma^+$, one has
$$
f(x-y)=f(x)f(-y)-g(x)g(-y) \\
\therefore f(x-y)=f(x+y)\Rightarrow f(x-x)=f(x+x) \Rightarrow f(x)=1 \:\forall x\textrm{ as }f(0)=1 \\
\Rightarrow g(x)=0 \:\forall x \in\Gamma^+
$$
Thus $x\in\Gamma^+\Rightarrow g(x)=0 \Rightarrow g(x)=-g(-x)\Rightarrow x\in\Gamma^-$. Thus $\mathbb{R}=\Gamma^-$.
