plot(piecewise(((2-x^2, x<=0),(3x+1, x>0)))