not been on here in a while, but in this case I'm working on a blog article regarding an $\mathrm{isZero}$ function, which returns $1$ for true (the input is zero), and $0$ for false (the input is not zero). The function is based on taking advantage of the fact that:
$$\mathrm{isZero}(x) = 1 - \frac {x^2 + 1 - (|x + 1|) (|x - 1|)}{2}$$
I can programmatically test this for all values of $x$ (ADDENDUM: in the integer space), I've run all sorts of tests in Excel, JavaScript and other programming languages. I can prove it algebraically quite easily for $0$, just substitute $x = 0$ and everything reduces down perfectly to give me the $1$ that confirms the is-zero case.
However, (ADDENDUM: in the case of an integer x), where $x > 0$ or $x < 0$, when I pull graphs for $y = |x - 1|$ for $x > 0$ or $y = |x + 1|$ for $x < 0$, I find myself face to face with the inflection point where $x = 1$ for the former graph and where $x = -1$ for the latter graph, and I'm not sure how I could reduce down the $\mathrm{isZero}$ function equation based on whether I'm dealing with a positive non-zero value of $x$, or a negative non-zero value of $x$. I was wondering if anyone would know how I can prove in both cases that a non-zero value of $x$ yields a zero as a result of the above equation, thus satisfying the equation?
EDIT: I remembered that I was originally working with x being only in the integers space, thanks to 5xum. Apologies to all for having forgotten about this. I will update the main question accordingly with the necessary addenda.