Problem

Source: Switzerland - 2016 Swiss MO Final Round p10

Tags: algebra, functional, functional equation



Find all functions $f : R \to R$ such that for all $x, y \in R$: $$f(x + yf(x + y)) = y^2 + f(xf(y + 1)).$$