A local maximum beats nearby feasible alternatives, but can lose to a distant setting. See strictness, endpoint conventions and what derivative tests actually certify.
Local maximum
A local maximum is an objective function value that is at least as high as every value at sufficiently nearby feasible inputs. The input achieving it is a local maximiser. A trading-model search can reach such a point and find that every small parameter adjustment makes its score worse, while a distant setting performs better under the same model.
“Nearby” is the qualifier. A global maximum must beat or tie every feasible alternative, however far away.
What counts as nearby?
For a real-valued function f on a feasible setD⊆R, a point x∗∈D is a local maximiser if some radius δ>0 satisfies
f(x)≤f(x∗)for every x∈D with ∣x−x∗∣<δ.
The radius need only exist; the inequality need not hold at every distance. The maximum is strict if every distinct feasible point in that neighbourhood has a strictly lower value. Ordinary, non-strict local maxima allow ties. For a constant objective f(x)=5 on R, every point is a local maximiser, but none is strict. A local maximum therefore need not look like a pointed hilltop.
This article takes neighbourhoods relative to the feasible set, following the optimisation convention used by Boyd and Vandenberghe, §4.1.1. An endpoint can qualify because only feasible nearby points are compared. Some calculus texts, including OpenStax, reserve “local extremum” for interior points and call endpoint extrema separately. The two conventions describe the same comparisons; they attach different labels at a boundary.
A research parameter that reaches the wrong peak
Suppose a researcher can choose a continuous, dimensionless, normalised parameterx∈[−2,3]. A deliberately synthetic model assigns it the dollar objective
f(x)=x3−3xUSD.
The coefficients are stipulated. This is a hypothetical objective landscape for a parameter search, not an observed return curve, a market calibration or a forecast of trading profits. Negative parameter values are permitted settings, not negative probabilities or portfolio weights.
The slope is positive on (−2,−1), negative on (−1,1), and positive on (1,3). Thus the curve rises to x=−1, falls away, then rises again after the local minimum at x=1. At the interior peak,
f(−1)=2,f′(−1)=0,f′′(−1)=−6<0.
The negative second derivative confirms a strict local maximum. There is also a direct neighbourhood check: write x=−1+h. Then
f(−1+h)−f(−1)=h2(h−3)<0when 0<∣h∣<21.
Every distinct setting within that radius scores less than USD 2. Yet the whole-domain comparison gives:
Setting x
Objective f(x), USD
Role
−2
−2
Left endpoint
−1
2
Strict interior local maximum
1
−2
Interior local minimum
3
18
Strict global maximum at the right endpoint
These are all the interior stationary candidates and both endpoints. The derivative signs show there are no omitted higher values between them. Consequently, the global maximum is USD 18 at x=3. Under the relative-domain convention, x=3 is also a strict local maximiser: nearby feasible inputs lie to its left and have lower values. The polynomial's derivative there is f′(3)=24, which is allowed because the maximiser is on a boundary.
Synthetic objective f(x) equals x cubed minus three x USD on the feasible interval from minus two to three. Interior local maximum at x equals minus one is USD 2; the global maximum at boundary x equals three is USD 18. A zoom around minus one shows nearby settings scoring below USD 2.
Original hypothetical example. The pale strip selects [−1.5,−0.5] for the zoom; its endpoint scores are USD 1.125 and USD 1.375. A local comparison certifies that neighbourhood, while global optimality requires the whole feasible interval.
A local search starting near −1 can settle at the lower peak. Trying several starting settings can reveal better candidates, but the best run observed is still not a proof that no better feasible setting exists.
What derivative tests can certify
At a differentiable interior local maximiser, f′(x∗)=0 is necessary. It is not sufficient: g(x)=x3 has derivative zero at 0 and keeps increasing through it. Nor is differentiability required by the definition: g(x)=−∣x∣ has a strict maximum at its corner, where the derivative does not exist.
For a twice continuously differentiable objective near an interior stationary point, f′′(x∗)<0 is sufficient for a strict local maximum. Zero second derivative is inconclusive; g(x)=−x4 still has a strict maximum at 0. These tests classify local behaviour, not distant alternatives. If software expects a minimisation objective, negate the function: local maxima of f become local minima of −f, and a global maximum becomes a global minimum of −f.
Additional structure can close the gap. If the objective is concave on a convex feasible set, every local maximiser is global. The cubic example lacks that property over its full interval: its second derivative changes sign. For the extension to several parameters, Unconstrained Optimisation develops stationary points, Hessian classification and ascent methods through utility and calibration examples. Its public preview is available without membership; the full lesson requires membership.
Sources
James Stewart, Single Variable Calculus: Early Transcendentals, 6th edition, §§4.1 and 4.3 — local versus absolute extrema, first-derivative and second-derivative tests.
Stephen Boyd and Lieven Vandenberghe, Convex Optimization, Cambridge University Press, 2004, §§4.1.1 and 4.2.2 — local optimality among nearby feasible points and the local-to-global property of convex optimisation, applied to maximisation by negating the objective. The cubic example and figure are original.