A7, da's een dure Audi voor de IMO

Opgave - IMOSL 2016 dag 1 vraag 7

Vind alle functies $f \colon \mathbb{R}\rightarrow\mathbb{R}$ met $f(0) \not=0$ zodat voor alle $x,y\in\mathbb{R}$ geldt dat
\[ f(x+y)^2 = 2f(x)f(y) + \max \left\{ f(x^2+y^2), f(x^2)+f(y^2) \right\}. \]