# Finding the set of parameters for which the inequality holds for all $x,y$

I encountered the following question about inequalities which I am curious how to solve. The simplest case is to consider the inequality $$|x|+|y|+|x+y|+ax+by\geq 0$$ where $$x,y,a,b\in\mathbb{R}$$. The question is which values of parameters $$a,b\in\mathbb{R}$$ would guarantee that the inequality holds for all $$x,y\in\mathbb{R}$$.

I tried playing with such inequalities and was surprised that this question is harder than I anticipated.

I first found that necessarily $$a\in [-2,2]$$: for $$x=1$$ and $$y=0$$ we get $$2+a\geq 0$$ so $$a\geq -2$$ and for $$x=-1$$ and $$y=0$$ we get $$2-a\geq 0$$ so $$a\leq 2$$.

Similarly, $$b\in [-2,2]$$ must hold.

Furthermore, I did find out that if $$a=b\in [-2,2]$$ then the inequality certainly holds for all $$x,y\in\mathbb{R}$$, because $$|x|+|y|+|x+y|+ax+by=(|x|+ax/2)+(|y|+ay/2)+(|x+y|+a(x+y)/2)$$ and each element in the parentheses is non-negative because $$a/2\in [-1,1]$$ and so $$|z|+az/2=\begin{cases} (1+a/2)z & z\geq 0\\ (-1+a/2)z & z<0\end{cases}\geq 0$$

However, I am sure that there are also other parameters $$a,b\in [-2,2]$$ for which the inequality holds. For instance $$a=2$$ and $$b=1$$ turn out to be a valid solution for all $$x,y\in\mathbb{R}$$ if you consider the various different cases. My question is how would I go about finding all such $$a,b$$?

More generally, is there some theory about such inequalities? Any good reference (paper/book) that is recommend to read in order to better grasp these inequalities? I am also interested in more general inequalities, with more parameters and variables, for instance $$|x|+|y|+|z|+|x+y|+|x+z|+ax+by+cz\geq 0$$ (with the task of finding $$a,b,c$$ so that it holds for all $$x,y,z$$). I am interested to which extent there is a theory of how to solve these questions generally.

Suppose we have $$\def\sgn{\operatorname{sgn}}$$

$$|x|+|y|+|x+y|+ax+by \geqslant 0 \tag 1$$

for all $$x$$ and $$y$$. Then this must apply in particular for $$y=0$$:

$$2|x|+ax = |x|(2+a\sgn x) \geqslant 0 \quad\implies\quad 2+a\sgn x \geqslant 0\tag 2$$

where $$\sgn x$$ denotes the sign of $$x$$. This implies $$|a|\leqslant 2$$ and also $$|b|\leqslant2$$ due to symmetry. When used with $$x=-y$$, one gets $$|a-b|\leqslant 2$$.

So more generally, let's try $$y=wx$$, so that $$(1)$$ becomes

\begin{align} & |x|+|wx|+|x+wx|+ax+bwx \\ & \quad = |x|(1+|w|+|1+w| + (a+bw)\sgn x) \geqslant 0 \tag 3 \end{align}

Divide $$(3)$$ by $$|x|$$ to get

$$(a+bw)\sgn(-x) \leqslant 1+|w|+|1+w| \tag 4$$ resp.

$$|a+bw| \leqslant 1+|w|+|1+w| \qquad\text{for all }w\tag 5$$

Thus in the plane, the line $$a+wb$$ is wedged between $$\pm(1+|w|+|1+w|)$$. The wedge is shown in the graphic in red+blue. However, this wedging is too restrict because it does not take into account that both line and wedge depend on $$w$$, i.e. the wedge is a bit like a moving target. Lines that do not cross a wedge still represent valid solutions, though.

Now $$(5)$$ is simpler than $$(1)$$ in the sense that we have only one value, $$w$$, in the absulute values on the right side, so that when cases are considered, we are left with just 3 cases instead of the 8 cases of $$(1)$$. So let's try and split cases:

$$|a+wb|\leqslant\begin{cases} 2+2w, & w\geqslant 0 \\ 2, & -1\leqslant w \leqslant 0 \\ -2w, & w \leqslant -1 \\ \end{cases}$$

The constraints from above are recovered for $$w\in\{0,-1,\infty\}$$. Notice that due to symmetry, this must still hold true if $$a$$ and $$b$$ are exchanged. Whilst this is somewhat simpler than $$(1)$$, it's not a satisfying solution and I am stuck here, but maybe some ideas are helpful.

Playing around with Desmos, it appears that the set you are looking for is the hexagon described by

$$\{a,b\in[-2,2] \ :\ |a-b|\leqslant 2\}$$

https://www.desmos.com/calculator/snisn01tvk

The parameter $$w$$ is named "g" in Desmos and can be changed with a slider. The plane is the $$a$$-$$b$$-plane. The set of solution is the intersection over all "g" resp. $$w$$.

Letting $$x = 1, y = 0$$, we have $$2 + a \ge 0$$.

Letting $$x = -1, y = 0$$, we have $$2 - a \ge 0$$.

Letting $$x = 0, y = 1$$, we have $$2 + b \ge 0$$.

Letting $$x = -1, y = 1$$, we have $$2 - a + b \ge 0$$.

Letting $$x = 0, y = -1$$, we have $$2 - b \ge 0$$

Letting $$x = 1, y = -1$$, we have $$2 + a - b \ge 0$$.

Thus, we have $$a, b \in [-2, 2]$$ and $$|a - b| \le 2$$.

$$\phantom{2}$$

On the other hand, suppose that $$a, b \in [-2, 2]$$ and $$|a - b| \le 2$$. Let us prove that $$|x| + |y| + |x + y| + ax + by \ge 0, \, \forall x, y \in \mathbb{R}.$$

We split into three cases:

Case 1: If $$y = 0$$, we have $$\mathrm{LHS} = 2|x| + ax \ge 2|x| - |a|\cdot |x| = (2 - |a|)|x| \ge 0.$$

Case 2: If $$y > 0$$, since the inequality is homogeneous, WLOG, assume that $$y = 1$$. It suffices to prove that $$|x| + 1 + |x + 1| + ax + b \ge 0, \, \forall x\in \mathbb{R}.$$

(1) If $$x \le -1$$, we have $$\mathrm{LHS} = - (2 - a)x + b \ge (2 - a) + b \ge 0.$$

(2) If $$-1 < x \le 0$$, we have $$\mathrm{LHS} = 2 + ax + b.$$ If $$a \le 0$$, we have $$2 + ax + b \ge 0$$. If $$a > 0$$, we have $$2 + ax + b \ge 2 - a + b \ge 0$$.

(3) If $$x > 0$$, we have $$\mathrm{LHS} = (2 + a)x + 2 + b \ge 0.$$

Case 3: If $$y < 0$$, since the inequality is homogeneous, WLOG, assume that $$y = -1$$. It suffices to prove that $$|x| + 1 + |x - 1| + ax - b \ge 0, \, \forall x\in \mathbb{R}.$$

(1) If $$x \le 0$$, we have $$\mathrm{LHS} = - (2 - a)x + 2 - b \ge 0.$$

(2) If $$0 < x \le 1$$, we have $$\mathrm{LHS} = 2 + ax - b.$$ If $$a \ge 0$$, we have $$2 + ax - b \ge 0$$. If $$a < 0$$, we have $$2 + ax - b \ge 2 + a - b \ge 0$$.

(3) If $$x > 1$$, we have $$\mathrm{LHS} = (2 + a)x - b \ge 2 + a - b \ge 0.$$

We are done.