# Geometric characterization of the $n$-th derivative of $f$ being positive (convexity for $n=2$).

Does the following claim hold?

Let $$n\in \mathbb N_{\geq 2}$$ and let $$f:\mathbb R \to \mathbb R$$ be an $$n$$-times differentiable function. Then the $$n$$-the derivative $$f^{(n)}(x)\geq 0$$ for all $$x\in \mathbb R$$ iff for any $$a_1 $$f(x) \leq p(x;a_1,\ldots,a_n) \quad \forall x \in [a_{n-1},a_n], \tag{*}\label{fp}$$ where $$p(\cdot; a_1,\ldots,a_n)$$ is the $$n-1$$ degree polynomial fitting the points $$\big(a_1,f(a_1)\big),\ldots,\big(a_n,f(a_n)\big)$$.

Note: The condition \eqref{fp} can be geometrically represented as follows: For any $$n$$ different points of the graph of $$f$$ consider the curve line segment between the last two points (those most on the right) of the polynomial curve fitting the graph of $$f$$ at the $$n$$ points. Then the curve line segment is contained in the epigraph of $$f$$.

Observations:

For $$n=2$$ the condition \eqref{fp} simplifies into that the line segment between any two points of a graph of $$f$$ is in the epigraph of $$f$$ – the standard characterization of $$\mathop{epi} f$$ being a convex set.

In general the condition $$f^{(n)}(x)\geq 0$$ can be interpreted as that $$f^{(n-1)}$$ is increasing, and equivalently that $$f^{(n-2)}$$ is a convex function. The intuitive idea is that if $$f^{(n)}$$ was constant then $$f$$ would be identical to the polynomial $$p$$ that fits any $$n$$ points in the graph of $$f$$, and as $$f^{(n)}$$ is increasing it can be expected that $$f$$ would be above $$p$$ for $$x$$ large.

Extensions:

Yes, the equivalence does hold under the condition that $$f$$ is $$n$$-times continuously differentiable. This is a consequence of the formula for the interpolation error of polynomial interpolation: For $$a_1 \le x \le a_n$$ is $$f(x) - p(x;a_1,\ldots,a_n) = \frac{f^{(n)}(\xi_x)}{n!} (x-a_1)(x-a_2)\cdots (x-a_n)$$ with some $$\xi_x \in [a_1, a_n]$$, depending on $$x$$.
If $$f^{(n)}(x)\geq 0$$ for all $$x\in \Bbb R$$ and $$a_1 < a_2 < \cdots < a_n$$ then the above formula shows that $$f(x)-p(x) \le 0 \text{ for } a_{n-1}\le x \le a_n \, .$$
On the other hand, if $$f^{(n)}(c) < 0$$ for some $$c \in \Bbb R$$ then $$f^{(n)}(x) < 0$$ on some non-degenerated interval $$[a, b]$$. If we choose $$a = a_1 < a_2 < \cdots < a_n = b$$ then the above formula shows that $$f(x)-p(x) > 0 \text{ for } a_{n-1}< x < a_n \, .$$