Problem

Source: VMO 2023 day 2 P5 (harder version)

Tags: function, algebra



Find all functions $f, g: \mathbb{R} \rightarrow \mathbb{R}$ satisfying $f (0)=2022$ and $f (x+g(y)) =xf(y)+(2023-y)f(x)+g(x)$ for all $x, y \in \mathbb{R}$.