Find all function(s) $f:\mathbb{R} \to \mathbb{R}$ which satisfies $f(x)^2+2xf(y)+y^2=f(x+y)^2$.
My Solution:
\begin{align} &P(x, 0): f(x)^2+2xf(0)=f(x)^2. \\ &\therefore 2xf(0)=0. \Rightarrow f(0)=0. \\ \ \\ &P(0, y): y^2=f(y)^2. \\ \ \\ &\text{Substituting to the original F.E.: } x^2+2xf(y)+y^2=x^2+2xy+y^2. \\ &\therefore f(y)=0 \text{ or } y. \\ &\text{If } f(y)=0: y^2=0, \text{ Contradiction.} \\ &\therefore f(x)=x. \end{align}
Please answer it if you have a shorter solution.
When $x=0$, $f(y)^2=y^2$. So $f(x)=\pm x$.
$\forall x,f(x)=x$ is trivial answer.
When $f$ satisfies $\exists x\ne0\text{ s.t. }f(x)=-x$, then $f$ cannot be an answer because $f(x+y)^2=x^2+2xy+y^2\ne x^2-2xy+y^2=f(x)^2+2xf(y)+y^2$ for any $y\ne0$.
I don't know that this is a shorter answer, but one thing is clear that there's nothing wrong with your solution.