<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] Clearly any constant solution is the zero function. So assume that $f$ is nonzero. Let $P(x,y)$ denote the given assertion. We have $f(0)=0$ by $P(x,0)$. Take $f(x)\neq 0$, then $P(x,x)$ implies $f(2x)=2f(x)$ and following an easy induction $f(kx)=kf(x)$ for all $k\in \mathbb N.$ If $f(x_0)=0$ then $P(x_0,-x_0)$ gives $f(-x_0)=0.$ So for all $x,$ $f$ is odd. Now $P(x,-y)$ and $P(x,y)$ implies $$f(x-y)(f(x)+f(y))=f(x+y)(f(x)-f(y)).$$ If $f(x)+f(y)\neq 0$ then substituting value of $f(x-y)$ in original equation gives $f$ is additive. If $f(x)+f(y)=0$ but $f(x+y)\neq 0$, then $f(x)=f(y)=0,$ and so $P(x+y,y)$ gives $f(x+y)=0,$ absurd.
</s>