Problem

Source: 2016 IMO Shortlist A7

Tags: IMO Shortlist, functional equation, algebra



Find all functions $f:\mathbb{R}\rightarrow\mathbb{R}$ such that $f(0)\neq 0$ and for all $x,y\in\mathbb{R}$, \[ f(x+y)^2 = 2f(x)f(y) + \max \left\{ f(x^2+y^2), f(x^2)+f(y^2) \right\}. \]