piecewise function word problems