Plotting $||x|-|y||=1$: How to verify the extra line segments aren't included in the plot?

31 Views Asked by At

I have to plot the graph of $||x|-|y||=1$, I did the following: As $|x|=\max(x,-x)$ I've obtained the following equations:

$$|x|-|y|=1 \hspace{2cm} |y|-|x|=1$$

From there, I've obtained the following equations:

$$x-y=1 \hspace{1cm} x+y=1\hspace{1cm}-x-y=1\hspace{1cm}-x+y=1$$

The plot of these equations is the first here, and the plot of $||x|-|y||=1$ is the second.

$ \hspace{4mm}$enter image description here

So I am not so far from the answer. My trouble is the following: How do I verify that the extra line segments in the first plot are not included? I tried to verifiy some values, for example: $x=-1/2,y=1/2$ and notices that for them $||x|-|y||<1$ so I tried to use the triangle inequality expecting to obtain $||x|-|y||\leq |x-y|<1$ for the extra line segments but I failed to do so.

1

There are 1 best solutions below

0
On BEST ANSWER

For each of the four equations you obtained, the signs of $x$ and $y$ must be considered. We have:

$$x-y=1 \text{ for } x,y \ge 0 \text { (satisfying $|x|-|y|=1$) or } x,y \le 0 \text { (satisfying $|y|-|x|=1$) }$$

Notice that the part of the line $x-y=1$ in $x \ge 0, y \le 0$ (Quadrant IV) is omitted.

Similarly:

$$x+y=1 \text{ for } x \ge 0, y \le 0 \text{ or } x \le 0, y\ge 0$$

$$-x-y=1 \text{ for } x \ge 0, y \le 0 \text{ or } x \le 0, y\ge 0$$

$$-x+y=1 \text{ for } x, y \ge 0 \text{ or } x , y \le 0$$

These extra constraints conveniently corresponds to the four quadrants, omitting Quadrants I, III, II respectively. Plotting these lines according to these constraints will avoid the extra lines in the 'undesired' quadrants.