Maclaurin series of piecewise functions, and their convergence interval