Piecewise polynomial collocation methods for solving weakly singular integro-differential equations