Prerequisites
Convex functions, Lagrangians, derivatives, and inequality constraints.
Learn first
Calculus describes change and accumulation
A derivative describes an instantaneous rate of change. A definite integral describes signed accumulation over an interval. The variable and interval matter.
How to work it out Name the requested quantity before applying a rule. For x to the power n, the derivative is n times x to the power n−1. Evaluate at a point only after differentiating.
A separate example For a separate function h(t) = 3t², h′(t) = 6t. An integral of a constant 4 from t = 1 to t = 3 is 4 × 2 = 8.
For minimization with g(x)<=0, use L=f+lambda*g and lambda>=0. KKT combines feasibility, stationarity, and complementary slackness. For a differentiable convex problem, a feasible KKT point is globally optimal; necessity needs appropriate conditions.
Worked example
Minimizing (x-4)^2 subject to x<=2 gives x=2. Stationarity 2(x-4)+lambda=0 gives lambda=4: the objective locally decreases by about 4 per unit relaxation of the bound.
Model and Assumptions
Minimize f(x)=(x-3)^2 subject to x<=b, with no lower bound. Write g=x-b and L=(x-3)^2+lambda(x-b). First use b=1. The objective is strictly convex and strictly feasible points exist.
Further inquiry
Derive the optimal value and multiplier as functions of b, including the transition at b=3. Derive the dual function and verify equality of primal and dual optima at b=1.
Review criteria
- Obtain x*=min(3,b), with lambda*=max(0,6-2b).
- Show the dual function lambda(3-b)-lambda^2/4 for lambda>=0.
- Explain why the local sensitivity is not a constant prediction for every finite relaxation.