plot[(1 +cos(PI + x*PI))/2, {x,0,1}]