If your function was strictly convex and $C^3$ (let's say on a compact interval $I$) and you had bounds on the third derivative there, it might be possible to prove its convexity on $I$ by evaluating it at sufficiently many points of $I$. If not, it's impossible to distinguish any convex function from one whose second derivative has a narrow "blip" taking it below zero between some of the points where you evaluated it.
Robert Israel
- 54.2k
- 1
- 76
- 152