# Plotting a graph of a equation

How can I plot the graph $$|x|+x=|y|+y?$$

Is there any way of doing it without using a graphing calculator ?

• As this graph contains all points with $x\le0$ and $y\le0$, I would suspect that there would be no way of plotting it with a graphing calculator. – Lord Shark the Unknown Feb 9 '18 at 6:11
• @LordSharktheUnknown Desmos just ignores the $x,y\le0$ part. – Parcly Taxel Feb 9 '18 at 6:14
• @ParclyTaxel Intestering that Desmos messes this up! – max_zorn Feb 9 '18 at 6:54

The question we need to answer is: when does the condition $x + \lvert x\rvert = y + \lvert y\rvert$ hold? Let's break it into cases depending on whether $x$ and $y$ are positive or negative.

If $x$ is negative or zero (we'll call this nonpositive), then $x + \lvert x\rvert = 0$. If $y$ is positive, then $y + \lvert y\rvert = 2y > 0$. So if $x$ is nonpositive but $y$ is positive, the condition won't hold. Same if we swap the roles of $x$ and $y$.

If both $x$ and $y$ are nonpositive, then both sides of our equation will be $0$, so it will hold.

If both $x$ and $y$ are positive, then our equation reads $2x = 2y$, so it will hold only if $x$ and $y$ are the same. This can all be summarized in the following plot, generated in Mathematica with RegionPlot[Abs[x] + x == Abs[y] + y, {x, -1, 1}, {y, -1, 1}]

Well, you can do it by consider te $4$ quadrant separately.

what happens if $x \ge 0$ and $y \ge 0$, LHS become $|x|+x=x+x=2x$ and RHS become $|y|+y=2y$, hence for the first quadrant, just plot $x=y$.

Do it for the other $3$ quadrants as well.