# How to sum diferent equations?

Correct me if I'm wrong but I was just experimenting in Desmos and somehow got to the result that $$y=x$$ AND $$y=-x$$ can be summarized into $$y=\dfrac{|xy|}{y}$$.

I was wondering if this can be possible as well for $$y=0$$ and $$x=0$$?

Also can $$y=x$$, $$y=-x$$, $$y=0$$ and $$x=0$$ be summarized into one single equation?

enter image description here

Thanks!

• if $x=y=-x$ then $x=0$; how about $|y|+|x|=0$? Apr 21 '20 at 4:15
• Original two equations are $|x|=|y|$ or $x^2=y^2$. Second one is either @J.W.Tanner 's comment or $x^2+y^2=0$ Apr 21 '20 at 4:29
• @J.W.Tanner: I don't think the OP is using AND the way most of us here do. Basically, he wants to express the union of two graphs, whereas you're finding the intersection. Apr 21 '20 at 5:05
• @JonathanZsupportsMonicaC: that could be. I made my comment before I looked at the linked image Apr 21 '20 at 14:54
• @J.W.Tanner: Thanks, I actually overhauled the entire answer so it's more straight forward. Felt a bit bad about completely re-writing it when there were already votes on it, but hopefully it's at least as good if not better. ;--} Apr 21 '20 at 17:57

First, we have to clear up a bit of confusion about the word "and". Seriously.

When mathematicians use the word "and" between two conditions they mean both should be true simultaneously. So when someone says $$y=x$$ AND $$y=-x$$, we can conclude that $$x=-x$$, so $$x=0$$, and the only point we get is $$(0,0)$$. This corresponds to taking the INTERSECTION of the two lines. From your picture it looks like what you want is the UNION of the two lines, which you should describe as "$$y=x$$ OR $$y=-x$$". Luckily we can find ways to single-equation-ize in either case.

Let's consider a set of equations

$$f_1(x,y) = g_1(x,y)$$ $$f_2(x,y) = g_2(x,y)$$ $$f_3(x,y) = g_3(x,y)$$

If we want to have the set of points where all of the equations are true at the same time (intersect the graphs) we can use the single equation

$$(f_1(x,y) - g_1(x,y))^2 +(f_2(x,y) - g_2(x,y))^2 +(f_3(x,y) - g_3(x,y))^2 = 0.$$

(This does assume that we are working with real numbers. The trick doesn't work in $$\mathbb{C}$$.)

If we want to have the set of points where any one of the equations is true (take the union of the graphs) we can use the single equation

$$(f_1(x,y) - g_1(x,y))\cdot (f_2(x,y) - g_2(x,y)) \cdot (f_3(x,y) - g_3(x,y)) = 0.$$

$$y=x$$ union $$y=-x$$ $$\Rightarrow$$ $$(y-x)(y+x) = 0$$, or $$y^2 = x^2$$.
$$y=0$$ union $$x=0$$ $$\Rightarrow$$ $$yx=0$$
All four lines $$\Rightarrow$$ $$(y+x)(y-x)yx = 0$$, or $$y^3x = x^3y$$.
And to be super-picky, your equation $$y=\dfrac{|xy|}{y}$$ omits the point $$(0,0)$$, although Desmos doesn't seem to pick up on that.