Given the function y={ 3x+1 if x ≥0 Find its values for x=−1; 0; 1; 2.

{x-2 if x<0

so for x = -1, use the function y = x - 2

for the other x's , use the function y = 3x + 1

Just sub in the values of x and evaluate y.

e.g. if x = 2
y = 3(2) + 1 = 6+1 = 7