Does the derivative of a polynomial over an ordered ring behave like a rate of change? Suppose I have an ordered commutative ring $R$. I can define the collection $P$ of polynomial functions defined on $R$ as functions of the form $f(r) = p_0 + p_1 r + p_2 r^2 + \cdots$ where $p_0, p_1, p_2, \cdots$ are elements of $R$. The collection $P$ is closed under the formal derivative operation that maps $f(r) = p_0 + p_1 r + p_2 r^2 + \cdots$ to $f'(r) = p_1 + (p_2 + p_2) r + \cdots$
Does this derivative satisfy any "rate of change" properties that play nicely with the ordering on $R$?
For example, consider the elements $r_1 \leq r_2$ in $R$ and suppose that for any $r \in R$ where $r_1 \leq r \leq r_2$ we have that $f'(r) \geq 0$. Does this imply that $f(r_2) - f(r_1) \geq 0$?
If not, what additional assumptions do I need? Obviously this works when $R$ is the reals, but I am curious what assumptions I can drop.
 A: Here is a counterexample. Let $R = {\Bbb Z}$ and let $f(r) = 2r^3 - 3r^2$. Then $f'(r) = 6r^2 -6r$ and $f'(0) = f'(1) = 0$. However $f(1) = -1$ and $f(0) = 0$ and hence $f(1) - f(0) < 0$.
The problem is that if the interval $[r_1, r_2]$ is finite, your condition $f'(r) \geqslant 0$ for $r_1 \leqslant r \leqslant r_2$ only gives you a finite number of linear inequalities which have no reason to imply $f(r_2) - f(r_1) \geqslant 0$ if you choose a polynomial function of sufficiently high degree. Thus you may need some density property of your order between $r_1$ and $r_2$.
A: One sufficient (and necessary?) condition is that $R$ be a dense subring of a real-closed field $F$ (equivalently, in its real closure).
Real-closed fields are fields which satisfy the same first order properties as the real field in the language of ordered rings.
One can readily see that if $R$ is dense in a real-closed field $F$, then $f'$ is positive between $r_1$ and $r_2$ in $F$: if $f$ had a strictly negative value on $[r_1,r_2]_F$, then it would be strictly negative, by continuity of polynomials, on a subinterval $I$ of $[r_1,r_2]_F$, but this interval must intersect $R$.
Since (the universal closure of) $\forall x(r_1\leq x \leq r_2 \Rightarrow f'(x)\geq 0) \Longrightarrow f(r_2)\geq f(r_1)$ is a first order statement in the language of ordered rings, it holds in $F$, hence the result.
