ETF5248 Chap.6 Piecewise and Convex Optimisation
Piecewise and Convex Optimisation
Advanced business models often contain changing marginal rates or smooth curvature. A piecewise-linear formulation divides quantity among segments and preserves breakpoint logic, while an all-units tier can require binary selection because crossing a threshold changes the price of earlier units too.
Boundary tests reveal gaps, overlaps and segments used out of order.
Convex optimisation addresses nonlinear relationships with a global shape guarantee. In convex minimisation over a convex feasible set, a local minimum is global.
This chapter distinguishes that disciplined case from arbitrary nonlinearity, applies line-segment and curvature reasoning, and shows why first-order conditions, plotted bowls and solver success are insufficient unless the entire objective, domain and feasible set satisfy the required conditions.
The commercial rule determines the formulation.
Under marginal pricing, early units retain their original rate and only units beyond a breakpoint enter the later segment. Under an all-units discount, crossing a threshold can reprice the whole quantity, creating a discrete choice between regimes. Segment capacities and, where needed, ordered-fill logic stop an optimiser from selecting a cheap block before earning access to it.
Values immediately below, at and above each breakpoint reveal unintended gaps or jumps. Convexity requires similarly explicit checks. A feasible set is convex only when every point on the line segment between any two feasible points remains feasible. For minimisation, the objective must have the convex direction; a stationary point must also satisfy the constraints.
Discrete exclusions and some nonlinear equalities can make the feasible set non-convex even when the objective is a smooth bowl. Curvature, domain and feasibility together support the global claim.
What this chapter covers
- 01
Piecewise-linear marginal rates
- 02
Segment capacities and ordered fill
- 03
All-units tiers and binary logic
- 04
Breakpoint and continuity checks
- 05
Convex sets and convex functions
- 06
Local and global optimality
Worked example · free
Price a quantity across two marginal-rate segments
- 1The first segment is full: 25 times $12 = $300.
- 1The second segment contains 40 - 25 = 15 units and costs 15 times $7 = $105.
- 1Total cost is $300 + $105 = $405. The shortcut 7 times 40 = $280 wrongly reprices the first segment.
- 1At exactly 25 units both pieces meet at $300, so the stated marginal tariff is continuous at the breakpoint.
Key terms
- Breakpoint
- A quantity at which the slope or rule of a piecewise relationship changes.
- Segment variable
- A variable measuring how much quantity is allocated to one linear portion of a piecewise function.
- Convex set
- A set containing the full line segment between any two of its points.
- Convex function
- A function whose graph lies on or below chords joining points on the graph.
- Global minimum
- A feasible point whose objective is no greater than that of every other feasible point.
Piecewise and Convex Optimisation FAQ
What is the difference between marginal and all-units pricing?
Under marginal pricing, only quantity beyond a breakpoint receives the later rate, so segment costs add. Under an all-units tier, crossing a threshold changes the price applied to every unit. That discrete regime choice usually needs binary logic rather than simple continuous segment filling.
Why must segment variables have upper bounds?
Without segment capacities, the optimiser may place all quantity in the cheapest segment even when the tariff allows that rate only after an earlier block is filled. Bounds reproduce segment widths, and ordered-fill or binary logic may be necessary when the cost structure is not naturally convex.
When does a local minimum become global?
For the standard guarantee, the objective is convex, the feasible set is convex and the task is minimisation. The corresponding maximisation form uses a concave objective. A generic nonlinear equality, discrete exclusion or wrong curvature can destroy the guarantee even if a plot looks bowl-shaped.
Is a zero derivative enough to prove optimality?
Not by itself. It identifies a stationary point under differentiability, but that point might be a maximum, saddle or infeasible. Convexity and feasibility supply the global certificate, while a bounded domain can also require checking endpoints or active constraint boundaries.
Exam move
Sketch each piecewise rule and label the rate on every segment before writing variables. Test zero quantity and all breakpoints, then verify that the algebra matches the intended commercial policy. For convexity, practise the line-segment definition for feasible sets and the correct direction of curvature for minimisation and maximisation.
When using derivatives, follow the stationary calculation with a feasibility and curvature statement. Keep piecewise logic, convexity evidence and solver results as separate checks, because passing one does not automatically validate the others.
Working through Piecewise and Convex Optimisation in ETF5248? Sia is AskSia’s AI Mathematics tutor — ask any ETF5248 Piecewise and Convex Optimisation question and get a clear, step-by-step explanation grounded in how ETF5248 is taught and assessed. Read this chapter free, then take your hardest questions to Sia.