Question 1063800
Graph of y=|x+1|+|2x-1|
<pre>
Here's what you do, step by step:

Set the expressions inside the absolute value bars equal 0,
x+1 = 0        2x-1 = 0
  x = -1         2x = 1
                  x = {{{1/2}}}  
These define three intervals: x < -1, -1 < x < 1/2, and x > 1/2

For x < -1, |x+1| = -(x+1) and |2x-1| = -(2x-1)
so y = -(x+1)-(2x-1) = -x-1-2x+1 = -3x

For -1 < x < 1/2, |x+1| = x+1 and |2x-1| = -(2x-1)
so y = x+1-(2x-1) = x+1-2x+1 = -x+2

For x > 1/2, |x+1| = x+1 and |2x-1| = 2x-1
so y = x+1+2x-1 = 3x-1-2x+1 = 3x

So the graph is this piecewise graph:

{{{matrix(1,3,

y,
""="",
system(matrix(3,3,    -3x, if, x<-1,
                           -x+2, if, -1<=x<1/2,
                              3x, if, x>=1/2) )
)}}}

So draw the three lines:

{{{drawing(330,390,-5.5,5.5,-2.5,10.5,
graph( 330, 390, -5.5, 5.5, -2.5, 10.5,-3x),
graph( 330, 390, -5.5, 5.5, -2.5, 10.5,-x+2),
graph( 330, 390, -5.5, 5.5, -2.5, 10.5,3x)

)}}}



Then erase the parts of the three lines that extend 
past their part of the domain:

{{{graph( 330, 390, -5.5, 5.5, -2.5, 10.5,
          abs(x+1) + abs(2*x-1)
)}}}


Edwin</pre>