A function is convex when its graph is a bowl with no second dip. For a twice-differentiable function of one variable there is a quick check: the second derivative is never negative. Convexity is the property that turns “a point where the slope is zero” into “the lowest point of all”.
f''(x) \ge 0 \text{ for every } x \text{ in an interval} \iff f \text{ is convex on that interval} In words: the slope never decreases, so the graph only ever bends upward.
f(y) \ge f(x) + f'(x)\,(y - x) \quad \text{for all } x, y In words: a convex graph lies above every one of its tangent lines.
f \text{ convex and } f'(c) = 0 \;\Rightarrow\; f(y) \ge f(c) \text{ for all } y In words: put the flat tangent (f'(c)=0) into the inequality above: nothing lies below it, so c is a global minimum.
Take f(x) = x^2 + e^{-x}. Its second derivative is f''(x) = 2 + e^{- x}, a positive number plus a positive exponential, so f'' > 0 everywhere and f is convex. The slope f'(x) = 2 x - e^{- x} is zero at one point, which has no closed form; SymPy’s root finder gives c \approx 0.3517 (rounded to 4 decimals), with f(c) \approx 0.8272. Convexity says this is the global minimum. The kernel, which checks convexity on its own, agrees:
minimize x^2 + exp(-x)
# x = a real number
It reports x = 0.3517, value 0.8272, status optimal.
Two cautions. x^4 is convex even though its f''(0) = 0: the check asks for f'' \ge 0, not > 0. And x^3 is not convex on the whole line (f''(-1) = -6) but it is convex for x \ge 0: convexity depends on the interval.
Convexity is what lets ProvenDecisions say proven optimal instead of locally optimal. For whole models the app does not differentiate; it checks convexity by building rules (sums of convex pieces, convex functions of linear expressions; see the Convexity tutorial in Learn), and the second-derivative check is the one-variable picture behind those rules.