find all continuous functions $f:\mathbb{R}^n \rightarrow \mathbb{R}$ satisfying $f(x+y)+f(x-y)=2f(x)+2f(y)$ for all $x,y \in \mathbb{R}^n$ find all continuous functions $f:\mathbb{R}^n \rightarrow \mathbb{R}$ satisfying 
\begin{equation*}
f(x+y)+f(x-y)=2f(x)+2f(y)~\forall x,y \in \mathbb{R}^n.
\end{equation*}
My attempt: I manage to show that for any $q \in \mathbb{Q}$, $f(qx)=q^2f(x)$ for all $x \in \mathbb{R}^n$. I have a feeling that the answer is $f(x)=A\| x \|^2$, but I'm unable to prove it. 
Can anyone give some hint?
 A: YES, $f$ must be a quadratic homogeneous polynomial (QHP in abbreviated
notation) as you expected.
We have a continuous function $f:\mathbb{R}^n \rightarrow \mathbb{R}$ satisfying 
$$
f(x+y)+f(x-y)=2f(x)+2f(y)~\forall x,y \in \mathbb{R}^n \tag{1}
$$
Let $a,b\in{\mathbb R}^n$. For $k\in{\mathbb N}$, define $\phi_{a,b}(k)=f(a+kb)$.
Taking $x=a+(k+1)b$ and $y=b$ in (1) above, we see that $\phi_{a,b}$ satisfies a second-order linear recurrence formula :
$$
\phi_{a,b}(k+2)-2\phi_{a,b}(k+1)+\phi_{a,b}(k)=2f(b) \tag{2}
$$
It follows easily from (2), by induction on $k\in{\mathbb N}$ that
$$
\phi_{a,b}(k)=k\phi_{a,b}(1)-(k-1)\phi_{a,b}(0)+k(k-1)f(b) \tag{3}
$$
Note that (3) can be rewritten as (putting $\mu=k$)
$$
f(a+\mu b)=f(a)+\mu(f(a+b)-f(a)-f(b))+\mu^2f(b) \ (\mu\in{\mathbb N}) \tag{3'} 
$$
Now, let $\lambda,\mu\in{\mathbb N}$. We have
\begin{equation}
\begin{split}
f(\lambda a+\mu b) &= f(\lambda a)+\mu\Bigg(f(\lambda a+b)-f(\lambda a)-f(b)\Bigg)+\mu^2f(b) \\
&= \lambda ^2 f(a)+\mu\Bigg(\Bigg[f(b+\lambda a)\Bigg]-\lambda^2 f(a)-f(b)\Bigg)+\mu^2f(b) \\
&= \lambda ^2 f(a)+\mu\Bigg(\Bigg[f(b)+\lambda(f(a+b)-f(a)-f(b))+\lambda^2 f(a)\Bigg] -\lambda^2 f(a)-f(b)\Bigg)+\mu^2f(b) \\
&= \lambda ^2 f(a)+\lambda\mu\Bigg(f(a+b)-f(a)-f(b)\Bigg)+\mu^2f(b) \ \ \ \ \ \ \ \ \ \ \ \ \ (4) \\
\end{split}
\end{equation}
Replacing $a$ or $b$ with their opposites, we see that (4) still holds 
when $\lambda$ or $\mu$ is negative.  By homogeneity, (4) still holds when $\lambda,\mu\in{\mathbb Q}$.
By continuity, (4) still holds when $\lambda,\mu\in{\mathbb R}$. So the restriction of $f$
to any two-dimensional subspace is a QHP.
As a special case of (4), we have for $x,a\in{\mathbb R}^n$ and $\lambda \in {\mathbb R}$,
$$
f(x+\lambda a)=f(x)+\lambda (f(x+a)-f(x)-f(a)) +\lambda^2 f(a) \tag{5}
$$
Viewing $x+\lambda a+\lambda a'$ as $(x+\lambda a)+\lambda' a'$ and using (5) repeatedly, we
obtain for $x,a,a'\in{\mathbb R}^n$ and $\lambda,\lambda' \in {\mathbb R}$
$$
\begin{array}{lcl}
f(x+\lambda a+\lambda' a') &=& 
f(x)+(\lambda+\lambda')(f(x+a)-f(x)-f(a))+\\
& & \lambda \lambda' 
(f(x+a+a')-f(x+a)-f(x+a')+f(x)) +\\
& & \lambda^2f(a)+{\lambda'}^2f(a') \tag{6}
\end{array}
$$
Replacing $x$ with $\lambda''a''$ in (6) above and using (5) repeatedly one more time, we
obtain for $a,a',a''\in{\mathbb R}^n$ and $\lambda,\lambda',\lambda'' \in {\mathbb R}$,
$$
\begin{array}{lcl}
f(\lambda a+\lambda' a'+\lambda''a'')&=&
 \lambda \lambda' (f(a+a')-f(a)-f(a'))  + \\
 & &\lambda \lambda'' (f(a+a'')-f(a)-f(a'')) + \\
 & & \lambda' \lambda'' (f(a'+a'')-f(a')-f(a'')) + \\
 & & \lambda^2f(a)+{\lambda'}^2f(a')+{\lambda''}^2f(a'') + \\
 & & \lambda\lambda'\lambda''(f(a+a'+a'')-f(a+a')-f(a+a'')-f(a'+a'')+f(a)+f(a')+f(a'')) \\\tag{7}
\end{array}
$$
Note that when $\lambda=\lambda'=\lambda''=t$, the LHS reduces to $t^2f(a+a'+a'')$ which has no
$t^3$ term. So in (7) above the $\lambda\lambda'\lambda''$-coefficient must be zero. Then (7)
shows that the restriction of $f$ to any three-dimensional subspace is a QHP. If we put
$B(a,b)=f(a+b)-f(a)-f(b)$, it follows that for any $a$, $B(a,.)$ is linear on any two-dimensional
subspace, and hence linear everywhere. So $B$ is bilinear, which concludes the proof.
A: I'm going to do the case where $n=2$, I'll leave the generalisation to you :)
First, by continuity, for all $i\in\{1,2\}$ and $r\in\mathbb{R}$, $f(r{e_i})=r^2f(e_i)$. Now, denote $f(e_i)=A_i$.
Then, for every $r_1,r_2\in\mathbb{R}$, you know by the given identity that:
$$f(r_1,r_2)=2f(r_1,0)+2f(0,-r_2)-f(r_1,-r_2)=2r_1^2A_1+2r_2^2A_2-f(r_1,-r_2)$$
So we just need to know what $f(r_1,-r_2)$ is.
Now:
$$f(x+y)+f((\sqrt{2}-1)x-(\sqrt{2}+1)y)=2f(\frac{x-y}{\sqrt{2}})+2f((1-\frac{1}{\sqrt{2}})x+(1+\frac{1}{\sqrt{2}})y)=f(x-y)+2f((1-\frac{1}{\sqrt{2}})x+(1+\frac{1}{\sqrt{2}})y)$$
So:
$$f(x+y)-f(x-y)=2f((1-\frac{1}{\sqrt{2}})x+(1+\frac{1}{\sqrt{2}})y)-f((\sqrt{2}-1)x-(\sqrt{2}+1)y)=f((\sqrt{2}-1)x+(\sqrt{2}+1)y)-f((\sqrt{2}-1)x-(\sqrt{2}+1)y)=0$$
Therefore:
$$f(r_1,r_2)=f(r_1,-r_2)$$
And so, going back to our previous result::
$$f(r_1,r_2)=r_1^2A_1+r_2^2A_2$$
EDIT: It seems there's something wrong with my argument, as $f(r_1,r_2)=r_1r_2$ also satisfies the identity supplied. I'm not sure right now what it is, though, as of now...
