Problem

Source: Latvian TST for Baltic Way 2022 P3

Tags: functional equation, TST



Let $\mathbb R$ be the set of real numbers. Determine all functions $f:\mathbb R\to\mathbb R$ that satisfy the equation\[ f(f(x))+yf(xy+1) = f(x-f(y)) + xf(y)^2. \]for all real numbers $x$ and $y$.