sinx and x^2-pix for x from -pi to 2 pi