The two endpoints are obvious. The proof of Theorem 1 is given in the appendix. A consequence of the theorem is that a very simple search algorithm can be used to solve (28). The objective is piecewise quadratic, with knots defined by the βjℓ. We need only evaluate solutions in the intervals including the mean and median, and those in between.