How do you graph #0<=x-y<=2#?

1 Answer
Aug 10, 2017

Answer:

See below

Explanation:

#0<=(x-y)<=2#

This represents two inequalities, namely:

#0<=(x-y)# (i)

and

#(x-y)<=2# (ii)

First let's consider (i):
#0<=(x-y) -> -y+x>=0#

#-y>=-x#

#y<=x#

This inequality is represented graphically by all points on the #xy-#plane on or under the line #y=x#.

Similarly for (ii):

#(x-y)<=2 -> -y+x<= 2#

#-y<=-x+2#

#y>=x-2#

This inequality is represented graphically by all points on the #xy-#plane on or above the line #y=x-2#.

Combining these two results produces the graph below.

graph{(x-y)(x-y-2)<=0 [-11.25, 11.25, -5.63, 5.62]}