Functional Equation - Am I right?

Find all functions $f:\mathbb{R} \rightarrow \mathbb{R}$ such that $$x^2+y^2+2f(xy)=f(x+y)(f(x)+f(y))$$

So here's my solution,

If $x=y=0$,

$2f(0)=2f(0)^2$

$\implies f(0)=0$ or $f(0)=1$.

Case $1$: $f(0)=0$

If $y=0$,

$x^2+2f(0)=f(x)(f(x)+f(0))$ $$f(x)^2=x^2$$

Now suppose for the sake of contradiction that $f(x)=-x$ for some $x \in \mathbb{R/\{0\}}$. Then, $x^2+y^2-2xy=(-x-y)(-x-y)$ $$\implies (x-y)^2=(x+y)^2$$ which is a contradiction as $x+y=\pm(x-y)$ forces $x$ or $y$ to equal $0$ which isn't permitted.

Hence $f(x)=x$, conversely one readily checks that this satisfies the given equation.

Case $2$: $f(0)=1$

Again let $y=0$ and then $$f(x)^2+f(x)-x^2-2=0$$ (remember we're assuming $f(0)=1$)

Solving for $f(x)$ we get $$f(x)=\frac{-1 \pm \sqrt{4x^2+9}}{2}$$

If you allow the plus or minus to be a minus $f(0) \not= 1$. Therefore it must be a plus.

But when you sub it back in to the original equation and then putting $x=y=1$ it does not work. Hence it does not work for all $x$ contradiction hence $f(x)=x$ as in case one is the only solution. QED

My concern here is the last paragraph - Can I do that? Is it tight? If so, is there a better and more mathematically "professional" (for the lack of a better word) way to phrase it?

Any help would be greatly appreciated.

-
I don't understand your line "Then, $x^2+y^2-2xy=(-x-y)(-x-y)$" – Chris Eagle Jul 28 '13 at 9:08
I am subbing $f(x)=-x$ into the original equation – John Marty Jul 28 '13 at 9:32
@JohnMarty: But your assumption was that $f(x)=-x$ for some nonzero $x$. You can't assume that that's true for every nonzero $x$. – Chris Eagle Jul 28 '13 at 9:41
@ChrisEagle I'm not, I'm showing that this only holds when $x=0$, is that right? – John Marty Jul 28 '13 at 9:49
No, it is not right. You say you are assuming for contradiction the existence of a nonzero $x$ with $f(x)=-x$. But what you in fact assume is the existence of $x, y$, both nonzero, such that $f(x)=-x, f(y)=-y, f(xy)=-xy, f(x+y)=-x-y$. – Chris Eagle Jul 28 '13 at 9:52

In Case 1, we can substitute $y = -x$ into the original equation. We obtain $$x^2+x^2+2f(-x^2)=0(f(x)+f(-x))$$ which means that $$f(-x^2)=-x^2$$ holds for all $x$. This means that $$f(y)=y \text{ holds for all }y\leq 0.\tag{*}$$ Now, let $x>0$ and $y < -x$. Substitute $x$ and $y$ into the original equation. By $(*)$ this gives us $$x^2+y^2 + 2xy=(x+y)(f(x)+y),$$ where we used the facts that $y,xy$ and $x+y$ are negative. Divide by $x+y$ (which is nonzero by our assumptions) and simplify to get $f(x) = x$. This proves that $f(x) = x$ holds also for positive $x$.
In Case 2, as you noticed, we obtain $$f(x)=\frac{-1 \pm \sqrt{4x^2+9}}{2},$$ i.e. there are only two possibilities for each $x\in\mathbb R$. Therefore there are four possible choices of $f(1)$ and $f(2)$. But each of them leads to a contradiction if we substitute $x=y=1$ into the original equation. Therefore Case 2 does not lead to a solution.
Edit: the thing to notice here is that in $$f(x)=\frac{-1 \pm \sqrt{4x^2+9}}{2},$$ we can choose a plus or a minus sign for each $x$ independently, so it is not enough to consider only the cases $$f(x)=\frac{-1 + \sqrt{4x^2+9}}{2}$$ and $$f(x)=\frac{-1 - \sqrt{4x^2+9}}{2}.$$ We also have to prove that functions like $$f(x)=\begin{cases}\frac{-1 + \sqrt{4x^2+9}}{2};&\text{if }x>0,\\ \frac{-1 - \sqrt{4x^2+9}}{2};&\text{if }x\leq 0. \end{cases}$$ cannot occur. By showing that there is no value for $f(1)$ that could possibly work, we have achieved exactly this.