Can the sum of two max operators be simplified and written as a single max operator? I have the following forms: $$\max(a-b,0) + \max(b-a,0)$$ and $$\max(a-b,0) + \max(c-d,0)$$
2026-04-19 12:13:10.1776600790
On
Sum of two max operators
219 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
2
There are 2 best solutions below
0
On
The first form can be simplified. If $a>b$, then $a-b>0$ and $b-a<0$. Then $$\max(a-b,0)+\max(b-a,0)=(a-b)+0=a-b$$ Otherwise when $a\le b$, then $a-b\le 0$ and $b-a\ge 0$. Then$$\max(a-b,0)+\max(b-a,0)=0+(b-a)=b-a$$ Hence we have $$\max(a-b,0)+\max(b-a,0)=|a-b|$$ The second form cannot be written as a single max operator in general.
Assuming $a$ and $b$ are reals (including rationals and integers), it's easy to show by distinguishing the cases $a\ge b$ and $a<b$ that $$\begin{align} \max(a-b,0) + \max(b-a,0)&\ =\ \max(a-b,\,b-a)\\ &\ =\ \left\lvert\,a-b\,\right\rvert\\ &\ =\ \left\lvert\,b-a\,\right\rvert\\ \end{align}$$
I don't see much simplification possible for the other expression.