By definition, there exist N1>0 and N2<0 such that for all x,
x>N1⟹∣f(x)∣=f(x)<f(0)and
x<N2⟹∣f(x)∣=f(x)<f(0).Consider the interval D=[N2,N1]. Since f is continuous, there must exist y∈D such that f(y)≥f(x) for all x∈D. But over this interval, f(y)≥f(0) since 0∈D. Hence, f(x)≤f(y) for all x∈R.