Deploy the absolute inequality formua

21 Views Asked by At

Please help me derive that equation: $$f(x) = \begin{cases} 1, & \text{if $(x-a)^2-(x-b)^2>0$} \\ -1, & \text{otherwise} \end{cases}$$ where $x,a,b \ge 0$

Thank you in advance

This is what I done. However, I am not sure about my answer

Solution: Due to $x,a,b \ge 0$ then $$(x-a)^2-(x-b)^2>0$$ $$\equiv (x-a)^2>(x-b)^2$$ $$\equiv |x-a|>|x-b|$$

And othersolution is $$(x-a)^2-(x-b)^2>0$$ $$-2ax+a^2>-2bx+b^2$$ $$2x(b-a)>(b-a)(b+a)$$ $$x>\frac{b+a} 2 \text {if b>a} $$ or $$x<\frac{b+a} 2 \text {if b $\le$ a} $$

1

There are 1 best solutions below

0
On

It's easier to remark that $$(x-a)^2-(x-b)^2= \left((x-a)-(x-b)\right)\left((x-a)+(x-b)\right)= (b-a)(2x-(a+b))$$

Hence

$x > \frac{a+b}{2}$ if $b>a$ and $x < \frac{a+b}{2}$ if $b<a$

and it holds for all x,a,b reals