for -1<=x<=0 sx = -2*x^3-x^2 for 0<=x<=1 sx = 2*x^3-x^2