Detour E — Convex functions (detailed)
On this page 4 headings
A function f defined on a convex domain is convex when its graph never rises above the straight chord joining two points of its graph. Formally, for any a,b in the domain and :
The left side is the function evaluated at the weighted-average input. The right side is the weighted average of the two function values. The direction is essential. A differentiable function with throughout an interval is convex there, when the second derivative exists.
Verify convexity for
Choose , and . The weighted-average input is 0.
Left side:
Right side:
Thus .
This checks one example, not the entire definition. For a full proof, note
A counterexample to convexity is
At , and , the convexity inequality would require , which is false. The earlier coordinate-incorrect Image 18 is intentionally omitted.
Checking the inequality numerically
Let
, and . The weighted input is . The left side is
The right side is
Thus , as required.
Why one example is not a proof
A single successful substitution only checks the inequality at the chosen a, b and . Convexity requires the inequality for every allowed a, b and . The algebraic identity above proves this universally for
A nonconvex example
For
take , , . The left side is
but the right side is
Since is false, f is not convex on . This is a valid counterexample: to disprove a universal claim, one failure is enough.
