Is $g(x_1, x_2) = |\alpha – x_1| + |\max \{\alpha, x_1\} + \beta – x_2|$ convex

convex-analysisconvex-geometry

Let $\alpha \geq 0$ and $\beta \geq 0$. Can we prove or disprove the following function is convex on $x_2 \geq x_1 \geq 0$?
$$
g(x_1, x_2) = |\alpha – x_1| + |\max \{\alpha, x_1\} + \beta – x_2|
$$

My Approach: In simulation, it seems that the function is convex but I couldn't rigorously prove it. Any help would be appreciated.

P.S.: A similar question is asked here when $|\cdot|$ is replaced with $(\cdot)^2$ and a counterexample is given to show that it is not convex. But that counterexample does not work for the case of $|\cdot|$.

Best Answer

I deleted my previous solution since it is complicated. I give another solution here.

Proof: We have (cf. @user125932's answer) \begin{align} g(x_1, x_2) = \left\{\begin{array}{ll} -x_1 - x_2 + 2\alpha + \beta & x_1 \le \alpha, x_2 \le \alpha + \beta \\ -x_1 + x_2 - \beta & x_1 \le \alpha, x_2 > \alpha + \beta\\ 2x_1 - x_2 - \alpha + \beta & x_1 > \alpha, x_2 \le x_1 + \beta \\ x_2 - \alpha - \beta & x_1 > \alpha, x_2 > x_1 + \beta. \end{array} \right. \end{align} It is easy to verify that $$g(x_1, x_2) = \max \{-x_1 - x_2 + 2\alpha + \beta, \ -x_1 + x_2 - \beta, \ 2x_1 - x_2 - \alpha + \beta, \ x_2 - \alpha - \beta\}.$$ Thus, $g(x_1, x_2)$ is convex (see Example 3.5, page 80, in [1]).

[1] Boyd and Vandenberghe, "Convex optimization". http://web.stanford.edu/~boyd/cvxbook/bv_cvxbook.pdf

Related Question