Question 739552
There is a typo somewhere in your piecewise function.
{{{f(x)=2x-1}}} for {{{-2<=x<=1}}} means
{{{f(-2)=2*(-2)-1=-4-1=-5}}} and
{{{f(1)=2*(1)-1=2-1=1}}}
The other piece of the function, defined as
{{{f(x)=3-x}}} for {{{1<=x<=4}}} would mean
{{{f(4)=3-4=-1}}} and
{{{f(1)=3-1=2}}}
The problem is that as written, we would have
{{{f(1)=1}}} for one piece and {{{f(1)=2}}} for the other piece, and that cannot be.
A function cannot be defined in such a way that two different {{{y=f(x)}}} values correspond to the same {{{x}}} value.
Unless the typo is somewhere else, one of the pieces of the function has to let go of {{{x=1}}}
 
The graph of
{{{f(x)=(matrix(2,3,2x-1,for,-2<=x<=1,3-x,for,1<x<=4))}}} is {{{drawing(300,300,-4,6,-6,4,
grid(0),
blue(line(-2,-5,1,1)),
blue(circle(1,1,0.1)),blue(circle(1,1,0.05)),
blue(circle(-2,-5,0.1)),blue(circle(-2,-5,0.05)),
blue(circle(4,-1,0.1)),blue(circle(4,-1,0.05)),
blue(circle(1,2,0.1)),blue(line(1.07,1.93,4,-1))
)}}} The points (-2,-5), (1,1), and (4,-1) are part of the function and are shown as solid points in the graph.
The point (1,2) is not part of the function and is drawn as an unfilled circle to show that is not part of the graph.
The line segment connecting (-2,-5) and (1,1) and both of its ends are the graph of {{{f(x)=2x-1}}} for {{{-2<=x<=1}}}
The line segment connecting (1,2) and (4,-1), along with point (4,-1) are the graph of {{{f(x)=3-x}}}for {{{1<x<=4}}}