Prove the function is constant on $(0, \infty)$ 
Let $a, b \in \mathbb{R}, 0 \lt a \lt b$ and $f:\mathbb{R} \rightarrow
\mathbb{R}$ such that: $$f(x^2 +ay) \ge f(x^2 +by), \forall x,y \in
\mathbb{R} \tag1$$
Prove $f$ is constant on $(0, \infty)$

I don't know how to start, any idea is appreciated.
Playing a little bit with (1) I can get:
For $y \lt 0, x= \sqrt {-y}$ from (1) $f(0) \ge f((b-a)y), \forall y \lt 0$ or, similar, $f(0) \ge f((a-b)y), \forall y \gt 0$ also $f(0) \ge f(y) \forall y \lt 0$
but it doesn't seem to be helpful.
 A: Let $0<z_1 < z_2$ such that $az_2\leq bz_1$. Then for:
\begin{align}
\begin{cases}
x^2&=\left(z_2-\frac{b}{a}z_1\right)/\left(1-\frac{b}{a}\right)\\
y&=\left( z_1 - x^2\right)/a
\end{cases}
\end{align}
We have: $f(z_1) \geq f(z_2)$. For 
\begin{align}
\begin{cases}
x^2 &= \left(z_2-\frac{a}{b}z_1\right)/\left(1-\frac{a}{b}\right)\\
y &= \left( z_1 -x^2\right)/b
\end{cases}
\end{align}
We have $f(z_2)\geq f(z_1)$. Hence $f(z_1)=f(z_2)$. Since $z_1 $ and $z_2$ were arbitrary we get $f(z)=C$ for all $z>0$.
Edit. Take $z_1 =1$ then we know that $$\{C\}=f\left(\bigg[1, \frac ba\bigg]\right)=f\left(\bigg[\frac ba, \frac {b^2}{a^2}\bigg]\right)=....$$ and this gets all numbers in $[1,\infty)$ since $(b/a)^n\to \infty$ as $n\to \infty$.
Now take $z_2=1$ then we know that:
\begin{align}
\{C\}= f\left(\bigg[\frac ab,1\bigg]\right)=f\left(\bigg[\frac {a^2}{b^2},\frac ab\bigg]\right)=....
\end{align}
And this gets all numbers in $(0,1]$. This proves the result since $(a/b)^n\to 0$ as $n\to \infty$.
I'll leave the small details to you.
A: Suppose we have that $f(x_1)>f(x_2)$ for some $x_1<x_2$, then if we set
$$x=\sqrt{\frac{bx_2-ax_1}{b-a}}\qquad\text{and}\qquad y=\frac{x_2-x_1}{a-b}$$
we reach a contradiction. Thus we have that $f(x_1)\le f(x_2)$ for all $x_1\le x_2$. It then follows that $f(x^2+by)\ge f(x^2+ay)$ when $x,y\in\mathbb{R^{+}}$ and hence
$$f(x^2+ay)=f(x^2+by)\qquad x,y\in\mathbb{R}^{+}$$
At which point the result is fairly easy to derive.
A: If $z, w > 0$ are such that $z/w \in (\frac{a}{b}, \frac{b}{a})$, then
$$ \begin{cases} x^2 = \frac{bz-aw}{b-a} \\ y = \frac{w-z}{b-a} \end{cases} \quad\Rightarrow\quad f(z) = f(x^2+ay) \geq f(x^2+by) = f(w) $$
and switching the role of $z$ and $w$ gives the reverse inequality $f(w) \geq f(z)$. So the inequalities are saturated and we get $f(z) = f(w)$. Now writing $\alpha = b/a$, what we have shown is rephrased as:
$$ \forall s, t \in \mathbb{R} \ : \ |s - t| < 1 \quad \Rightarrow \quad f(\alpha^s) = f(\alpha^t). $$
From here it is easy to deduce that $f(\alpha^s) = f(\alpha^t)$ for all $s, t \in \mathbb{R}$, from which the claim follows.
A: Making the change of coordinates $$\begin{pmatrix} 1 & a \\ 1 & b\end{pmatrix}\begin{pmatrix}x^2 \\ y\end{pmatrix} = \begin{pmatrix}X \\ Y\end{pmatrix}$$  we find that the given condition can be rephrased as
$$ f(X)≥f(Y), \qquad \text{where }X,Y\in\mathbb R, \ bX -aY ≥ 0 $$
where the second condition can be written $ X≥\frac{aY}{b}$. So actually we have $f(X)≥f(Y)$ if either $X≥Y$ or if $Y≥X≥\frac{aY}{b}$. Hence,  we conclude that for any fixed $Y$, we have
$$ f(X) ≥ f(Y) \text{ for all } X\in[\tfrac{aY}{b} ,\infty) $$
and for any fixed $X$,
$$f(X) ≥ f(Y) \text{ for all } Y\in(-\infty ,\tfrac{bX}{a}] $$
Relabelling $X\leftrightarrow Y$ in this second inequality gives us
$$f(X) = f(Y) \text{ for all } X \in [\tfrac{aY}{b}, \tfrac{bY}{a}]$$
By choosing the two-sided sequence of $Y$-points, $n\in\mathbb Z$,
$$Y_n=\frac{a^n}{b^n}\to\begin{cases}\infty, & \text{if }\ n\to -\infty \\ 0, &\text{if }\ n\to \infty\end{cases}$$
we conclude that $f$ is constant on $(0,\infty)$.
