結果 : how to check if a piecewise function is differentiable