How could we solve $x$, in $|x+1|-|1-x|=2$?

How could we solve $x$, in $|x+1|-|1-x|=2$?

Please suggest a analytical way that I could use in other problems too like this $ |x+1|+|1-x|=2$ and of this genre.

Thank you,


Solution 1:

The most efficient method is to split problems like this into cases. We do this to get rid of absolute value signs, which reduces the problem to solving simple linear equations.

Notice that $x+1$ changes its sign only at $x = -1$ and similarly $1-x$ changes its sign only at $x = 1$. Splitting the real line at these two points gives us three intervals, and in each of these intervals we can express $|x+1| - |1-x| = 2$ as a linear equation. This is because the signs of $x+1$ and $1-x$ will not change when operating inside one interval, as they are both continuous functions.

So we will consider three cases: $x \leq -1$, $-1 \leq x \leq 1$ and $1 \leq x$. This will give us all the solutions, since any real number belongs to one of the three cases.

When $x \leq -1$, then $|x+1| = -x-1$ and $|1-x| = 1-x$, so the equation becomes $-x-1 - (1-x) = 2 \Leftrightarrow -2 = 2$. This is not possible, so there are no solutions when $x \leq -1$.

Similarly, when $-1 \leq x \leq 1$, then $|x+1| = x+1$ and $|1-x| = 1-x$. Then the equation becomes $x+1 - (1-x) = 2 \Leftrightarrow x = 1$. Thus $x = 1$ is the only solution when $-1 \leq x \leq 1$.

Finally, in the case of $x \geq 1$, then $|x+1| = x+1$ and $|1-x| = -1+x = x-1$. The equation becomes $x+1 - (x-1) = 2 \Leftrightarrow2=2$. Since $2=2$ is always true, any $x \geq 1$ is a solution.

Thus the set of solutions is $[1, \infty]$.

This method also works in general, when we have to solve an equation with continuous functions inside absolute value signs. We find the “splitting points” for different cases by finding the roots of these functions. Then in each interval we need to find the sign of each function inside an absolute value sign. This becomes more difficult when dealing with functions like $\sin$, but is simple enough when each function is a straight line such as $x+1$ and $1-x$.

Solution 2:

This is the same solution as m.k. wrote; I am just mentioning the useful and clear way how to write it down.

I was taught to always make a table like this, dividing the real line by the points where the expression for absolute value changes. $$\begin{array}{|c|c|c|c|c|c|} x\in & (-\infty,-1\rangle && \langle-1,1\rangle && \langle1,\infty) \\\hline |x+1| & -1-x &|& x+1 && x+1 \\\hline |1-x| & 1-x && 1-x &|& x-1 \\\hline \end{array}$$

If you think that it is helpful for you, you can also mark in the table where the expression for each of the absolute values changes as I did above. (This is what that additional columns are about. I did not know how to plot it nicer in LaTeX markup.)

Without those marks the table looks like this: $$\begin{array}{|c|c|c|c|} x\in & (-\infty,-1\rangle & \langle-1,1\rangle & \langle1,\infty) \\\hline |x+1| & -1-x & x+1 & x+1 \\\hline |1-x| & 1-x & 1-x & x-1 \\\hline \end{array}$$

I make sure that I did not make a mistake in that table and then I solve the equation $|x+1|-|1-x|=2$ in each interval separately.

For example, for $x\in\langle1,\infty)$, I look up in the table that this equation can be rewritten like this: $$\begin{align} |x+1|-|1-x|&=2\\ (x+1)-(x-1)&=2\\ 2&=2 \end{align}$$

So every real number is a solution of this, but since the original equation is equivalent to the last one only for $x\in\langle1,\infty)$, so far I only know that solutions $\mathbb R\cap\langle1,\infty)=\langle1,\infty)$ is one part of the solution set. I have to look for the solutions in remaining two intervals, as well.

And for $x\in\langle-1,1\rangle$ I get $2x=2$, which has $x=1$ as the only solution. Note that I already counted this solution in the preceding case.

For $x\in(-\infty,-1\rangle$ I get no solutions, since the equation is now $-2=2$.

Now I just put together the three solution sets: $\emptyset\cup\{1\}\cup\langle1,\infty)=\underline{\underline{\langle1,\infty)}}$.


The same principle works in general – divide the problem into cases, solve for each case and take only those solutions which lie in that interval, then take the union of all those solutions.


In my opinion, a useful thing to do is to sketch a graph of your function too – quite often this is not so difficult. Have a look at this WolframAlpha plot of $|x+1|$ and $|1-x|$ and this plot of $|x+1| - |1-x|$ and $2$.


There is also a geometric interpretation of $|x+1|=|x-(-1)|$ is distance from $x$ to $-1$. Similarly $|x-1|$ is simply distance from $1$.

So solving $$|x+1|-|x-1|=2$$ simply means looking for points such that the distance from $-1$ is greater than the distance from $1$ by $2$.

We can see that $x=1$ has this property and so do all the points to the right from $1$. But if we move to the left from $1$, then this difference decreases.

So the set of all solutions is the interval $[1,\infty)$.

The geometric approach is also explained here.


NOTE: I made this a CW on purpose. If someone feels they can add something useful to this explanation or improve the post in any way, please, do it.

Solution 3:

Here is one approach using the definition $|x|=\sqrt{x^2}$.
Rewrite your equation as $$ |x+1|=2+|1-x|$$ and apply the above definition.
i.e. we would have $$ \sqrt{(x+1)^2}=2+\sqrt{(1-x)^2}.$$ The next step is to square both sides to get rid or the square roots.

i.e $$\left( \sqrt{(x+1)^2}\right)^2 = \left(2+\sqrt{(1-x)^2}\right)^2. $$I believe you can take it from here.

Hope this helps.

Solution 4:

Hint:

One characterization of "$x$ is between $a$ and $b$" is $$ |x-a|+|x-b|=|a-b| $$

Solution 5:

Case 1: $x\ge1$, then $$|x+1|=x+1,|1-x|=x-1.$$ The equation becomes $x+1-(x-1)=2$, which is true. So $x\ge1$ satisfies the equation.

Case 2: $-1<x<1$, then $$|x+1|=x+1,|1-x|=1-x.$$ We have $$(x+1)-(1-x)=2x<2,$$ so $-1<x<1$ does not satisfy the equation.

Case 3: $ x\le 1$, then $$|x+1|=-(x+1), |1-x|=1-x.$$ We have $$-(x+1)-(1-x)=-2<2, $$ so $x\le -1$ does not satisfy the equation.

Answer: $x\ge 1$.