<s>[INST] Finding all $ f: \mathbb{R} \to \mathbb{R}$ such that $ f(x+f(y))=f(x)+2xy^2+y^2f(y) $ $$
f: \mathbb{R} \to \mathbb{R}, f(x+f(y))=f(x) + 2xy^2 + y^2f(y)
$$
How can we solve this problem? This is my try, but can't go more.
$$
P(x, y): f(x+f(y))=f(x) + 2xy^2 + y^2f(y) \\
P(0, 0): f(f(0))=f(0) \\
let \ f(0) = a \Rightarrow f(a)=a. \\
P(a, a): f(2a)=a+2a^3+a^3 \\
P(a, 0): f(2a)=a \\
\Rightarrow 3a^3=0 \Rightarrow a = 0, f(0) = 0. \\
\ \\
Assume) \ \exists \ t \ s.t. \ t \ \neq 0, \ f(t)=0. \\
P(t, t): 0 = 2t^3 \Rightarrow t = 0, \text{Contradiction.} \\
\therefore f(t)=0 \Leftrightarrow t = 0.
\ \\
P(0, y): f(f(y))=y^2f(y). \\
P(f(x), x): f(2f(x))=f(f(x))+2f(x) \cdot x^2 + x^2f(x) = 4f(f(x))=4x^2\cdot f(x) \\
P(2f(x), x): f(3f(x))=f(2f(x))+4f(x)\cdot x^2 + x^2f(x) = 9f(f(x)) = 9x^2 \cdot f(x) \\
\cdot \\
\cdot \\
\cdot \\
f(nf(x))=n^2f(f(x))=n^2x^2f(x) \ for \ \forall n \in \mathbb{N}. \\
\ \\
P(-f(x), x): f(0)=f(-f(x))-2f(x) \cdot x^2 + x^2f(x) \Rightarrow f(-f(x)) = x^2f(x) = f(f(x)) \\
P(-2f(x), x): f(-f(x))=f(-2f(x))-4f(x)\cdot x^2 + x^2f(x) \Rightarrow f(-2f(x))=4x^2f(x)=4f(f(x)) \\
\cdot \\
\cdot \\
\cdot \\
f(mf(x))=m^2f(f(x))=m^2x^2f(x) \ for \ \forall m \in \mathbb{Z}. \\
$$
 [/INST] $$f(x+f(y))=f(x)+2xy^2+y^2f(y)$$


*

*$(x,y)\equiv (0,0)$
$$f(f(0))=f(0)\implies f(c)=c\;,\;\;\; c=f(0).$$

*$(x,y)\equiv (0,c)$
$$f(f(c))=c+c^2f(c)\implies c^3=0\implies f(0)=c=0. $$


*

*$(x,y)\equiv (0,x)$
$$f(f(x)=x^2f(x)\tag{1} $$

*$(x,y)\equiv (f(x),1)$
$$f(f(x)+f(1))=f(f(x))+2f(x)+f(1)\tag{2}$$

*$(x,y)\equiv (f(1),x)$
$$f(f(1)+f(x))=f(f(1))+2f(1)x^2+x^2f(x)\tag{3}$$

*$(x,y)\equiv (0,1)$
$$ f(f(1))=f(1)\tag{4}$$

Adding $(1)$ and $(2)$, then subtracting $(3)$ and $(4)$ from the sum leads to,
$$f(x)=f(1)x^2$$
Substituting this result in the original F.E, we have,
$$f(1)^2=1\implies f(1)=\pm 1$$
$$\therefore\; \boxed{f(x)=\pm \;x^2} \;\;\forall x\in \mathbb{R} $$
</s>