Problem

Source: 2020 Iberoamerican #5

Tags: algebra, functional equation, Iberoamerican



Determine all functions $f: \mathbb{R} \rightarrow \mathbb{R}$ such that $$f(xf(x-y))+yf(x)=x+y+f(x^2),$$for all real numbers $x$ and $y.$