I made a piecewise polynomial object based on numpy.poly1d. It has all the usual arithmetic methods plus deriv() and integ(). C
numpy.poly1d
deriv()
integ()