Problem

Source: IberoAmerican 2023, Day 1, P2

Tags: functional equation in Z, algebra



Let $\mathbb{Z}$ be the set of integers. Find all functions $f:\mathbb{Z}\rightarrow\mathbb{Z}$ such that: $$2023f(f(x))+2022x^2=2022f(x)+2023[f(x)]^2+1$$for each integer $x$.