Piecewise Function

Here are four different ways!