Plotting a graph of a equation

108 Views Asked by At

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

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

2

There are 2 best solutions below

0
On BEST ANSWER

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}]

0
On

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.