<s>[INST] Prove that $f$ is additive if $f(x)f(x-y)+f(y)f(x+y)= f(x)^2+f(y)^2$ 
Say $f:\mathbb{R}\to \mathbb{R}$ is non-constant such that $$f(x)f(x-y)+f(y)f(x+y)= f(x)^2+f(y)^2$$
  Prove that $f(x+y)=f(x)+f(y)$. 


If we put $a=f(0)$ and $y=0$ we get $$f(x)^2+af(x)= f(x)^2+a^2 \implies af(x) = a^2$$
If $a\ne 0$ then $f(x)=a$ is constant function which can not be, so $a=0$. Now if we put $x=y$ we get $$f(x)f(2x)=2f(x)^2$$
From here I have no more idea what to do. 

Edit after Lulu's comment: If we put also $y=-x$ we get $$2f(x)^2= f(x)f(2x) = f(x)^2+f(-x)^2\implies \boxed{f(x)^2=f(-x)^2}$$
 [/INST] This is only part of an answer, as I can't prove that $f$ is even or odd.
First, we want to show that $f$ is either even or odd, given $f(x)^2 = f(-x)^2$.
Say there are two points $x$ and $y$ such that $f(x) = f(-x)$ and $f(y) = -f(-y)$. Then, $f(x)f(x-y) + f(x+y) = f(x)^2+f(y)^2$, and, by plugging in $-x,y$, we get $$f(-x)f(-x-y) + f(y)f(y-x) = f(-x)^2 + f(y)^2 = f(x)^2 + f(y^2)$$ so we have $$f(x)f(-x-y) + f(y)f(y-x) = f(x)f(x-y) + f(y)f(x+y)$$

We now take cases on if $x+y$ and $y-x$ are odd or even. 
If they are both even, then we have $f(x+y) = f(x-y)$ or $f(x) = f(y)$ by factorization, which is constant. If they are both odd, Then $f(x) = -f(y)$ or $f(x+y) = f(x-y)$, which still both are contradictions.
Therefore, one has to be even and one has to be odd. I don't see any way to continue from here; so I skip to the part where they are either even or odd.

Now, we show that $f(x)$ is odd.
We know that $f(x)f(x−y)+f(y)f(x+y)=f(x)^2+f(y)^2$, and by plugging in $-y$ in for $y$, we get $f(x)f(x+y) + f(y)f(x-y) = f(x)^2 + f(-y)^2 = f(x)^2 + f(y)^2$, since $f(-y)^2 = f(y)^2$ and therefore $$f(x)(f(x+y)-f(x-y)) = f(y)f(x+y) - f(-y)f(x-y)$$
Now, we know that $f$ is either odd or even (or assume it for now). However, if $f$ is even, then we have $$f(x)(f(x+y)-f(x-y)) = f(y)(f(x+y) - f(x-y))$$ So either $f(x) = f(y)$, contradiction, or $f(x+y) - f(x-y) = 0 \implies f(x+y) = f(x-y)$, and because $x+y$ and $x-y$ can range all real numbers, which is also a contradiction.

Now, if $f(x+y)$ is not $f(x)+f(y)$, then $f(x-y) \neq f(x) - f(y)$, and by replacing $x$ with $y$, we get $f(y-x) \neq f(y) - f(x)$, so $f(x-y)+f(y-x) \neq 0$, which is a contradiction of the fact that $f$ is odd.
</s>