Problem

Source: India IMO Training Camp 2016, Practice test 2, Problem 2

Tags: function, functional equation, algebra



Find all functions $f:\mathbb R\to\mathbb R$ such that $$f\left( x^2+xf(y)\right)=xf(x+y)$$for all reals $x,y$.