How to graph $Abs(x) +Abs(x+1)$

84 Views Asked by At

As I'm trying to graph this function on desmos which is a graphing calculator to verify my answer, there is a coordinate of (-0.5,1). The problem is I get every other whole coordinate EXCEPT that one despite trying the question multiple ways.

I'm mainly going about using the piecewise strategy

3

There are 3 best solutions below

0
On BEST ANSWER

$f(x) = |x|+|x+1|=\begin{cases} -x -(x+1) & \forall x\in(-\infty,-1) \\-x +(x+1) &\forall x\in [-1,0) \\ x+x+1& \forall x\in [0,\infty) \end{cases} =\begin{cases} -2x -1 & \forall x\in(-\infty,-1) \\1 &\forall x\in [-1,0) \\ 2x+1& \forall x\in [0,\infty) \end{cases} $

So you'll get $1$ for all $x$ lying in the range $[-1,0]$

2
On

Here's the plot. What's the problem?

|x|, |x+1|, |x| + |x+1|

3
On

Good question.

  • You're using the piecewise strategy, which sounds like you've noted that $\mathrm{abs}(x)$ behaves like the function $f(x)=x$ when $x>0$ and like the function $f(x)=-x$ when $x<0$.

  • You also know that $\mathrm{abs}(x+1)$ behaves like the function $f(x)=x+1$ when $x+1 > 0$, and behaves like the function $f(x) = -(x+1)$ when $x+1 < 0$.

    (In other words, the two conditions are when $x > -1$ and when $x < -1$.)

  • The conditions we've collected so far are: $x>0$ and $x<0$, and $x<-1$ and $x>-1$. This divides the space into three chunks: $$\qquad\qquad\qquad\leftarrow \underset{-1}{|} \qquad\qquad\qquad \underset{0}{|}\rightarrow \qquad\qquad\qquad $$

  • Your function is $F(x) = \mathrm{abs}(x) + \mathrm{abs}(x-1)$.

    • In the first region, $x<-1$ and $x<0$, so it behaves like $F(x) = -x + -(x+1) = -2x-1$.
    • In the second region, $x>-1$ but $x<0$, so it behaves like $F(x) = x + -(x+1) = -1$.
    • In the third region, $x>-1$ and $x>0$, so it behaves like $F(x) = x + (x+1) = 2x+1$.
  • The point $x=-0.5$ falls in the second region, because $x>-1$ and $x<0$. Therefore, for your function, $$F(-0.5) = (-0.5) + -(-0.5+1) = -0.5 - 0.5 = -1.$$