piecewise function word problem solving - Search