Problem

Source: Own. IMO 2022 Malaysian Training Camp 1

Tags: algebra, functional equation



Find all functions $f:\mathbb{R}\rightarrow \mathbb{R}$ such that for all real numbers $x,y$, we have $$f(xf(x)+2y)=f(x)^2+x+2f(y)$$