Because the polynomial P(x) is non-constant and has the highest coefficient equal to 1, there exists a constant c such that P(x) can take on all values above [c,+∞).
From equation (1), we get
f(f(x)+y+2023f(y))=x+2024f(y),∀x≥c,y∈R.(2)
We will prove limx→+∞∣f(x)∣=+∞. Indeed, assuming the existence of real numbers M,m (we can assume m≥c) such that ∣f(x)∣≤M for all x≥m. Fix a real number y0. For x≥m, we have
−M+y0+2023f(y0)≤f(x)+y0+2023f(y0)≤M+y0+2023f(y0).
In addition, since f is continuous on R, there exists a real number N such that f(x)≤N for all real numbers x belonging to the interval [−M+y0+2023f(y0),M+y0+2023f(y0)]. From here and from (2), we deduce
N≥f(f(x)+y0+2023f(y0))=x+2024f(y0),
or N≥x+2024f(y0) for all x≥m, contradiction. Therefore limx→+∞∣f(x)∣=+∞.
From (2), it is easy to see that f is injective on the domain [c,+∞). Since f is a continuous function on R, f is a truly monotone function on the domain [c,+∞). Thus, there are two possible cases.
Case 1: limx→+∞f(x)=−∞. We will prove limx→−∞f(x)=+∞. Indeed, suppose there exist real numbers L,ℓ such that f(x)≤L for all x≤ℓ. Fix the real number y0. Since limx→+∞f(x)=−∞, there exists a real number x0≥c such that x0>L−2024f(y0) and f(x0)+y0+2023≤ℓ. Then, from (2), we have
L<x0+2024f(y0)=f(f(x0)+y0+2023f(y0))≤L.
From the received contradiction, we deduce limx→−∞f(x)=+∞. Because limx→+∞f(x)=−∞, limx→−∞f(x)=+∞ and f is continuous on R so f is an all-reflection on R.
Now, fixing the real number x1≥c. We see that there exists a real number y1 such that f(y1)=−2023f(x1). Then, from equation (2), we deduce
x1−20232024f(x1)=x1+2024f(y1)=f(f(x1)+y1+2023f(y1))=f(y1)=−2023f(x1),
therefore f(x1)=x1. Thus, f(x)=x for all x≥c, which is a contradiction because limx→+∞f(x)=−∞.
Case 2: limx→+∞f(x)=+∞. In this case, it is easy to see that f is a strictly increasing function on the domain [c,+∞).
Now, suppose there are two real numbers a,b such that f(a)=f(b). Since limx→+∞f(x)=+∞ so there exists a real number d≥c such that f(d)+a+2023f(a)≥c and f(d)+b+2023f(b)≥c. Then, from equation (2), we have
f(f(d)+a+2023f(a))=d+2024f(a)=d+2024f(b)=f(f(d)+b+2023f(b)).
Because f increases strictly over the domain [c,+∞), f(d)+a+2023f(a)=f(d)+b+2023f(b), implies a=b. Thus, the function f is one-to-one on R. Because f is continuous on R and f is strictly increasing on the domain [c,+∞) so from here, we deduce that f increases strictly on R.
Next, we will prove limx→−∞f(x)=−∞. Indeed, suppose there exist real numbers V,ν such that f(x)≥V for all x≤ν. Substituting y=−f(x) into equation (2), we get
f(2023f(−f(x)))=x+2024f(−f(x)),∀x≥c.(3)
Since limx→+∞f(x)=+∞, there exists a real number x2≥c such that x2>f(2023f(ν))−2024V and f(x2)≥−ν. We have −f(x2)≤ν so f(−f(x2))≥V, follows output
x2+2024f(−f(x2))≥x2+2024V.
There is again −f(x2)≤ν so f(−f(x2))≤f(ν), infers
f(2023f(−f(x2)))≤f(2023f(ν)).
Combined with (3), we get
f(2023f(ν))≥f(2023f(−f(x2)))=x2+2024f(−f(x2))≥x2+2024L>f(2023f(ν)).
From the received contradiction, we deduce limx→−∞f(x)=−∞. We have limx→+∞f(x)=+∞, limx→−∞f(x)=−∞ and f is continuous on R so f is an all-reflection on R. At here, doing the same substitution as case 1 above, we have f(x)=x for all x≥c. Now, in equation (2), fix the real number x and choose x≥c enough so that f(x)+y+2023f(y)≥c. We have
x+y+2023f(y)=f(x)+y+2023f(y)=f(f(x)+y+2023f(y))=x+2024f(y).
It follows that f(y)=y. Thus, we have f(x)=x for all real numbers x. It is easy to verify that f(x)=x indeed satisfies the condition of the problem.