how to do piecewise function
A piecewise function is usually defined by more than one formula: a fomula for each interval. Example 1: f( x ) = - x if x <= 2 = x if x > 2 What the above says is that if x is smaller than or equal to 2, the formula for the function is f( x ) = -x and if x is greater than 2, the formula is f( x ) = x.