Making an "Opposite Inequality"

399 Views Asked by At

I have the inequality $\ |i-j| > 1 $

I'm trying to build a piece wise function that is set to a different value $\ i,j$ values where this inequality is NOT true. Basically I'm trying to just flip the inequality logic.

However, I'm having a hard time figuring out how to "Flip" this inequality into what I want it to be.

$ f =\begin{cases} & \begin{array}{cc} 4 & \textrm{Insert Opposite Inequality Here}\\ 2 & |i-j| > 1 \end{array} \end{cases} $

Thanks

2

There are 2 best solutions below

0
On

Just reverse the direction of the inequality and allow equality: $|i-j|\le1$. However, as the absolute value function is non-negative, we may also write $0\le|i-j|\le1$.

0
On

The 'opposite' of greater than is less than or equal to. So the 'opposite inequality' that you want here is $|i-j|\leq 1$.