# Solve the following system of equations:$|x|+|y|=2$ and $y=x+1$.

Solve the following system of equations:

$$|x|+|y|=2$$ and $$y=x+1$$, where $$x$$ is a real number.

Approach:

I substituted $$y$$ in equation $$1$$, so:

$$\ \ \ \ \ \ \ \ \ \ |x|+|x+1|=2$$

$$1 \ \ \ \ \ \ \ \ \ \ 1$$

$$2 \ \ \ \ \ \ \ \ \ \ 0$$

$$0 \ \ \ \ \ \ \ \ \ \ 2$$

These are the total possibilities I think, because $$|x|, |x+1| \ge 0$$.

Case $$1$$: $$|x|=1$$, so, $$x = \pm 1$$

and $$|x+1| = 1$$, so $$x+1=\pm 1$$ so, $$x = 0,-2$$.

But no value of $$x$$ is matching, so this case gets rejected.

Case $$2$$: $$|x|=2$$, so, $$x = \pm 2$$

and $$|x+1| = 0$$, so $$x=-1$$.

But no value of $$x$$ is matching, so this case also gets rejected.

Case $$3$$: $$|x|=0$$, so, $$x = 0$$

and $$|x+1| = 2$$, so $$x+1 = \pm 2$$ and so, $$x=1,-3$$.

Here also, no value of $$x$$ is matching. So no solution exists.

Is this solution correct? Please confirm. If there is a shorter method to approach the question, please share it.

• Is $x\in\Bbb R$? In that case $x=\frac{1}{2}$ would also work May 2 at 8:12
• It is a lot easier to find the solutions graphically. Are you allowed to do that? May 2 at 8:13
• @DatBoi, yes graphical soln is allowed.
– user907745
May 2 at 8:14
• @DatBoi Yes, as intersections of a square (first equation) and a straight line (second equation). May 2 at 8:14
• @lonestudent I did, thanks.
– user907745
May 2 at 9:13

Image courtesy $$-$$ Martund.

$$|x|+|y|=2$$ is square on graph paper (you will get it by making cases).

and $$y=x+1$$ is line.

This is the shortest (not only) method I know.

• I suggest you to add this picture in your answer (as a smoother version of yours). I've made it using Microsoft Paint. May 3 at 8:11
• @Martund always feel free to edit my answers and questions and thanks for help.
– Jay
May 3 at 8:49

We know that $$|x-y|\le|x|+|y|$$ where equality holds iff $$x$$ and $$y$$ are of opposite sign. In this case we know that equality doesn't hold, so $$x$$ and $$y$$ are of same sign, so the first equation becomes $$|x+y|=2$$ and second is $$y-x=1$$. Making cases for positive and negative sign in first equation, we get the required solutions: $$\left(\frac12,\frac32\right)\quad\text{and}\quad\left(-\frac32,-\frac12\right)$$

• thanks for your answer (I ran out of upvotes I'm sorry about that). Could you explain how we know $x$ and $y$ are of same sign...
– user907745
May 2 at 9:13
• @Crease, if they were of opposite sign equality would have held in the first equation. But we know that the LHS is $1$ and RHS is $2$ for that equation, so $x$ and $y$ are of the same sign. May 2 at 9:16
• Oh yes, thanks :)
– user907745
May 2 at 9:20

### HINT

• If $$x≥0$$, then $$y=x+1>0$$

$$\begin{cases} x+y=2 \\ y=x+1 \end{cases}$$

Then, we need

• If $$-1≤x<0, ~y≥0$$

$$\begin{cases} y-x=2 \\ y=x+1 \end{cases}$$

• If $$x<-1, ~y<0$$

$$\begin{cases} -x-y=2 \\ y=x+1 \end{cases}$$

• Of course, for the second case, the solution doesn't exist. May 2 at 11:35

One nice way to think about it is to see |x-a| as the distance between x and a. Visually, it's pretty clear only x=-1.5 and x=0.5 are solutions.

You only consider integers, hence you might left out non-integer solutions.

We have $$|x|+|x+1|=2$$

$$|x-0|+|x-(-1)|=2$$

So the solution for $$x$$ is when the sum of distance from $$0$$ and the distance from $$-1$$ is exactly $$2$$.

Clearly, the point can't be inside $$[-1, 0]$$.

If $$x$$ is positive, then we have $$2x+1=2$$, hence $$x=\frac12$$.

Similarly, if $$x<-1$$, by symmetry, $$x=-1-\frac12=-\frac32$$.