Find the function $f(x)$ if $f(x+y)=f(x-y)+2f(y)+xy$ I'm suffering from the procedure I found, which is contradictory. 
The original question is:

Let $f$ be differentiable. For all $x, y \in \mathbb R$, 
  $$f(x+y)=f(x-y)+2f(y)+xy$$
  Suppose $f'(0)=1$ and find $f(x)$.

My procedure was:

Put $x=y=0$:
  $$f(0)=f(0)+2f(0)+0$$
$$f(0)=0$$
Put $x=y=\frac{h}{2}$:
$$f(h)=2f\left(\frac{h}{2}\right)+\frac{h^2}{4}$$
Substituting $x=x+\frac{h}{2}, y=\frac{h}{2}$ brings:
$$f'(x)=\lim_{h\to0} \frac{f(x+h)-f(x)}{h}=\lim_{h \to 0}\frac{2f\left(\frac{h}{2}\right)+\frac{h}{2}\left(x+\frac{h}{2}\right)}{h}=\lim_{h\to0}\frac{f(h)+\frac{h}{2}x}{h}\\=\lim_{h\to0}\frac{f(h)-f(0)}{h-0}+\frac{x}{2}=\frac{x}{2}+1$$
$$f(x)=\frac{x^2}{4}+x+c$$ where $c$ is constant.
  Since $f(0)=0,\space\space c=0$

However, when we substitute $x=0$ to the given condition, 
$$f(y)=f(-y)+2f(y)+0(y)$$
$$-f(y)=f(-y)$$
which informs that $f$ is odd: contradiction!
Could you please help me to find the error? Thanks.
 A: I think you made no mistake. It's just that the conditions are incoherent, they offer no solution (even without the condition $f'(0)=1$). There is no differentiable $f$ that satisfies 
$$\tag1
f(x+y)=f(x-y)+2f(y)+xy. 
$$
If we take $(1)$ and differentiate with respect to $x$, we get
$$\tag2
f'(x+y)=f'(x-y)+y.
$$
If instead we differentiate $(1)$ with respect to $y$, we get
$$\tag3
f'(x+y)=-f'(x-y)+2f'(y)+x.
$$
If we add $(2)$ and $(3)$ we get 
$$
2f'(x+y)=2f'(y)+x+y. 
$$
When $x=0$, we get 
$$
2f'(y)=2f'(y)+y,
$$
so $(1)$ can only hold for a differentiable function if $y=0$. 
A: In addition to the accepted answer, there is just no function $f$ whatsoever that satisfies the given functional equation, differentiable or otherwise. Consider the following special cases:
\begin{align}
    f(1) &= f(1) + 2f(0) & x=1 \;& y=0 \\
    f(2) &= f(0) + 2f(1) + 1 & x=1\;&y=1 \\
    f(4) &= f(2) + 2f(1) + 3 & x=3\;&y=1 \\
    f(4) &= f(0) + 2f(2) + 4 & x=2\;&y=2
\end{align}
From the first equation, we get $f(0) =0$; let $f(1)=c$. From the second, $f(2)=2c+1$. From the third, $f(4)=(2c+1)+2c+3 = 4c+4$, and from the fourth, $f(4)=2(2c+1)+4 = 4c+6$. 
This gives us $4c+4 = 4c+6$, a contradiction no matter what the value of $c$ is.
