Range and Inverse of a Piecewise Function